buys and sells

Returns DEX trades by token on BNB Chain, where currency smart contract is 0x1198…3625 or 0xe556…4444, block time since 2025-06-18 and block time till 2025-06-18: smart contract and count.

By gaurav · saved 18 June 2025 · run 1 time · Bitquery API v2

What it returns

Filters

The query

query MyQuery($currency: [String!]) {
  EVM(network: bsc, dataset: combined) {
    DEXTradeByTokens(
      where: {Trade: {Currency: {SmartContract: {in: $currency}}}, TransactionStatus: {Success: true}, Block: {Time: {since: "2025-06-18T01:00:00Z", till: "2025-06-18T02:00:00Z"}}}
    ) {
      Trade {
        Currency {
          SmartContract
        }
      }
      count
      buys: count(if: {Trade: {Side: {Type: {is: sell}}}})
      sells: count(if: {Trade: {Side: {Type: {is: buy}}}})
    }
  }
}

Variables

{
  "currency": [
    "0x1198d01f51b3442a9cd72fcc4ba79306ba053625",
    "0xe5567b38b51afab470d495746a83d263efeb4444"
  ]
}

Similar queries