get ohlcv by pair address

Returns the latest 1000 DEX trades by token on Solana, where currency mint address is 2zMMhc…uauv, market market address is C6ELog…FYYh and block time till 2025-07-20: block time, sum of trade amount, trade price and count.

By gaurav · saved 21 July 2025 · run 5 times · Bitquery API v2

What it returns

Filters

The query

{
  Solana(dataset: combined) {
    DEXTradeByTokens(
      limit: {count: 1000}
      orderBy: {descendingByField: "Block_Timefield"}
      where: {Trade: {Currency: {MintAddress: {is: "2zMMhcVQEXDtdE6vsFS7S7D5oUodfJHE8vd1gnBouauv"}}, Market: {MarketAddress: {is: "C6ELogyx2aAd4FfMS9YcVQ284sPvD454hNaFGj7WFYYh"}}, PriceAsymmetry: {lt: 0.1}}, Block: {Time: {till: "2025-07-20T08:00:00Z"}}}
    ) {
      Block {
        Timefield: Time(interval: {in: minutes, count: 1})
      }
      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
    }
  }
}

Similar queries