Get price data

Returns the latest 100 DEX trades by token on Ethereum, where currency smart contract is 0xB8c7…DD52, side currency smart contract is 0xdAC1…1ec7 and side type is buy: block time, sum of trade amount, trade price and count.

By Henry · saved 22 April 2025 · run 3 times · Bitquery API v2

What it returns

Filters

The query

query MyQuery {
  EVM(network: eth, dataset: archive) {
    DEXTradeByTokens(
      orderBy: {descendingByField: "Block_timeField"}
      where: {
        Trade: {
          Currency: {SmartContract: {is: "0xB8c77482e45F1F44dE1745F52C74426C631bDD52"}},
          Side: {Currency: {SmartContract: {is: "0xdAC17F958D2ee523a2206206994597C13D831ec7"}}, Type: {is: buy}},
          PriceAsymmetry: {lt: 0.1}
        }
      }
      limit: {count: 100}
    ) {
      Block {
        timeField: Time(interval: {in: hours, count: 1})
      }
      volume: sum(of: Trade_Amount)
      Trade {
        high: Price(maximum: Trade_Price)
        low: Price(minimum: Trade_Price)
        open: Price(minimum: Block_Number)
        close: Price(maximum: Block_Number)
      }
      count
    }
  }
}

Similar queries