Interactive Brokers icon

Interactive Brokers

Interact with Interactive Brokers TWS API

Actions7

Order → Cancel Order

AI-generated

Summary

Cancel an existing Interactive Brokers order by specifying its numeric Order ID.

Inputs

  • Order ID (required) — ID of the order to cancel

Output shape

a list with one object containing the orderId, cancellation status, and connection status

Returns an array with one result object per input item. Each result includes the Order ID requested for cancellation, a 'Cancelled' status, and a 'connected' boolean indicating if the node was connected to the IBKR API. Errors during cancellation will throw unless 'Continue On Fail' is enabled, in which case an error object is returned instead.

Examples

Example 1: Cancel Order

Specify a valid existing Order ID to cancel its active order in the IBKR account.

Discussion