Skip to main content
Subscriptions (WebSockets) require a Growth or Enterprise plan. Learn more.
pairAddress
String!
required
The contract address for the pair.
networkId
Int!
required
The network ID the pair is deployed on.
pairId
String!
required
The ID for the pair (pairAddress:networkId).
timestamp
Int!
required
The unix timestamp for the new bar.
eventSortKey
String!
required
The sortKey for the bar (blockNumber#transactionIndex#logIndex, zero padded). For example, 0000000016414564#00000224#00000413.
Price data broken down by resolution.
quoteToken
The quote token within the pair.
quoteTokenAddress
String!
required
The address of the token being quoted
This subscription is Solana only. Unconfirmed bar data reflects transactions that have not yet been finalized on-chain. Prices may change once transactions are confirmed.
subscription {
  onUnconfirmedBarsUpdated(
    pairId: "BGm1tav58oGcsQJehL9WXBFXF7D27vZsKefj4xJKD5Y:1399811149"
    quoteToken: token0
  ) {
    pairAddress
    pairId
    networkId
    timestamp
    quoteToken
    quoteTokenAddress
    eventSortKey
    aggregates {
      r1S {
        o
        h
        l
        c
        v
      }
      r5S {
        o
        h
        l
        c
        v
      }
      r1 {
        o
        h
        l
        c
        v
      }
    }
  }
}
Example Response
{
  "data": {
    "onUnconfirmedBarsUpdated": {
      "pairAddress": "BGm1tav58oGcsQJehL9WXBFXF7D27vZsKefj4xJKD5Y",
      "pairId": "BGm1tav58oGcsQJehL9WXBFXF7D27vZsKefj4xJKD5Y:1399811149",
      "networkId": 1399811149,
      "timestamp": 1769562022,
      "quoteToken": "token0",
      "quoteTokenAddress": "So11111111111111111111111111111111111111112",
      "eventSortKey": "0000000396377781#00000215#00000000",
      "aggregates": {
        "r1S": {
          "o": 127.164855074537,
          "h": 127.164855074537,
          "l": 126.907175954793,
          "c": 126.907175954793,
          "v": 0
        },
        "r5S": {
          "o": 127.164855074537,
          "h": 127.164855074537,
          "l": 126.907175954793,
          "c": 126.907175954793,
          "v": 0
        },
        "r1": {
          "o": 127.040335178182,
          "h": 127.164951026532,
          "l": 126.907175954793,
          "c": 126.907175954793,
          "v": 3
        }
      }
    }
  }
}

Usage Guidelines

  • Subscribe using pairId (format pairAddress:networkId) and quoteToken (token0 or token1)
  • Solana only — this subscription streams bar data from unconfirmed (pending) transactions for the lowest possible latency
  • Bar data is simplified OHLCV (o, h, l, c, v) without the usd/token split or trade metrics available in onBarsUpdated
  • Supports sub-second resolutions (r1S, r5S, r15S) in addition to standard resolutions (r1 through r1D)
  • Use this for latency-sensitive applications where seeing unconfirmed price movement is more important than finality

Troubleshooting Tips

Use onUnconfirmedBarsUpdated when you need the fastest possible price updates on Solana and can tolerate the data being unconfirmed. Use onBarsUpdated for confirmed, finalized bar data with richer trade metrics (buyers, sellers, buy/sell volume, liquidity). Most charting applications should use onBarsUpdated.
Yes. Since the data is from unconfirmed transactions, the final confirmed values may differ. Transactions can fail, be reordered, or be dropped. Treat unconfirmed bars as provisional.
Unconfirmed bars only provide OHLCV data (o, h, l, c, v) directly on each resolution — there’s no usd/token split and no trade breakdown metrics like buyers, sellers, or buyVolume. This is because full trade analysis requires confirmed transaction data.
No. Unconfirmed bar data is currently only available on Solana (networkId: 1399811149).