Get Uniswap V2 pair address

Returns one DEX trade on Ethereum, where buy currency smart contract is 0xC02a…6Cc2 and sell currency smart contract is 0x5149…86CA: pair name, pair symbol and smart contract.

By Omkar Acharekar · saved 30 May 2023 · run 4 times · Bitquery API v2

What it returns

Filters

The query

{
  EVM(dataset: combined, network: eth) {
    DEXTrades(
      limit: {count: 1}
      where: {Trade: {Buy: {Currency: {SmartContract: {is: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"}}}, Sell: {Currency: {SmartContract: {is: "0x514910771AF9Ca656af840dff83E8264EcF986CA"}}}}}
    ) {
      Trade {
        Dex {
          Pair {
            Name
            Symbol
            SmartContract
          }
        }
      }
    }
  }
}

Similar queries