dex trade query for historical trades

Returns DEX trades on Solana, where block time since 2026-03-31, block time till 2026-03-31 and block slot is 410127882: block time, transaction signature, market address, protocol name, protocol family, buy amount, buy amount in USD and 14 more fields.

By gaurav · saved 1 April 2026 · run 4 times · Bitquery API v2

What it returns

Filters

The query


query LatestTrades {
  Solana(dataset: realtime) {
    DEXTrades(
      where: {
        Block: {
          Slot:{eq:"410127882"}
          Time: {
            since: "2026-03-31T18:39:00Z"
            till:"2026-03-31T18:40:00Z"
          }
        }
        any: [
          {
            Trade: {
              Buy: {
                Currency: {
                  MintAddress: { is: "7phbaH6UeyFJmjdPoyiaQAHX3B1gRtnCVZL7HZNtbonk" }
                }
              }
            }
          }
          {
            Trade: {
              Sell: {
                Currency: {
                  MintAddress: { is: "7phbaH6UeyFJmjdPoyiaQAHX3B1gRtnCVZL7HZNtbonk" }
                }
              }
            }
          }
        ]
      }
    ) {
      Block {
        Time
      }
      Transaction {
        Signature
      }
      Trade {
        Market {
          MarketAddress
        }
        Dex {
          ProtocolName
          ProtocolFamily
        }
        Buy {
          Amount
          AmountInUSD
          Price
          PriceInUSD
          Currency {
            Name
            Symbol
            MintAddress
          }
          Account {
            Address
          }
        }
        Sell {
          Amount
          AmountInUSD
          Price
          PriceInUSD
          Currency {
            Name
            Symbol
            MintAddress
          }
          Account {
            Address
          }
        }
      }
    }
  }
}

Similar queries