OHLC historical solana maga token

Returns DEX trades by token on Solana, where currency mint address is 3hFjKf…moon, block time since 2024-12-27 and block time till 2024-12-31, sorted by block time: price in USD, sum of trade side amount in USD and block time.

By gaurav · saved 31 December 2024 · run 28 times · Bitquery API v2

What it returns

Filters

The query

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

Variables

{
  "token": "3hFjKff7if3BkK4fdmGf13KFM7twPCTh92fG8LRkmoon",
  "time_ago": "2024-12-27T00:00:00.000Z",
  "time_before": "2024-12-31T00:23:00.000Z",
  "space": 1,
  "resolution": "minutes"
}

Similar queries