risk & execution / price adapters & order-book execution
docs / risk & execution / price adapters & order-book execution

Price adapters & order-book execution

Where prices come from and how fills are priced.

Order-book capture

For each fill the validator requests the order book, normalizes its levels and records the levels it filled against, the timestamp and a hash of the book. The book it trades against is at most a couple of seconds old.

Before a fill it checks that the book is two-sided, the spread is within the limit and there is enough depth on both sides. A perp buy walks the asks and a perp sell walks the bids, level by level, at the average price of the levels taken. A prediction-market order fills at the touch instead, buys at the best ask and sells at the best bid, at one price for the whole order. NO prices are the complement of the YES book.

Price feeds and charts

We built our own price feeds and charts, running on live data from Hyperliquid, Phoenix and Polymarket. Prediction-market and perp fills both come from the venue’s order book.

Display marks

Positions are marked at the price you could sell at, which is the YES bid, or 1 − the YES ask for NO. Perps are marked at the exit side: the bid for a long, the ask for a short. Marks read a cached book up to 60 seconds old, but your fill always comes from a fresh book.