Cancel Flexi Order¶
cancel_flexi_order() cancels a flexi basket by basket ID.
LLM guidance
Use this page to cancel a flexi basket identified by basket_id. Do not use this page to cancel standard orders by order_id. For non-flexi order cancellation, use Cancel 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_flexi_order(123456, "NSE")
print(result)
Request Contract¶
| Field | Type | Required | Meaning |
|---|---|---|---|
basket_id |
int |
yes | flexi basket identifier |
exchange |
enum |
yes | exchange |
Important Rules¶
Important Rules
- Flexi cancellation targets the basket by
basket_id, not by individual order leg ID. - Use the correct environment-specific basket ID.
- Check basket state afterwards with Get Flexi Order when cancellation state matters.