s-OHLCV-test

OHLC historical solana at specific time OHLC historical solana at specific time possibly working works histroical or realtime up to 2 days ago. works for minute thing only

By Popqwe · saved 11 March 2025 · Bitquery API v2

What it returns

Filters

The query

query TradingView($token: String, $dataset: dataset_arg_enum, $time_ago: DateTime, $interval: Int) {
  Solana(dataset: $dataset, aggregates: no) {
    DEXTradeByTokens(
      orderBy: {descendingByField: "Block_Time"}
      where: {Trade: {Currency: {MintAddress: {is: $token}}, Side: {Currency: {MintAddress: {in: ["11111111111111111111111111111111", "So11111111111111111111111111111111111111112", "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB", "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN", "EKpQGSJtjMFqKZ9KQanSqYXRcF8fBopzLHYxdM65zcjm"]}}}}, Block: {Time: {after: $time_ago}}, Transaction: {Result: {Success: true}}}
      limitBy: {count: 10}
    ) {
      Block {
        Time(interval: {count: $interval, in: seconds})
      }
      min: quantile(of: Trade_PriceInUSD, level: 0.05)
      max: quantile(of: Trade_PriceInUSD, level: 0.95)
      close: Trade {
        PriceInUSD(maximum: Block_Slot)
      }
      open: Trade {
        PriceInUSD(minimum: Block_Slot)
      }
      volume: sum(of: Trade_Side_AmountInUSD)
    }
  }
}

Variables

{
  "dataset": "realtime",
  "interval": 1,
  "time_ago": "2025-03-11T11:00:00Z",
  "token": "6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN"
}

Similar queries