trades data

Returns 100 DEX trades by token on Solana, where side currency mint address is So1111…1112 or 111111…1111 and account owner is 7rLLyP…igfM: count, sum of trade side amount in USD, protocol family, protocol name, currency symbol, currency mint address, currency name and 6 more fields.

By gaurav · saved 4 March 2026 · Bitquery API v2

What it returns

Filters

The query

query DexMarketOverview($trader: String!) {
  Solana {
    DEXTradeByTokens(
      limit: {count: 100}
      where: {Trade: {
        Side:{
          Currency:{
            MintAddress:{
              in:["So11111111111111111111111111111111111111112",
              "11111111111111111111111111111111"]
            }
          }
        }
        Account: {Owner: {is: $trader}}}}
    ) {
      txs: count(distinct: Transaction_Signature)
      sell: count(if: {Trade: {Side: {Type: {is: sell}}}})
      buy: count(if: {Trade: {Side: {Type: {is: buy}}}})
      sellAmountUSD: sum(
        of: Trade_Side_AmountInUSD
        if: {Trade: {Side: {Type: {is: sell}}}}
      )
      buyAmountUSD: sum(
        of: Trade_Side_AmountInUSD
        if: {Trade: {Side: {Type: {is: buy}}}}
      )
      makers: count(distinct: Transaction_Signer)
      makers_5min: count(
        distinct: Transaction_Signer
        if: {Block: {Time: {after_relative: {minutes_ago: 5}}}}
      )
      buyers: count(
        distinct: Transaction_Signer
        if: {Trade: {Side: {Type: {is: buy}}}}
      )
      buyers_5min: count(
        distinct: Transaction_Signer
        if: {Trade: {Side: {Type: {is: buy}}}, Block: {Time: {after_relative: {minutes_ago: 5}}}}
      )
      sellers: count(
        distinct: Transaction_Signer
        if: {Trade: {Side: {Type: {is: sell}}}}
      )
      sellers_5min: count(
        distinct: Transaction_Signer
        if: {Trade: {Side: {Type: {is: sell}}}, Block: {Time: {after_relative: {minutes_ago: 5}}}}
      )
      trades: count
      trades_5min: count(if: {Block: {Time: {after_relative: {minutes_ago: 5}}}})
      traded_volume: sum(of: Trade_Side_AmountInUSD)
      traded_volume_5min: sum(
        of: Trade_Side_AmountInUSD
        if: {Block: {Time: {after_relative: {minutes_ago: 5}}}}
      )
      buy_volume: sum(
        of: Trade_Side_AmountInUSD
        if: {Trade: {Side: {Type: {is: buy}}}}
      )
      buy_volume_5min: sum(
        of: Trade_Side_AmountInUSD
        if: {Trade: {Side: {Type: {is: buy}}}, Block: {Time: {after_relative: {minutes_ago: 5}}}}
      )
      sell_volume: sum(
        of: Trade_Side_AmountInUSD
        if: {Trade: {Side: {Type: {is: sell}}}}
      )
      sell_volume_5min: sum(
        of: Trade_Side_AmountInUSD
        if: {Trade: {Side: {Type: {is: sell}}}, Block: {Time: {after_relative: {minutes_ago: 5}}}}
      )
      buys: count(if: {Trade: {Side: {Type: {is: buy}}}})
      buys_5min: count(
        if: {Trade: {Side: {Type: {is: buy}}}, Block: {Time: {after_relative: {minutes_ago: 5}}}}
      )
      sells: count(if: {Trade: {Side: {Type: {is: sell}}}})
      sells_5min: count(
        if: {Trade: {Side: {Type: {is: sell}}}, Block: {Time: {after_relative: {minutes_ago: 5}}}}
      )
      Trade {
        Dex {
          ProtocolFamily
          ProtocolName
        }
        Currency {
          Symbol
          MintAddress
          Name
        }
        PriceInUSD(maximum: Block_Time)
        Price(maximum: Block_Time)
        Side {
          Currency {
            Symbol
            MintAddress
            Name
          }
        }
        Market {
          MarketAddress
        }
      }
    }
  }
}

Variables

{
  "trader": "7rLLyPshmbCmHVeNMbenPfY4drhpwXAkb5x66tSgigfM"
}

Similar queries