Market State

Market state updates are sent over the Order Entry and Pricefeed connections. The message structures are the same for each.

Market State

Byte OffsetByte LengthTypeNameDescription
01charmarketStateSee Market State Code
18uint64ackIdAck ID
98uint64productIdProduct ID
17

Market State Code

ValueMarket State
OOpen
HHalt
CClosed

Market State Semantics

There are 3 possible market states: Open, Halt, and Close.

  • Open: New orders and cancels can be submitted. Matches are possible.
  • Halt: The market is "paused". The book is persisted, but new orders cannot be submitted and no new matches can happen. Cancels are allowed. Book snapshots will be updated with orders that were cancelled being removed. New levels may appear in the book snapshot during a halt, but those are from previously hidden levels being revealed from closes at tighter levels.
  • Close: The market has been closed, no new orders are allowed, and the book has been cleared.
Market StateMatchingNew OrdersCancelsPersist Book
OpenXXXX
HaltXX
Closed

The only market state update message that is useful when constructing the book is Close. A Close destroys the book, where Open and Halt do not alter the book. Multiple Open updates in a row do not imply any changes either.

Start Trading

Trade US Perpetual Futures, Physical Futures, and Options on the Bitcoin Complex®, XRP, ETH, SOL, and more.