Skip to main content
History configuration enables tracking orderbook snapshots for playback and analysis.

Basic Configuration

import { Orderbook } from '@krono/kit'

export const App = () => {
  return (
    <Orderbook.Root
      config={{
        symbol: 'BTC/USD',
        historyEnabled: true,
        maxHistoryLength: 100
      }}
    >
      {/* Components */}
    </Orderbook.Root>
  )
}

History Options

historyEnabled

Enable historical snapshot tracking. Type: boolean Default: false
<Orderbook.Root
  config={{
    symbol: 'BTC/USD',
    historyEnabled: true
  }}
>
  {/* Components */}
</Orderbook.Root>
Enabling history increases memory usage proportional to maxHistoryLength.

maxHistoryLength

Maximum number of snapshots to retain. Type: number Default: 100
<Orderbook.Root
  config={{
    symbol: 'BTC/USD',
    historyEnabled: true,
    maxHistoryLength: 50
  }}
>
  {/* Components */}
</Orderbook.Root>
SnapshotsMemory Impact
10≈ 50KB
50≈ 250KB
100≈ 500KB
1000≈ 5MB