mSOL/SOL OHLC

Returns DEX trades by token on Solana, where currency mint address is mSoLzY…m7So, side currency mint address is So1111…1112 and block time after 2024-10-14, 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 Divyasshree · saved 14 October 2024 · Bitquery API v2

What it returns

Filters

The query

query ($token: String, $time_ago: DateTime) {
  Solana {
    DEXTradeByTokens(
      orderBy: {ascendingByField: "Block_Time"}
      where: {Trade: {Currency: {MintAddress: {is: $token}}, Side: {Currency: {MintAddress: {is: "So11111111111111111111111111111111111111112"}}}}, 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

{
  "token": "mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So",
  "time_ago": "2024-10-14T02:32:32Z"
}

Similar queries