BNB Token Buys

Returns DEX trades on BNB Chain: buy amount, buy amount in USD, sell amount, sell amount in USD, buy currency symbol, sell currency symbol and transaction hash.

By cai · saved 31 July 2025 · Bitquery API v2

What it returns

The query

query TradesInWindow($contract: String!, $fromTime: ISODateTime!, $toTime: ISODateTime!) {
  EVM(network: bsc, dataset: combined) {
    DEXTrades(
      where: {
        TransactionStatus: { Success: true },
        Block: { Time: { since: $fromTime, till: $toTime } },
        Trade: {
          or: [
            { Buy: { Currency: { SmartContract: { is: $contract } } } },
            { Sell: { Currency: { SmartContract: { is: $contract } } } }
          ]
        }
      }
    ) {
      Trade {
        Buy { Amount, AmountInUSD }
        Sell { Amount, AmountInUSD }
        Currency {
          Buy { Currency { Symbol } }
          Sell { Currency { Symbol } }
        }
      }
      Transaction { Hash }
    }
  }
}

Similar queries