Order Types

Limit, Market, Post-Only, Reduce-Only, TIF
Market Order fills the best available offers immediately up to specified quantity.
Limit Order posts to the order book to be executed at a a price at least as good as the specified limit price. Upon order creation, the Cost of the order will be locked off-chain and deducted from Free Collateral.
Post Only is a condition on the limit order to only execute as a maker order. If any of the order quantity takes offers available on the orderbook, the entire Post Only order is canceled.
Reduce Only is a condition on the limit order to only reduce or close a position. Reduce Only orders never increase the position.

Time-in-Force (TIF) Orders

Time-in-Force order options re available for Limit & Stop Orders. The default is GTC.
​
Good till Cancel (GTC). An order placed on the order book stays active until cancelled, filled or expired. The default GTC expiration time is 90 days.
Immediate or Cancel (IOC). An IOC order is a taker-only order; it immediately fills as much order quantity as possible, and cancels any quantity unfilled. No order is placed in the order book.
Fill or Kill (FOK). A FOK order is a taker-only order; it immediately either fills completely or is completely cancelled. No order is placed in the order book. This order type is useful for traders looking to trade large quantities, without affecting both the market price and their average trade execution price.

Placing An Order

Every order must be cryptographically signed at creation. After orders are matched by the off-chain order matching engine, their respective signatures are sent to the smart contracts alongside the data of the trade. The signatures are verified before executing trades for the counterparties.
Signing an Order. All orders and order cancellation requests must be individually cryptographically signed.
Canceling An Order. Canceling an unfilled open order removes it from the order book and any freed up Margin is moved back to the trader's Free Collateral. After removing from the order book, the server will call the smart-contract-level cancel() method. The contract verifies the signature on the cancel request and marks the order as canceled. From then on, any attempt to trade against a canceled order will fail.
Self-trade protection
If a trader completely or partially fills their own order, the self-traded order quantity is cancelled and the signatures are invalidated on-chain.