Order Types
Market Order: immediately filled to the user-specified size with the best available bids/asks. Cancels any unfilled amount if the order book does not have enough liquidity (not enough bids/asks).
Limit Order: posted to the order book to be executed at a specific limit price. Can be partially or completely executed as a Market Order if Price < Best Bid when shorting, and if Price > Best Ask when longing. On placing an order, Margin equal to the Cost will be locked off-chain and deducted from Free Collateral.
Reduce-Only Order: This ensures an order will only be executed to reduce or close a position and will never increase or open a new position. A reduce-only order can only be placed less than or equal to the existing open position's contract size. If a Reduce Only order was to increase the trader’s position in any way, it will be automatically reduced or cancelled.
Cancelling An Order: cancelling an unfilled open order removes it from the order book and the unfilled Order Margin is moved back to Free Collateral. Requires a signature. After removing from the order book, the server will call the contract level cancel method. The contracts verify the signature of the cancel request and proceed to mark the order as cancelled internally. Any attempts to make a trade against a cancelled order going forward will fail since all orders are verified as not cancelled before trade execution.
Time In Force: Available for Limit & Stop Orders. Defaults to GTC.
- Order placed on Order Book until canceled or filled. The default GTC time is 90 days.
- Order immediately executes and fills as much as possible. Cancels any unfilled quantity. Nothing is placed on the Order Book.
- The order must execute immediately and be completely filled, otherwise, it is canceled. Nothing is placed on 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.
-
-
-
-
- If you send a (normal/stop/trailing stop/take profit) limit order, the market might have moved beyond your limit price by the time your order is executed. If you send an IOC, it will be canceled if it would not immediately trade; and if you send a post-only order, it will be canceled if it would immediately trade.
- If you want to control the execution price of an order, use a limit order instead.