Get pools for a token [parameterised]

Returns DEX trades on Ethereum, where buy currency smart contract is 0x9609…1b2c: owner address, protocol family, protocol name, protocol version, smart contract, buy currency symbol, buy currency name and 4 more fields.

By gaurav · saved 30 December 2023 · run 11 times · Bitquery API v2

What it returns

Filters

The query

query ($network: evm_network, $token: String!) {
  EVM(dataset: combined, network: $network) {
    DEXTrades(
      limitBy: {by: [Trade_Buy_Currency_SmartContract, Trade_Sell_Currency_SmartContract], count: 1}
      where: {Trade: {Buy: {Currency: {SmartContract: {is: $token}}}}}
    ) {
      Trade {
        Dex {
          OwnerAddress
          ProtocolFamily
          ProtocolName
          ProtocolVersion
          SmartContract
          Pair {
            SmartContract
          }
        }
        Buy {
          Currency {
            Symbol
            Name
            SmartContract
          }
        }
        Sell {
          Currency {
            Symbol
            SmartContract
            Name
          }
        }
      }
    }
  }
}

Variables

{
  "token": "0x9609b540e5dedddb147abbf9812ade06b1e61b2c",
  "network": "eth"
}

Similar queries