websocket solana ohlc

Streams the latest 50 DEX trades by token on Solana as they happen, where side currency mint address is 111111…1111, So1111…1112 or 4 more: quantile of trade price in USD, sum of trade side amount in USD, block time, transaction signature, market address, protocol family, protocol name and 9 more fields.

By gaurav · saved 16 May 2025 · run 6 times · Bitquery API v2

What it returns

Filters

The subscription

subscription LatestTrades {
  Solana {
    DEXTradeByTokens(
      orderBy: {descending: Block_Time}
      limit: {count: 50}
      where: {Transaction: {Result: {Success: true}},
        Trade: {
          Side: {Currency: {MintAddress: {in: ["11111111111111111111111111111111",
            "So11111111111111111111111111111111111111112", 
            "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", 
            "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
            "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN", 
            "EKpQGSJtjMFqKZ9KQanSqYXRcF8fBopzLHYxdM65zcjm"]}}}}}
    ) {
      min: quantile(of: Trade_PriceInUSD, level: 0.05)
      max: quantile(of: Trade_PriceInUSD, level: 0.95)
      volume: sum(of: Trade_Side_AmountInUSD)
      Block {
        Time
      }
      Transaction {
        Signature
      }
      Trade {
        Market {
          MarketAddress
        }
        Dex {
          ProtocolFamily
          ProtocolName
        }
        AmountInUSD
        PriceInUSD
        close: PriceInUSD
        Amount
        Side {
          Type
          Currency {
            Symbol
            MintAddress
            Name
          }
          AmountInUSD
          Amount
        }
      }
    }
  }
}

Variables

{
  "network": "solana",
  "usdc": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  "usdt": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
  "wsol": "So11111111111111111111111111111111111111112",
  "dataset": "realtime",
  "time_ago": "2025-05-13T13:03:54Z",
  "interval": 60,
  "from": "2025-05-16T01:05:00.000Z",
  "to": "2025-05-16T07:05:00.000Z"
}

Similar queries