Bootstrap and parsing notes
| Topic | Contract |
|---|---|
| Initial user-data state | ORDER_UPDATE, STRATEGY_UPDATE, and TRADER_UPDATE subscriptions begin with an empty PARTIAL; bootstrap existing state from REST before applying WebSocket UPDATE messages |
| Fully rejected orders | Fully rejected order outcomes can carry placeholder makerOrderIntent fields such as empty strings plus side=0 and orderType=0; parsers must not assume full maker-intent fidelity on rejection-only outcomes |
| Reconnect posture | Resume one update family with its own globalOrdinal, then continue applying feed messages in top-level ordinal order on the live connection |
Event ordering model
| Property | Contract |
|---|---|
| Snapshot + stream model | REST provides initial state, realtime provides updates |
Top-level sequence | Global monotonically increasing server notification sequence across all feeds and all connections; a single connection may observe gaps |
Top-level ordinal | Per-connection monotonically increasing message order across all subscribed feeds |
globalOrdinal | Stable identifier over updates of one update type, used for REST pagination and reconciliation within that same update type; do not compare across different update types |
orderMatchOrdinal | Shared identifier for all order outcomes from the same match |
ORDER_UPDATE.ordinal | Per-outcome ordinal within one orderMatchOrdinal group |
| Correlation keys | trader, strategy, symbol, order identity fields |
ORDER_UPDATE reasons
| Code | Reason | Meaning |
|---|---|---|
0 | Post | Order posted to the book |
1 | Trade | Order matched and traded |
2 | Liquidation | Order outcome came from liquidation handling |
3 | Cancellation | Order was canceled |
4 | OrderRejection | Order was rejected during lifecycle processing |
5 | CancelRejection | Cancel or modify request was rejected |
ORDER_UPDATE rejection codes
| Code | Reason | Meaning |
|---|---|---|
0 | SelfMatch | Same-trader crossing was prevented |
1 | SolvencyGuard | Order could not proceed without violating solvency constraints |
2 | MaxTakerPriceDeviation | Matching would have exceeded mark-price deviation guard |
3 | NoLiquidity | No usable liquidity remained in the book |
4 | InvalidStrategy | Strategy was invalid or nonexistent |
5 | PostOnlyViolation | Post-only order would have matched immediately |
Cancel rejection codes
| Code | Reason | Meaning |
|---|---|---|
0 | InvalidOrder | Order could not be found for cancel or modify |
STRATEGY_UPDATE reasons
| Code | Reason | Meaning |
|---|---|---|
0 | Deposit | Collateral deposited on-chain |
1 | Withdraw | Collateral withdrawal claimed on-chain |
2 | WithdrawIntent | Collateral locked for withdrawal |
3 | FundingPayment | Funding transferred at settlement |
4 | PnlSettlement | PnL realized at periodic settlement |
5 | Trade | PnL realized from trade fills |
6 | Fee | Fees charged in collateral currency |
7 | Liquidation | Strategy liquidated and collateral zeroed |
8 | ADL | Auto-deleveraging occurred |
9 | WithdrawRejection | Withdrawal attempt rejected |
Withdraw rejection codes
| Code | Reason | Meaning |
|---|---|---|
0 | InvalidStrategy | Strategy was invalid or nonexistent |
1 | InvalidInsuranceFundContribution | Insurance-fund contribution was invalid or missing |
2 | MaxWithdrawalAmount | Withdrawal amount exceeded the allowed maximum |
3 | InsufficientInsuranceFundContribution | Withdrawal exceeded contributed amount |
4 | InsufficientRemainingInsuranceFund | Withdrawal would leave the insurance fund too low |
TRADER_UPDATE reasons
| Code | Reason | Meaning |
|---|---|---|
0 | DepositDDX | DDX deposited on-chain |
1 | WithdrawDDX | DDX withdrawal claimed on-chain |
2 | WithdrawDDXIntent | DDX locked for withdrawal |
3 | TradeMiningReward | DDX credited for trade mining |
4 | ProfileUpdate | Trader profile or fee preference changed |
5 | FeeDistribution | DDX rewarded during checkpoint fee distribution |
6 | Admission | Trader granted platform access |
7 | Denial | Trader denied platform access |
8 | Fee | Fees charged in DDX |
9 | WithdrawDDXRejection | DDX withdrawal attempt rejected |
DDX withdraw rejection codes
| Code | Reason | Meaning |
|---|---|---|
0 | InvalidTrader | Trader was invalid or nonexistent |
1 | InsufficientDDXBalance | Trader did not have enough DDX |
Lifecycle mapping
| Phase | Primary signal |
|---|---|
| Request accepted for sequencing | Request receipt |
| Matching and partial/complete fills | ORDER_UPDATE |
| Strategy balance and margin effects | STRATEGY_UPDATE |
| Trader-level balance/profile effects | TRADER_UPDATE |
| Terminal states | Filled, canceled, rejected, liquidated, or ADL-resolved |
ordinal order for one connection. Use globalOrdinal to resume one update type after reconnects, do not compare it across different update types, and use orderMatchOrdinal plus ORDER_UPDATE.ordinal to reconstruct multi-outcome matches.
Liquidation and ADL reconciliation notes
| Topic | Contract |
|---|---|
| liquidation outcome set | Expect ORDER_UPDATE plus STRATEGY_UPDATE changes to position and collateral state rather than an order-only interpretation |
| ADL outcome set | Expect strategy-level resolution effects in addition to order outcomes; ADL is not just a trade-print alias |
| insurance-fund-adjacent rejections | Withdrawal-side insurance-fund rejection codes belong to strategy reconciliation, not to ordinary trade matching |