Archived
Order-book collector for prediction-market data (Polymarket, then Kalshi). Central bet is the concurrency pipeline; correctness/completeness first, speed later. Roadmap covers base challenge plus all four extensions.
666 B
666 B
Challenge notes
Deltas are absolute, not incremental
A delta carries the new total quantity at a price level, not a change to it.
quantity: 400 means "this level is now 400," not "+400". Overwrite the level;
never add. quantity: 0 means delete the level. (Schema confirms: "absolute
available quantity".)
Sequence numbers are the thread you must not drop
Each symbol's messages carry a monotonically increasing seq. If you receive a
gap (e.g. 101 then 103), you missed a message, so your in-memory book is now
wrong. You cannot patch it — throw the book away and re-snapshot that symbol.
This is the "completeness" requirement made mechanical.