TokenPair

Returns one DEX trade on Ethereum, sorted by count, highest first: buy currency symbol, buy currency name, buy smart contract, sell currency symbol, sell currency name, sell smart contract, smart contract and count.

By Jeanc · saved 29 November 2023 · run 2 times · Bitquery API v2

What it returns

The query

query tokenPairQuery($tokenAddress: String!) {
  EVM(dataset: combined, network: eth) {
    DEXTrades(
      where: {Trade: {Buy: {Currency: {SmartContract: {is: $tokenAddress}}}}}
      limit: {count: 1}
      limitBy: {by: Trade_Sell_Currency_SmartContract, count: 1}
      orderBy: {descendingByField: "count"}
    ) {
      Trade {
        Buy {
          Currency {
            Symbol
            Name
            SmartContract
          }
        }
        Sell {
          Currency {
            Symbol
            Name
            SmartContract
          }
        }
        Dex {
          Pair {
            SmartContract
          }
        }
      }
      count
    }
  }
}

Similar queries