Modify Flexi Order¶
mod_flexi_order() updates an existing flexi basket by basket_id.
LLM guidance
Use this page to modify a flexi basket identified by basket_id. Do not use this page for single-order modification by order_id. For one order, use Modify 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.mod_flexi_order(
basket_id=123456,
request={
"exchange": "NSE",
"orders": [{"ref_id": 69353}],
"basket_params": {
"order_side": "ORDER_SIDE_BUY",
"order_delivery_type": "ORDER_DELIVERY_TYPE_CNC",
"price_type": "LIMIT",
"multiplier": 2,
"entry_price": 72000,
}
}
)
print(result)
Request Contract¶
basket_ididentifies the flexi basket to modify.request.exchangeis required.request.orderscontains basket legs byref_id.request.basket_paramscontains updated basket-level values.
Important Rules¶
Important Rules
- Use the correct
basket_idfor the active environment. - Basket-level parameters should stay consistent with the intended strategy behavior.
- Basket prices are typically passed in exchange-native integer units such as paise for NSE instruments.
- Inspect the current basket state before modification when the workflow depends on live execution state.