WEPE Historical Data

Returns 10 DEX trades by token on Ethereum, where currency smart contract is 0xccb3…bf10, side currency smart contract is 0xC02a…6Cc2 and block time after 2025-01-01, sorted by block OHLC interval: block time, trade price, currency name, currency symbol, side currency name, side currency symbol, count and 2 more fields.

By Daniel Koffler · saved 1 March 2025 · run 6 times · Bitquery API v2

What it returns

Filters

The query

{
  EVM(network: eth, dataset: archive) {
    DEXTradeByTokens(
      limit: {count: 10}
      where: {Block: {Time: {after: "2025-01-01T00:00:00Z", before: "2025-02-28T23:59:59Z"}}, Trade: {Currency: {SmartContract: {is: "0xccb365d2e11ae4d6d74715c680f56cf58bf4bf10"}}, Side: {Currency: {SmartContract: {is: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"}}}}}
      orderBy: {ascendingByField: "Block_OHLC_interval"}
    ) {
      Block {
        OHLC_interval: Time(interval: {in: minutes, count: 1})
      }
      Trade {
        Price_High: Price(maximum: Trade_Price)
        Price_Low: Price(minimum: Trade_Price)
        Price_Open: Price(minimum: Block_Number)
        Price_Close: Price(maximum: Block_Number)
        Currency_From: Currency {
          Name
          Symbol
        }
        Currency_To: Side {
          Currency {
            Name
            Symbol
          }
        }
      }
      Total_Trades: count
      Total_Buys: count(if: {Trade: {Side: {Type: {is: sell}}}})
      Total_Sells: count(if: {Trade: {Side: {Type: {is: buy}}}})
      Volume: sum(of: Trade_Amount)
      Volume_USD: sum(of: Trade_Side_AmountInUSD)
    }
  }
}

Similar queries