For the complete documentation index, see llms.txt. This page is also available as Markdown.

Status Model

This page explains how to interpret order and cash operation states.

Order State Model

API Objects

Object
Meaning
Integration use

mapping

API key to tx/order linkage

Transaction accepted / waiting for indexer

openOrder

On-chain order still active or canceling

Open order or cancel in progress

historyOrder

Settled, canceled, rejected, expired, or failed order

Final result

Order Statuses

Status
Meaning
Suggested handling

Init

Mapping or order initialized

Pending

Pending

Processing

Pending

New

Order recognized

Open

Partial filled

Some quantity filled

Partially filled

Filled

Fully filled

Filled

Canceled

Canceled

Canceled

Expired

Expired by TIF/execution rules

Expired

Rejected

Rejected by execution or validation

Failed / rejected

Failed

Processing failed

Failed

On-chain transient statuses:

Status
Meaning
Suggested handling

placing

Order placement is active

Placing

canceling

Cancel request is active

Canceling

Market Order Expectations

Market orders are intended for immediate execution, but settlement is still async.

Integration guidance:

  • Do not show market order as final at tx mining time.

  • Treat placing as pending until settlement appears.

  • Refresh portfolio after final status.

Limit Order Expectations

Limit orders can remain open.

Integration guidance:

  • Show open limit orders separately from final history.

  • Allow cancel only for open limit orders that are not already canceling.

  • Current production contracts accept only DAY limit orders; treat expiry/fill/cancel transitions as asynchronous backend and settlement behavior after the order is placed.

Cash Operation State Model

Cash operations use Cashier buffers for instant settlement when possible. If the relevant buffer cannot cover the operation safely, the operation follows the queued settlement path. See ../cash/buffer-mechanism.md.

Cash Statuses

operationStatus

Meaning

Suggested handling

requested

Operation created

Requested

processing

Waiting on settlement path

Processing

settled

mUSD applied or cash paid out

Complete

closed

Closed lifecycle

Closed

mappingStatus reuses the order mapping status enum. Use it to explain whether the tx was recorded and recognized.

Portfolio Refresh Rules

Refresh portfolio after:

  • Deposit operation reaches settled.

  • Withdrawal operation reaches settled or closed.

  • Order moves from openOrder to historyOrder.

  • Cancel settlement completes.

Treat the status endpoint as authoritative for lifecycle and the portfolio endpoint as authoritative for balances.

Last updated