bitso query

Returns 100 DEX trades by token on Solana, where currency mint address is not 111111…1111 and block time since 2025-01-17: currency symbol, currency name, currency mint address, price in USD, calculate, block time, count and 3 more fields.

By Kshitij Mahajan · saved 19 January 2026 · run 3 times · Bitquery API v2

What it returns

Filters

The query

{
  Solana(network: solana, dataset: realtime) {
    DEXTradeByTokens(
      limit: {count: 100}
      orderBy: [{descendingByField: "traded_volume"}, {descendingByField: "makers"}]
      where: {Transaction: {Result: {Success: true}}, Block: {Time: {since: "2025-01-17T21:00:00Z"}}, Trade: {Currency: {MintAddress: {notIn: ["11111111111111111111111111111111"]}}}}
      limitBy: {by: Trade_Currency_MintAddress, count: 1}
    ) {
      Trade {
        Currency {
          Symbol
          Name
          MintAddress
        }
        price_usd: PriceInUSD(maximum: Block_Time)
        price_1h: PriceInUSD(
          minimum: Block_Time
          if: {Block: {Time: {after: "2025-01-18T20:00:00Z"}}}
        )
        price_4h: PriceInUSD(
          minimum: Block_Time
          if: {Block: {Time: {after: "2025-01-18T17:00:00Z"}}}
        )
        price_24h: PriceInUSD(minimum: Block_Time)
      }
      perct_change_1h: calculate(
        expression: "100 * ( $Trade_price_usd - $Trade_price_1h ) / $Trade_price_1h"
      )
      perct_change_4h: calculate(
        expression: "100 * ( $Trade_price_usd - $Trade_price_4h ) / $Trade_price_4h"
      )
      perct_change_24h: calculate(
        expression: "100 * ( $Trade_price_usd - $Trade_price_4h ) / $Trade_price_24h"
      )
      Block {
        created: Time(minimum: Block_Time)
      }
      makers: count(distinct: Transaction_Signer)
      buyers: count(
        distinct: Transaction_Signer
        if: {Trade: {Side: {Type: {is: buy}}}}
      )
      sellers: count(
        distinct: Transaction_Signer
        if: {Trade: {Side: {Type: {is: sell}}}}
      )
      traded_volume: sum(of: Trade_Side_AmountInUSD)
      buy_volume: sum(
        of: Trade_Side_AmountInUSD
        if: {Trade: {Side: {Type: {is: buy}}}}
      )
      sell_volume: sum(
        of: Trade_Side_AmountInUSD
        if: {Trade: {Side: {Type: {is: sell}}}}
      )
      buys: count(if: {Trade: {Side: {Type: {is: buy}}}})
      sells: count(if: {Trade: {Side: {Type: {is: sell}}}})
      trades_count: count
      supply: joinTokenSupplyUpdates(
        join: left
        TokenSupplyUpdate_Currency_MintAddress: Trade_Currency_MintAddress
      ) {
        TokenSupplyUpdate {
          Supply: PostBalance(maximum: Block_Slot)
          fdv: PostBalanceInUSD(maximum: Block_Slot)
        }
      }
    }
  }
}

Similar queries