MARKET value — market-style execution is built on top of FAK or FOK.
Time-in-force values
Pass one of these asorderType on POST /order.
Market-style execution
There’s noMARKET enum value. To execute “at the market,” sign a CTFOrder at an aggressive cap price and choose FAK or FOK:
- BUY market: sign at price
0.99(or your preferred cap), sized to your budget. - SELL market: sign at price
0.001, sized to your position.
FAK— fill as deep as the book goes at your cap, cancel the rest. Use this for “take whatever liquidity is available.”FOK— fill the full size or nothing. Use this for “I need exactly this much done at my cap or skip the trade.”
Status values on the response
POST /order returns a PlaceOrderResponse with a status field. The three values:
A
success: false response with status: "delayed" and an errorMsg populated is the wire shape for “FOK rejected, no fills.” The HTTP status is still 200.
WebSocket lifecycle frames
On/ws/user, every order emits typed lifecycle frames:
Recognising a full fill in-band
Theorder/UPDATE frame fires twice for any order that ends up fully consumed:
- Once per partial step with
status=LIVEandsize_matched < original_size. - A terminal frame with
status=MATCHEDandsize_matched == original_size.
status transition to MATCHED. The terminal MATCHED frame is the preferred path for new consumers — it works deterministically across COMPLEMENTARY, MINT, and MERGE matches without polling REST.
Correlating trades to order updates
EachMATCHED order/UPDATE frame has a matching trade event with status: "MATCHED". Join on trade.maker_order_id == order.id — this works deterministically across all match types without needing per-market FIFO heuristics.
Both the maker and the taker receive their own copy of the trade frame on their respective /ws/user connections, each with their own trader_side (MAKER or TAKER).