WEPE Historical Data

Returns the latest 10 DEX trades by token and balance updates on Ethereum, where currency smart contract is 0xccb3…bf10, side currency smart contract is 0xc02a…6cc2 and block time after 2025-01-01: block time, price in USD, currency name, currency symbol, smart contract, side currency name, side currency symbol and 6 more fields.

By Daniel Koffler · saved 1 March 2025 · Bitquery API v2

What it returns

Filters

The query

{
  EVM(network: eth, dataset: combined) {
    Price_Data: DEXTradeByTokens(
      limit: {count: 10}
      where: {Block: {Time: {after: "2025-01-01T00:00:00Z"}}, Trade: {Currency: {SmartContract: {is: "0xccb365d2e11ae4d6d74715c680f56cf58bf4bf10"}}, Side: {Currency: {SmartContract: {is: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}}}}}
      orderBy: {descendingByField: "Block_Time"}
    ) {
      Block {
        Time(interval: {count: 5, in: minutes})
      }
      Trade {
        Price_High: PriceInUSD(maximum: Trade_PriceInUSD)
        Price_Low: PriceInUSD(minimum: Trade_PriceInUSD)
        Price_Open: PriceInUSD(minimum: Block_Number)
        Price_Close: PriceInUSD(maximum: Block_Number)
        Currency_From: Currency {
          Name
          Symbol
          SmartContract
        }
        Currency_To: Side {
          Currency {
            Name
            Symbol
            SmartContract
          }
        }
      }
      Total_Trades: count
      Total_Buys: count(if: {Trade: {Side: {Type: {is: sell}}}})
      Total_Sells: count(if: {Trade: {Side: {Type: {is: buy}}}})
      Total_Sellers: uniq(of: Trade_Seller)
      Total_Buyers: uniq(of: Trade_Buyer)
      Volume: sum(of: Trade_AmountInUSD)
    }
    BalanceUpdates(
      where: {Currency: {SmartContract: {is: "0xccb365d2e11ae4d6d74715c680f56cf58bf4bf10"}}, Block: {Time: {after: "2025-01-01T00:00:00Z"}}}
      orderBy: {descending: Block_Time}
      limit: {count: 10}
    ) {
      Block {
        Time(interval: {count: 5, in: minutes})
      }
      Balance: uniq(of: BalanceUpdate_Address)
    }
  }
}

Similar queries