> ## 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.

# OnHistoryUpdate

> Subscribe to history buffer changes.

## Usage

Triggers whenever a new snapshot is added to the historical data array.

```ts theme={null}
orderbook.onHistoryUpdate((history) => {
  console.log('History length:', history.length)
})
```

## Parameters

### callback

`(history: OrderbookData[]) => void`

The function to execute when new history updates.

## Return Type

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