The Modify Flexi Basket API allows you to update parameters of an existing Flexi basket order without cancelling and recreating it.
This is useful for adjusting strategy-level parameters such as entry price, exit price, stoploss, timing, or multiplier after the basket has been created.
Flexi basket modification applies at the basket level, not individual child orders.
fromnubra_python_sdk.start_sdkimportInitNubraSdk,NubraEnvfromnubra_python_sdk.trading.trading_dataimportNubraTraderfromnubra_python_sdk.trading.trading_enumimport(DeliveryTypeEnum,OrderSideEnum,PriceTypeEnumV2,ExchangeEnum)# Initialize the Nubra SDK client# Use NubraEnv.UAT for testing or NubraEnv.PROD for productionnubra=InitNubraSdk(NubraEnv.PROD,env_creds=True)trade=NubraTrader(nubra,version="V2")modify_payload={"exchange":ExchangeEnum.NSE,"orders":[{"ref_id":956890},{"ref_id":956857}],"basket_params":{"order_side":OrderSideEnum.ORDER_SIDE_BUY,"order_delivery_type":DeliveryTypeEnum.ORDER_DELIVERY_TYPE_IDAY,"price_type":PriceTypeEnumV2.LIMIT,"entry_price":197900,"exit_price":201900,"stoploss_price":197000,"multiplier":1,"entry_time":"2025-12-24T09:00:00.000Z","exit_time":"2025-12-24T09:30:00.000Z"}}result=trade.mod_flexi_order(basket_id=12345,request=modify_payload)print(result)