https://github.com/markwinter/orderbook-rust-itch
L2 OrderBook in Rust focused on Nasdaq Itch orders
https://github.com/markwinter/orderbook-rust-itch
Last synced: 10 months ago
JSON representation
L2 OrderBook in Rust focused on Nasdaq Itch orders
- Host: GitHub
- URL: https://github.com/markwinter/orderbook-rust-itch
- Owner: markwinter
- Created: 2025-09-01T19:03:41.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2025-09-01T19:14:07.000Z (10 months ago)
- Last Synced: 2025-09-01T21:22:25.043Z (10 months ago)
- Language: Rust
- Size: 22.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# orderbook-rust
An OrderBook for Nasdaq Itch. This is for an infinite L2 book. If we only cared about some number of price levels, swap the Vecs for fixed arrays. If price levels are fixed, consider using price as an index into the array for free sorting.
## Bench
Benched adding Buy and Sell orders across 100 price levels. Performance decreases with the number of price levels for bids or asks separately as more vector linear scanning is required. The prices are random so don't really reflect reality which is more activity at the insides. Could probably setup a better approximate distribution if I cared, or use real order data for test data similar to the main binary in this repo.
```
add_order time: [30.861 ns 30.981 ns 31.098 ns]
change: [−1.6560% +0.2015% +1.8561%] (p = 0.84 > 0.05)
No change in performance detected.
Found 3 outliers among 100 measurements (3.00%)
1 (1.00%) high mild
2 (2.00%) high severe
```
## Credit
Designed with help of Charles Cooper's post [on Quant StackExchange](https://quant.stackexchange.com/a/32482) and their referenced implementation [here](https://github.com/charles-cooper/itch-order-book)