Description
orderbook is a Python package with a fast L2 and L3 order book data structure, written in C. An order book holds the bids and asks for a market, and this package stores and updates both sides efficiently. You can reach each side as bids or asks, using keys or attributes. A max_depth setting limits how many levels are visible, and an optional strict mode deletes the levels beyond that depth as the book updates, which caps memory use. The package can also compute the CRC32 checksum that several exchanges publish for the top of the book, so a client can detect a book that has fallen out of sync. Checksum formats are provided for Kraken, OKX and OKCoin, Bitget and Bitfinex. The to_dict method can convert keys and values between types while it builds the dictionary. You install it with uv or pip, Python 3.13 or later is supported, and a C compiler is needed when installing from a checkout. The source is public on GitHub.…
Highlights
- Fast L2 and L3 order book written in C
- Max depth limit with optional strict mode
- CRC32 checksums for exchange order books
- Type conversion when exporting to a dict
- Supports Python 3.13 and later
Ratings & Reviews
No ratings yet
Be the first to rate Orderbook.
People also visit
Orderbook FAQ
What is orderbook?
A Python package that stores the bids and asks for a market, known as an L2 or L3 order book, in a fast data structure written in C.
How do I install it?
Run uv add order-book, or uv pip install order-book. From a checkout of the repository, run uv pip install . and make sure a C compiler is available.
Which exchanges have checksum support?
The README lists Kraken, OKX and OKCoin, Bitget and Bitfinex as formats you can set with checksum_format.
What does max_depth do?
It limits how many levels are visible. By default, deeper levels are still kept but hidden. With max_depth_strict set to True they are deleted as the book updates, which caps memory use.
Is it open source?
The source is public on GitHub at bmoscon/orderbook.
What are the best Orderbook alternatives?
Popular alternatives to Orderbook include Cryptofeed, Lean and Algo.Py. See all Orderbook alternatives





