Skip to main content

Import

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

void