Dex pair query

Query to get all pairs for given token and chain

Returns 100 DEX trades on Ethereum, where buy currency smart contract is 0xdAC1…1ec7: protocol name, owner address, protocol version, smart contract, pair name, pair symbol, buy currency name and 3 more fields.

By muskbuster · saved 8 March 2024 · run 10 times · Bitquery API v2

What it returns

Filters

The query

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

Variables

{"tokenAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7"}

Similar queries