Skip to content

Market and order status

A market has one of seven stored statuses. These are the values ?status= accepts, lowercase, comma-separated, e.g. ?status=open,pre_open.

Status Meaning
scheduled Created and ready to pre-open. No orders accepted yet.
pre_open Accepts limit orders ahead of open. No trades, and no market orders.
open Open for all orders and trades.
closed The result is known. No new orders; pending orders are cancelled. Awaiting confirmation by STX, or a delayed feed.
resulted Result confirmed. Settlements generated for all trades.
cancelled Cancelled. No new orders; pending orders are cancelled. Awaiting confirmation.
voided Cancellation confirmed. Void settlements generated.

An uppercase value returns 400. Omit the parameter entirely and you get every non-archived market, not just the open ones.

A response’s status field can read suspended, which is not in the list above and cannot be filtered on. It is derived at render time:

trading == false AND status in (open, pre_open) -> suspended

So a market returned by ?status=open can report "status": "suspended". The filter is not wrong, that market genuinely is open, it simply is not taking trades at this moment.

The two fields answer different questions:

Field Answers
status Where the market is in its lifecycle
trading Whether it is accepting orders right now

A market you can actually trade against has status: open and trading: true.

Ask for exactly those with both filters:

tradeable = get("/api/v1/markets?status=open&trading=true")["markets"]

?status=pre_open&trading=true gets you the markets that are not matching yet but do accept resting limit orders.

An order has one of nine statuses. They are a different set from the market ones above. In practice you mostly see the last five, because the first four are normally transient.

Status Meaning
created Stored, but not yet checked against your limits or available balance.
requested Passed the account checks and handed to the market.
accepted The market accepted it; not yet run against the book.
delayed Accepted, but held before further processing, see the in-play delay on the market.
open Resting on the book and available to be filled.
filled The entire quantity has been filled.
rejected Refused, either on the account checks or by the market. Read rejection_reason.
cancelled Cancelled with no quantity filled.
partially_cancelled Cancelled after part of the order had already traded. The trades it already created stand.

created, requested, accepted and delayed are normally transient, an order moves through them in the time it takes the request to return, so a resting order you placed will usually read accepted in the POST response and open by the time you query it.

filled, rejected, cancelled and partially_cancelled are terminal.

Which statuses mean the order is still live

Section titled “Which statuses mean the order is still live”

Branch on this rather than on open alone:

Statuses
Live: working, cancellable, holding liability created, requested, accepted, delayed, open
Done: no longer working filled, rejected, cancelled, partially_cancelled

partially_cancelled is the one to handle explicitly: it means you have trades from an order you cancelled, so reconcile the fills rather than assuming a cancel left you flat.

Do not confuse these with event status, which is a separate, shorter set: scheduled, in_progress, completed, cancelled. A market carries its event’s status alongside its own as event_status.

v1.5.9Changelogllms.txtllms-full.txt