Token pairs

Returns 10 DEX trades by token on Ethereum, where currency smart contract is 0x8ce5…796f, side currency smart contract is not 0x and block date since 2021-08-06, sorted by count, highest first: chain ID, count, currency symbol, smart contract, currency name, side currency name, side smart contract and side currency symbol.

By Nadia · saved 11 August 2023 · run 2 times · Bitquery API v2

What it returns

Filters

The query

query ($network: evm_network, $limit: Int!, $from: String, $address: String, $till: String) {
  EVM(dataset: combined, network: $network) {
    DEXTradeByTokens(
      limit: {count: $limit}
      where: {Block: {Date: {since: $from, till: $till}}, Trade: {Currency: {SmartContract: {is: $address}}, Side: {Currency: {SmartContract: {not: "0x"}}}}}
      orderBy: {descendingByField: "count"}
    ) {
      ChainId
      count
      Trade {
        Currency {
          Symbol
          SmartContract
          Name
        }
        Side {
          Currency {
            Name
            SmartContract
            Symbol
          }
        }
      }
    }
  }
}

Variables

{
  "network": "eth",
  "limit": 10,
  "from": "2021-08-06",
  "till": "2023-08-06",
  "address": "0x8ce578bad214d59aefafb49bd20408e81271796f"
}

Similar queries