seconds oHLC realtime solana example

Streams DEX trades by token on Solana as they happen, where currency mint address is 3NZ9JM…qmJh and side currency mint address is EPjFWd…Dt1v: quantile of trade price in USD, sum of trade side amount in USD, market address, protocol name, protocol family, price in USD, side type and 4 more fields.

By Divyasshree · saved 23 June 2025 · run 9 times · Bitquery API v2

What it returns

Filters

The subscription

subscription LatestTrades($token: String) {
  Solana {
    DEXTradeByTokens(
      where: {Transaction: {Result: {Success: true}}, Trade: {Currency: {MintAddress: {is: $token}}, Side: {Currency: {MintAddress: {is: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}}}}
    ) {
      min: quantile(of: Trade_PriceInUSD, level: 0.05)
      max: quantile(of: Trade_PriceInUSD, level: 0.95)
      volume: sum(of: Trade_Side_AmountInUSD)
      Trade {
        Market {
          MarketAddress
        }
        Dex {
          ProtocolName
          ProtocolFamily
        }
        close: PriceInUSD
        Side {
          Type
          Currency {
            Symbol
            MintAddress
            Name
          }
        }
      }
      Block {
        Time(interval: {count: 1, in: seconds})
      }
    }
  }
}

Variables

{
  "token": "3NZ9JMVBmGAqocybic2c7LQCJScmgsAZ6vQqTDzcqmJh"
}

Similar queries