Skip to main content
The asset pairs configuration supports controlling how Orderbook.Root fetches and manages trading pair metadata from the Kraken API.

Basic Configuration

import { Orderbook } from '@krono/kit'

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

Configuration Options

autoFetch

Automatically fetch asset pair metadata when the component mounts. Type: boolean Default: false
<Orderbook.Root
  config={{
    symbol: 'BTC/USD',
    assetPairs: {
      autoFetch: true
    }
  }}
>
  {/* Components */}
</Orderbook.Root>

topN

Limit stored asset pairs to the top N pairs. Type: number Default: undefined (all pairs)
<Orderbook.Root
  config={{
    symbol: 'BTC/USD',
    assetPairs: {
      topN: 50,
      autoFetch: true
    }
  }}
>
  {/* Components */}
</Orderbook.Root>

debug

Enable logging for asset pairs operations. Type: boolean Default: false
<Orderbook.Root
  config={{
    symbol: 'BTC/USD',
    assetPairs: {
      autoFetch: true,
      debug: true
    }
  }}
>
  {/* Components */}
</Orderbook.Root>

Performance

Fine-tune update frequency with throttling and debouncing options.

History

Enable snapshot tracking and playback features for historical analysis and debugging.

Orderbook

Configure the core orderbook behavior.

Overview

See all configuration options in one place with complete TypeScript types and defaults.