> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mobula.io/llms.txt
> Use this file to discover all available pages before exploring further.

# onTokenBarsUpdated

> Live-streamed multi-resolution OHLCV bar updates for a token.

<Note>
  Subscriptions use `wss://graphql.mobula.io/graphql` with the `graphql-transport-ws` protocol. `wss://graphql.mobula.io/graphql/subscriptions` is also supported for backwards compatibility.
</Note>

### Returns

<ResponseField name="onTokenBarsUpdated" type="OnTokenBarsUpdatedResponse!">
  Bar update payload pushed on each swap on the token. See [OnTokenBarsUpdatedResponse](/api-reference/graphql/types/OnTokenBarsUpdatedResponse).
</ResponseField>

### Arguments

<ResponseField name="tokenId" type="String">
  Token identifier in `<tokenAddress>:<networkId>` form. Required at runtime — omitting it returns `BAD_USER_INPUT`.
</ResponseField>

<ResponseField name="commitmentLevel" type="[BarCommitmentLevel!]">
  Allow-list of commitment levels to receive. Defaults to `[Confirmed]`. See [BarCommitmentLevel](/api-reference/graphql/types/BarCommitmentLevel).
</ResponseField>

<ResponseField name="networkId" type="Int">
  Network id hint (currently redundant — derived from `tokenId`).
</ResponseField>

### Example

```graphql theme={null}
subscription OnTokenBarsUpdated {
  onTokenBarsUpdated(
    tokenId: "So11111111111111111111111111111111111111112:1399811149"
    commitmentLevel: [Confirmed]
  ) {
    tokenAddress
    networkId
    commitmentLevel
    statsType
    eventSortKey
    aggregates {
      r5  { t usd { o h l c v volume buys sells } }
      r60 { t usd { o h l c v volume } }
      r1D { t usd { o h l c v volume } }
    }
  }
}
```
