getLastTokenPairs

Returns DEX trades by token, sorted by trade count, highest first: count, smart contract and side smart contract.

By Jose · saved 7 October 2024 · run 6 times · Bitquery API v2

What it returns

The query

query getLastTokenPairs(
          $dataset: dataset_arg_enum!
          $network: evm_network
          $tokenAddress: String!
          $since: DateTime!
          $limit: Int!
        ) {
          EVM(dataset: $dataset, network: $network) {
            DEXTradeByTokens(
              orderBy: { descendingByField: "TradeCount" }
              where: {
                Trade: { Currency: { SmartContract: { is: $tokenAddress } } }
                Block: { Time: { since: $since } }
                TransactionStatus: { Success: true }
              }
              limit: { count: $limit }
            ) {
              TradeCount: count
              Trade {
                Dex {
                  Pair {
                    SmartContract
                  }
                }
                Side {
                  Currency {
                    SmartContract
                  }
                }
              }
            }
          }
        }

Similar queries