Skip to content

Cancel Order

cancel_orders_v2() cancels one or more orders and can also include basket IDs in the same request payload.

LLM guidance

Use this page to request cancellation for one or more existing standard orders by order_id. Do not use this page for flexi basket cancellation, even if basket IDs appear in related payload shapes. For flexi baskets, use Cancel Flexi Order.

Basic Usage

from nubra_python_sdk.start_sdk import InitNubraSdk, NubraEnv
from nubra_python_sdk.trading.trading_data import NubraTrader

nubra = InitNubraSdk(NubraEnv.UAT, env_creds=True)
trader = NubraTrader(nubra, version="V2")

result = trader.cancel_orders_v2(order_ids=[2394981])
print(result)

Request Contract

Field Type Required Meaning
order_ids list[int] no order IDs to cancel
basket_ids list[int] no basket IDs to cancel in the same request

Important Rules

Important Rules

  • Pass the correct IDs for the active environment.
  • Cancellation is a request, not a guarantee that execution state can always be reversed.
  • Inspect the latest state with Get Order when cancellation status matters for control flow.
  1. Get Order
  2. Place Order
NEO Assistant