Menu

How to Cancel an Order?

Canceling an order (Cancel Order) refers to a trader actively withdrawing an order that has not been fully executed (e.g., a limit order or a partially filled order) in a financial trading market, so the order no longer remains active or awaits matching. Order cancellation typically applies to limit orders, as market orders are usually executed immediately and do not require cancellation.

Types of Order Cancellation

FOK (Fill or Kill):
  • Automatically cancels orders that are not fully executed, requiring no manual action.
  • Example: An FOK limit order to buy 1 BTC at 60,000 USDT will be automatically canceled if the order book has less than 1 BTC available.
GTC (Good Till Canceled):
  • Requires manual cancellation or waits for execution, suitable for long-term orders but requires monitoring market changes.
  • Example: A GTC limit order to buy 0.1 BTC at 59,000 USDT can be manually canceled if the market price does not drop to 59,000 USDT.
IOC (Immediate or Cancel):
  • The unexecuted portion is automatically canceled, requiring no manual action.
  • Example: An IOC limit order to buy 0.3 BTC at 60,000 USDT executes 0.1 BTC, and the remaining 0.2 BTC is automatically canceled.

Common Reasons for Cancellation Failure

  • Invalid order ID (targetOrderId).
  • The order is a market order.
  • The order has already been fully executed.
  • The order has already been canceled or automatically canceled.
Share this Article
Previous
Order Additional Instructions
Next
Security Center
Last modified: 2025-06-24