Market Lifecycle

Market modes that control which order operations are accepted

Mode Progression

Markets progress through a linear lifecycle:

post_only → trading → wind_down → halted → delisting → delisted
(build book)  (normal)  (close pos)  (freeze)  (force-close) (gone)

Transitions move left-to-right. The mode field on the Market object returns the current mode as a string.

Gating Matrix

ModePlace (regular)Place (market maker)CancelPrice updateLiquidationVisible
post_onlypost-only onlypost-only onlyyesyesyesyes
tradingall order typesall order typesyesyesyesyes
wind_downreduce-only onlyreduce-only + post-onlyyesyesyesyes
haltedblockedblockedyesblockedblockedyes
delistingblockedblockedyes (by admin)blockedblockedyes
delistedblockedblockedblockedblockedblockedno

Market maker status is a flag on the wallet record, set by admin operations.

Mode Details

post_only — Pre-Launch

Used before a market goes live. Only post-only (maker) orders are accepted. Builds the order book without any fills occurring.

trading — Normal

All order types, all users. Standard operating mode.

wind_down — Closing

Market is winding down. Users can only close existing positions via reduce-only orders. Market makers retain the ability to place post-only orders so there is counterparty liquidity available for users closing positions.

User typeAllowed
Regularreduce-only
Market makerreduce-only + post-only

halted — Emergency Freeze

No new orders. Cancellations still work so users can remove resting orders. Price updates and liquidation are stopped — prices may be unreliable during an emergency. Used for emergencies (oracle issues, exploit mitigation, etc).

delisting — Force-Close In Progress

Market is being delisted. All open orders are canceled and remaining positions are closed at a pre-announced fixed price. Price updates and liquidation are stopped during this process. Users can still see their positions and receive WebSocket updates until all positions are closed.

delisted — Removed

Market permanently gone. All operations blocked including cancellations. Market hidden from active listings.

Error Messages

When an operation is rejected due to mode:

Error messageMode
only post-only orders are allowed in {id} marketpost_only
market {id} is in wind-down mode, only reduce-only orders allowedwind_down
market {id} is haltedhalted
market {id} is being delisteddelisting
market {id} has been delisteddelisted

Legacy Boolean Flags

For backward compatibility, the enabled and post_only boolean flags remain on the Market object. Prefer mode for new integrations.

modeenabledpost_only
tradingtruefalse
post_onlytruetrue
wind_downfalsefalse
haltedfalsefalse
delistingfalsefalse
delistedfalsefalse

Visibility

visible is independent of mode. When false, the market is hidden from default UI listings but remains reachable via direct mkt_id queries. Trading behavior is unchanged.

On this page