Skip to content

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_id identifies the flexi basket to modify.
  • request.exchange is required.
  • request.orders contains basket legs by ref_id.
  • request.basket_params contains updated basket-level values.

Important Rules

Important Rules

  • Use the correct basket_id for 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.
  1. Get Flexi Order
  2. Cancel Flexi Order
NEO Assistant