# Crypto-toolbox/HFT-Orderbook

Limit Order Book for high-frequency trading (HFT), as described by WK Selph, implemented in Python3 and C

Repository: https://github.com/Crypto-toolbox/HFT-Orderbook
Canonical: https://ross.abutalabs.com/products/hft-orderbook
Language: C
License: MIT
License Family: permissive
Topics: python3, high-frequency-trading, order-management, orderbook, bst, avl-tree, doubly-linked-list, self-balancing-trees, limit-order-book, c
Last push: 2024-11-13T19:41:46+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3325, "days_push": 658, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1383, forks 313 (observed 2026-08-28T04:04:34.384976+00:00)

## What it is
A limit order book implementation for high-frequency trading, based on WK Selph's design, written in C with a Python3 interface. It supports O(1) add, cancel, and execute operations using self-balancing trees of limit prices with doubly linked lists of orders.

## Use cases
- build a fast limit order book for backtesting
- simulate order book add/cancel/execute events
- track best bid and offer in real time
- query volume between price levels
- study HFT order book data structures
- prototype trading strategies needing order book state

## When to choose
- you need a performant limit order book in C or Python
- you want the classic WK Selph O(1) order book design
- you are backtesting or researching HFT strategies

## When to avoid
- you need a production exchange matching engine with compliance features
- you need network connectivity to live exchanges
- you need a maintained framework with extensive documentation and support

## Facets
- artifact type: library
- maturity: maintenance
- function: trading, parser
- domain: fintech, performance
- platform: windows, c, python
- tags: limit-order-book, high-frequency-trading, avl-tree, doubly-linked-list, orderbook, hft, data-structures, algorithms, linux, macos

## Member repositories
- Crypto-toolbox/HFT-Orderbook (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:34.384976+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:40:00.307934+00:00, confidence not recorded.
  - readme: https://github.com/Crypto-toolbox/HFT-Orderbook (fetched 2026-08-28T04:04:34.384976+00:00, sha 62a7ed7766db)
- Data as of 2026-08-30T08:39:29.467469+00:00.
