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.
Import
import { Orderbook } from '@krono/core'
Usage
Computes and returns the current orderbook state based on asksMap and bidsMap.
const data = orderbook.currentData;
console.log(`Spread: ${data.spread}`);
Type
interface OrderbookData {
timestamp: number;
asks: { price: number; volume: number; total: number }[];
bids: { price: number; volume: number; total: number }[];
spread: number;
spreadPct: number;
maxAskTotal: number;
maxBidTotal: number;
maxTotal: number;
}