Skip to content

Modify Order

modify_order_v2() updates an existing order by order_id.

LLM guidance

Use this page to modify one existing non-flexi order identified by order_id. Do not use this page to modify flexi baskets. For basket-level changes, use Modify 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.modify_order_v2(
    order_id=2394981,
    request={
        "order_price": 134400,
        "order_qty": 1,
        "exchange": "NSE",
        "order_type": "ORDER_TYPE_STOPLOSS",
        "algo_params": {"trigger_price": 134390},
    },
)

print(result)

Request Contract

Field Type Required Meaning
order_id int yes order identifier
order_qty int yes updated quantity
order_price int yes updated price
order_type enum yes order type
exchange enum yes exchange
algo_params dict no strategy-specific modifications such as trigger_price

Important Rules

Important Rules

  • Modify requests require the target order_id.
  • Keep algo_params aligned with the order type when modifying stop-loss or iceberg-style orders.
  • Prices are typically passed in exchange-native integer units such as paise for NSE instruments.
  • Use Get Order to inspect the current order state before and after modification.
  1. Get Order
  2. Cancel Order
NEO Assistant