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 0x5283…8b44: 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 2 times · Bitquery API v2

What it returns

Filters

The query

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

Variables

{"ownerAddress": "0x5283d291dbcf85356a21ba090e6db59121208b44"}

Similar queries