count

Returns the latest 300 DEX trades by token on Solana, where side currency mint address is So1111…1112, currency mint address is 87w8kT…pump and block time before 2024-10-31: block time, price in USD and sum of trade side amount in USD.

By peanut · saved 31 October 2024 · run 4 times · Bitquery API v2

What it returns

Filters

The query

query MyQuery($token: String, $count: Int, $time_before: DateTime, $resolution: OLAP_DateTimeIntervalUnits, $space: Int) {
  Solana(dataset: combined) {
    DEXTradeByTokens(
      orderBy: {descendingByField: "Block_Time"}
      limit: {count: $count}
      where: {Trade: {Side: {Amount: {gt: "0"}, Currency: {MintAddress: {is: "So11111111111111111111111111111111111111112"}}}, Currency: {MintAddress: {is: $token}}}, Block: {Time: {before: $time_before}}}
    ) {
      Block {
        Time(interval: {count: $space, in: $resolution})
      }
      Trade {
        high: PriceInUSD(maximum: Trade_PriceInUSD)
        low: PriceInUSD(minimum: Trade_PriceInUSD)
        open: PriceInUSD(minimum: Block_Slot)
        close: PriceInUSD(maximum: Block_Slot)
      }
      volume: sum(of: Trade_Side_AmountInUSD)
    }
  }
}

Variables

{
  "token": "87w8kTUBJRxrs1BB8bQF1WEh3QFpdZA4dap2vUDUpump",
  "count":300,
  "time_before":"2024-10-31T10:14:00Z",
  "space": 1,
  "resolution": "minutes"
}

Similar queries