OCaml LOB BOOK

Side
Feed Connecting

Book

    Each row is one price, highest at the top, and shaded rows sit inside the spread. Each block is an order resting at that price, as wide as its size. A new order fills against the oldest block at the best price first. Yours are outlined.

    How it works

    This page is wired to one matching engine written in OCaml 5. A small bot quotes and trades against it all day, and the orders you send land in the same book.

    Each row is a queue. Orders at one price wait in the order they arrived. When an order crosses the spread, it fills against the oldest order at the best price, then the next oldest, then the next price. That rule is price-time priority.

    Inside the engine a price is an integer tick, so $150.2500 is 1_502_500. The matching path allocates nothing per order, which the throughput figure on the right measures on this server each time it starts.

    Read the code