getLastTokenPairs

Returns 3 DEX trades by token on Ethereum, where currency smart contract is 0x8c1b…6549 and block time since 2023-10-07, sorted by trade count, highest first: count, smart contract and side smart contract.

By Jose · saved 9 October 2024 · Bitquery API v2

What it returns

Filters

The query

query getLastTokenPairs(
  $dataset: dataset_arg_enum!
  $network: evm_network
  $tokenAddress: String!
  $since: DateTime!
  $limit: Int!
) {
  EVM(dataset: $dataset, network: $network) {
    DEXTradeByTokens(
      orderBy: { descendingByField: "TradeCount" }
      where: {
        Trade: { Currency: { SmartContract: { is: $tokenAddress } } }
        Block: { Time: { since: $since } }
        TransactionStatus: { Success: true }
      }
      limit: { count: $limit }
    ) {
      TradeCount: count
      Trade {
        Dex {
          Pair {
            SmartContract
          }
        }
        Side {
          Currency {
            SmartContract
          }
        }
      }
    }
  }
}

Variables

{
  "dataset": "combined",
  "network": "eth",
  "tokenAddress": "0x8c1bed5b9a0928467c9b1341da1d7bd5e10b6549",
  "since": "2023-10-07T11:18:10.032Z",
  "limit": 3
}

Similar queries