What order types are supported for on-chain spot trading?
This article explains which order types you can use for on-chain spot trading, so you can pick the right one before you place an order.
Which order types can you use for on-chain spot trading?
Limit order
Definition: you set the price you're willing to buy or sell, and your order only fills at that price or better.
Time in force: how long your order stays active, and whether it's allowed to rest on the order book.
GTC (good till cancel): Your order rests on the order book until it fills or you cancel it.
Post-only: Your order only ever rests on the order book as a maker order. If any part of it would fill right away (ie take liquidity), the whole order is rejected. Choose it when you want to add liquidity rather than take it.
FOK (fill or kill): Your order fills in full right away, or cancels entirely. It never fills partially.
IOC (immediate or cancel): Your order fills whatever it can right away, then cancels the rest.
Example: BTC-USDⓈ is trading at 65,000 USDⓈ. A GTC buy limit order at 62,000 USDⓈ rests on the order book and fills once the price drops to 62,000 USDⓈ. Now say you want 2 BTC at 64,000 USDⓈ but only 1 BTC is available at that price or better: FOK cancels the whole order, while IOC fills 1 BTC and cancels the rest. For post-only order, you need to set price below best ask price when submitting order, otherwise it would be cancelled.
Market order
Definition: Your order fills right away against the best prices on the order book. You get speed, but not a guaranteed price — the fill depends on what's resting on the book when your order arrives. A market order never rests on the order book, so whatever can't fill immediately is cancelled. For market order, you can set a max slippage to limit how far from the current price you're willing to fill.
Example: BTC-USDⓈ is trading at 65,000 USDⓈ and you set Max slippage to 1%. Your market buy fills against sell orders priced up to 65,650 USDⓈ. Sell orders above that are out of reach, so any part of your order still unfilled is cancelled rather than waiting for the price to come back.
Note: your price is also capped by the contract's price band, whatever you set max slippage to. A market order that reaches the edge of the band prices at the edge and goes no further.
> Crypto products involve significant risk. Prices can go up and down, and you may get back less than you put in. This article is for informational purposes only and is not financial, investment, or tax advice. Please do your own research and seek independent advice before making any investment decisions.