How enewhuis/liquibook works
Liquibook is a header-only C++ order-matching engine. Its principal workflow accepts order submissions and cancel/replace requests, matches compatible orders, and reports outcomes to the calling application. Optional stop, all-or-none, and immediate-or-cancel behavior is handled during matching; depth tracking aggregates open limit orders and can notify listeners of depth and BBO changes. The repository also documents manual order-entry and market-data publisher/subscriber examples. Some matching and example wiring is unsampled, so the graph omits uncertain internal links.
Main entry points: order_book.h Order book · depth_order_book.h Depth order book · simple_order_book.h Simple order book · depth_feed_publisher.cpp Depth feed publisher
Components 16
Order matching
- Order book
src/book/order_book.h - Order tracker
src/book/order_tracker.h - Price ordering
src/book/comparable_price.h
Depth and events
- Callback events
src/book/callback.h - Depth order book
src/book/depth_order_book.h - Aggregated depth
src/book/depth.h - Depth levels
src/book/depth_level.h - Depth and BBO listeners
src/book/depth_listener.h
Order adapter
- Simple order book
src/simple/simple_order_book.h - Simple order
src/simple/simple_order.h
Example applications
- Manual order entry
examples/mt_order_entry/mt_order_entry_main.cpp - Depth feed publisher
examples/depth_feed_publisher/depth_feed_publisher.cpp - Depth feed subscriber
examples/depth_feed_publisher/depth_feed_subscriber.cpp
Other components
- Trading application
- Market data consumer
- QuickFAST
Connections 17
- Trading application → Order book: submits or modifies
- Order book → Order tracker: tracks orders
- Order book → Price ordering: orders prices
- Order book → Callback events: queues outcomes
- Depth order book → Order book: extends matching
- Depth order book → Aggregated depth: updates aggregates
- Aggregated depth → Depth levels: maintains levels
- Depth order book → Depth and BBO listeners: notifies changes
- Simple order book → Depth order book: extends depth book
- Simple order book → Simple order: updates order state
- Manual order entry → Simple order book: submits requests
- Depth feed publisher → Simple order book: submits orders
- Depth feed publisher → QuickFAST: encodes market data
- QuickFAST → Depth feed subscriber: decodes feed
- Depth feed subscriber → Market data consumer: publishes feed
- Manual order entry → Trading application: displays notifications
- Depth feed publisher → Market data consumer: publishes updates