Skip to main content
A project built for the Kraken Forge Hackathon (Track #2: Orderbook Visualizer) by Fabian Piper
Krono Hero Light

Krono

Krono provides a complete solution for visualizing cryptocurrency orderbook data from Kraken’s WebSocket API. Built with a modular architecture, it consists of three packages:
For a deeper look at Krono’s architecture, such as the update pipeline and design patterns, see the Architecture guide

Features

  • Ready-to-use components: Pre-built UI based on shadcn/ui and Tailwind CSS for orderbook visualization, configuration panels, and asset pair selection
  • Time travel playback: Replay historical orderbook states with frame-accurate precision for debugging, backtesting, and market analysis
  • High-performance WebSocket: Optimized Kraken WebSocket integration with intelligent throttling and debouncing to keep your UI responsive
  • 7+ React hooks: Composable hooks for orderbook data, subscriptions, and state management with full control over data flow
  • Framework-agnostic: Core package works with any framework, including React, Vue, Svelte, Angular, or vanilla JavaScript
  • TypeScript first: End-to-end type safety with excellent IDE autocomplete and compile-time error detection

Usage

Use the following code snippet to get a live orderbook with time travel capabilities:
import {
  formatDigits,
  formatPrice,
  Orderbook,
  OrderbookControls,
  OrderbookTable,
} from '@krono/kit';

export function OrderbookPanel() {
  return (
      <Orderbook.Root config={{ symbol: 'BTC/USD' }}>
        <Orderbook.Panel
          renderTable={(props) => (
            <OrderbookTable.Root
              columns={{
                total: {
                  label: 'Total',
                  children: ({ value }) => formatDigits(value.total),
                },
                quantity: {
                  label: 'Quantity',
                  children: ({ value }) => formatDigits(value.quantity),
                },
                price: {
                  label: 'Price',
                  className: 'font-semibold',
                  children: ({ value }) => formatPrice(value.price, 4),
                },
              }}
              {...props}
            />
          )}
        >
          <OrderbookControls.Root>
            <OrderbookControls.LiveBadge />
            <OrderbookControls.Toolbar>
              <OrderbookControls.PlaybackButtons />
              <OrderbookControls.Timeline />
            </OrderbookControls.Toolbar>
          </OrderbookControls.Root>
        </Orderbook.Panel>
    </Orderbook.Root>
  );
}
The examples above assume local packages. Krono is not yet available on the npm registry. See the development guide for setup instructions.

Browser Support

Krono works in all modern browsers that support WebSocket and ES2020+ features:
  • Chrome/Edge 90+
  • Firefox 88+
  • Safari 14+
  • Modern mobile browsers (iOS Safari 14+, Chrome Mobile)

What’s Next?