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

# OnData

> Subscribe to processed orderbook updates.

## Import

```ts theme={null}
import { Orderbook } from '@krono/core'
```

## Usage

This is the main listener for UI updates. It emits data after it has passed through the internal pipeline (throttling and debouncing).

```ts theme={null}
orderbook.onData((data) => {
  console.log('Processed Price:', data.asks[0]?.price)
})
```

## Parameters

### callback

`(data: OrderbookData) => void`

The function to execute when new data is available.

## Return Type

```ts theme={null}
void
```
