OHLC historical solana - MCI v3

Working OHCL for specified time range

Returns one DEX trade by token on Solana, where currency mint address is CzLSuj…pump, block time after 2024-11-29 and block time before 2024-11-30, sorted by block timefield: trade price, block time, sum of trade amount and count.

By masten · saved 2 December 2024 · run 7 times · Bitquery API v2

What it returns

Filters

The query

query MyQuery($token: String, $time_ago: DateTime, $time_since: DateTime, $time_before: DateTime) {
  Solana(dataset: archive) {
    DEXTradeByTokens(
      limit: {count: 1}
      orderBy: {ascendingByField: "Block_Timefield"}
      where: {Block: {Time: {after: $time_ago, before: $time_before, since: $time_since}}, Trade: {Currency: {MintAddress: {is: $token}}}}
    ) {
      Trade {
        open: Price(minimum: Block_Slot)
        high: Price(maximum: Trade_Price)
        low: Price(minimum: Trade_Price)
        close: Price(maximum: Block_Slot)
      }
      Block {
        Timefield: Time(interval: {count: 1, in: days})
      }
      volume: sum(of: Trade_Amount)
      count
    }
  }
}

Variables

{
  "token": "CzLSujWBLFsSjncfkh59rUFqvafWcY5tzedWJSuypump",
  "time_ago": "2024-11-29T00:00:00Z",
  "time_since": "2024-11-01T00:00:00Z",
  "time_before": "2024-11-30T23:59:59Z"
}

Similar queries