OHLV query

Returns the latest 100 DEX trades by token on Solana, where currency mint address is F65Lpp…Dcbz, side currency mint address is So1111…1112 or 111111…1111 and trade price asymmetry is below 0.1: block time, sum of trade amount, currency name, currency symbol, currency mint address, trade price, market address and 4 more fields.

By gaurav · saved 20 February 2026 · Bitquery API v2

What it returns

Filters

The query

query GetOHLCV($mint: String!, $limit: Int!, $quoteMints: [String!]) {
  Solana {
    DEXTradeByTokens(
      limit: {count: $limit}
      orderBy: {descendingByField: "Block_Timefield"}
      where: {Transaction: {Result: {Success: true}}, Trade: {Currency: {MintAddress: {is: $mint}}, Side: {Currency: {MintAddress: {in: $quoteMints}}}, PriceAsymmetry: {lt: 0.1}}}
    ) {
      Block {
        Timefield: Time(interval: {in: minutes, count: 1})
      }
      volume: sum(of: Trade_Amount)
      Trade {
        Currency {
          Name
          Symbol
          MintAddress
        }
        high: Price(maximum: Trade_Price)
        low: Price(minimum: Trade_Price)
        open: Price(minimum: Block_Slot)
        close: Price(maximum: Block_Slot)
        Market {
          MarketAddress
        }
        Side{
          Currency{
            Name
            Symbol
            MintAddress
          }
        }
      }
      count
    }
  }
}

Variables

{
 
    "mint": "F65LppoKHCRL3qfQWseoo27JSQGZo3Fsa5c2oiVYDcbz",
    "limit": 100,
    "quoteMints": [
      "So11111111111111111111111111111111111111112",
      "11111111111111111111111111111111"
    ]
  
}

Similar queries