limitus query ohlc

Returns 10000 DEX trades by token on Solana, where currency mint address is jupSoL…x93v, side currency mint address is EPjFWd…Dt1v and block time since 2010-01-01, sorted by block timefield: block time, sum of trade amount, trade price and count.

By Divyasshree · saved 5 September 2025 · Bitquery API v2

What it returns

Filters

The query

query TradingViewFull($dataset: dataset_arg_enum!, $token: String!, $baseTokens: [String!]!, $from: DateTime!, $to: DateTime!, $interval: Int!, $limit: Int!, $offset: Int!, $asymmetry: Float) {
  Solana(dataset: $dataset) {
    DEXTradeByTokens(
      orderBy: {ascendingByField: "Block_Timefield"}
      where: {Trade: {Currency: {MintAddress: {is: $token}}, Side: {Currency: {MintAddress: {in: $baseTokens}}}, PriceAsymmetry: {lt: $asymmetry}}, Block: {Time: {since: $from, till: $to}}, Transaction: {Result: {Success: true}}}
      limit: {count: $limit, offset: $offset}
    ) {
      Block {
        Timefield: Time(interval: {in: seconds, count: $interval})
      }
      volume: sum(of: Trade_Amount)
      Trade {
        high: Price(maximum: Trade_Price)
        low: Price(minimum: Trade_Price)
        open: Price(minimum: Block_Slot)
        close: Price(maximum: Block_Slot)
      }
      count
    }
  }
}

Variables

{
  "dataset": "combined",
  "token": "jupSoLaHXQiZZTSfEWMTRRgpnyFm8f6sZdosWBjx93v",
  "baseTokens": [
    "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
  ],
  "from": "2010-01-01T00:00:00+00:00",
  "to": "2025-01-18T08:24:58.966667+00:00",
  "interval": 300,
  "limit": 10000,
  "offset": 0,
  "asymmetry": 0.05
}

Similar queries