chart

Returns the latest 20 DEX trades by token on Base, where currency smart contract is 0xca73…e679, side currency smart contract is 0x4200…0006 and DEX owner address is 0x3312…FDfD: block time, sum of trade amount and price in USD.

By prisma · saved 3 February 2025 · run 7 times · Bitquery API v2

What it returns

Filters

The query

query ($network: evm_network, $baseCurrency: String, $quoteCurrency: String, $from: DateTime, $till: DateTime) {
  EVM(dataset: combined, network: $network) {
    DEXTradeByTokens(
      limit: {count: 20}
      orderBy: {descendingByField: "Block_Time"}
      where: {Trade: {Currency: {SmartContract: {is: $baseCurrency}}, Side: {Currency: {SmartContract: {is: $quoteCurrency}}}, Price: {gt: 0}, Dex: {OwnerAddress: {is: "0x33128a8fC17869897dcE68Ed026d694621f6FDfD"}}}, Block: {Time: {since: $from, till: $till}}}
    ) {
      Block {
        Time(interval: {in: minutes, count: 10})
      }
      volume: sum(of: Trade_Amount)
      Trade {
        close: PriceInUSD(maximum: Block_Number)
      }
    }
  }
}

Variables

{
  "network": "base",
  "baseCurrency": "0xca73ed1815e5915489570014e024b7ebe65de679",
  "quoteCurrency": "0x4200000000000000000000000000000000000006",
  "from": "2025-01-01T05:03:08.228Z",
  "till": "2025-02-02T05:03:08.228Z"
}

Similar queries