Protocol
Trading

Order Types

Limit, market, FOK, IOC, GTC, and GTD order behaviour

Order Types

The core order type is the limit order, which specifies an exact price and quantity, fills at the specified price or better, and partially fills by default with the remainder resting on the book. A market order is simulated by combining an aggressive limit price with fill_or_kill = true.

Order TypeBehaviourImplementation
LimitFills at specified price or better; remainder rests on booklimit_order_create_operation
Market (simulated)Immediate fill or full rejection — no book restingAggressive limit price + fill_or_kill = true
Fill or Kill (FOK)Entire quantity fills in one execution or rejected; no partial fillsfill_or_kill = true
Immediate or Cancel (IOC)Fills as much as possible immediately; remainder cancelledexpiration = current block time + 1 block
Good Til Cancel (GTC)Rests on book indefinitely until filled or manually cancelledexpiration = time_point_sec::maximum()
Good Til Date (GTD)Rests until a specified expiration timestamp; auto-removed on expiryexpiration = future timestamp