Price of token on a given day

Returns one DEX trade by token on Ethereum, where currency smart contract is 0x7fc6…dae9, side currency smart contract is 0xC02a…6Cc2 and block date is 2025-01-01, sorted by block time: average of trade price in USD.

By gaurav · saved 17 March 2025 · Bitquery API v2

What it returns

Filters

The query

{
  EVM(dataset: combined, network: eth) {
    DEXTradeByTokens(
      where: {Block: {Date: {is: "2025-01-01"}}, Trade: {Currency: {SmartContract: {is: "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9"}}, Side: {Currency: {SmartContract: {is: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"}}}}}
      limit: {count: 1}
      orderBy: {ascending: Block_Time}
    ) {
      average(of: Trade_PriceInUSD)
    }
  }
}

Similar queries