subscription solana pairs

Returns DEX trades by token on Solana, where side currency mint address is So1111…1112, currency mint address is 8WnQQR…DsWo and block time after 2024-10-03, sorted by block time: block time, quantile of trade price in USD, average of trade price in USD and sum of trade side amount.

By Nadia · saved 4 October 2024 · run 1 time · Bitquery API v2

What it returns

Filters

The query

query ($token: String, $base: String, $time_ago: DateTime) {
  Solana {
    DEXTradeByTokens(
      orderBy: {ascendingByField: "Block_Time"}
      where: {Trade: {Side: {Amount: {gt: "0"}, Currency: {MintAddress: {is: $token}}}, Currency: {MintAddress: {is: $base}}}, Block: {Time: {after: $time_ago}}}
    ) {
      Block {
        Time(interval: {count: 5, in: minutes})
      }
      min: quantile(of: Trade_PriceInUSD, level: 0.05)
      max: quantile(of: Trade_PriceInUSD, level: 0.95)
      close: average(of: Trade_PriceInUSD)
      open: average(of: Trade_PriceInUSD)
      volume: sum(of: Trade_Side_Amount)
    }
  }
}

Variables

{
  "base": "8WnQQRbuEZ3CCDbH5MCVioBbw6o75NKANq9WdPhBDsWo",
  "token": "So11111111111111111111111111111111111111112",
  "time_ago": "2024-10-03T21:06:01Z"
}

Similar queries