Skip to content

Modify Multi Order

modify_multi_order() modifies multiple existing Trading API V3 order IDs in one request.

Use this page when grouping modifications for:

  • multiple independent single-instrument orders
  • multiple items that were originally placed through create_order([...])
  • multiple flexi / multi-leg strategy orders
  • a mixed list of single orders and flexi strategy order IDs

Every item in the list carries its own orderId and only the fields being changed for that target order.

For flexi orders created with isMultiLeg=True, use the strategy-level intentOrderId as orderId. Do not use basket_id, and do not resend legs, isMultiLeg, or basketParams.

LLM guidance

Use this page when the user wants to modify several Trading API V3 order IDs together. Generate trader.modify_multi_order([...]), where each item includes orderId and only the fields being changed for that order. Flexi strategy order IDs can be included in the same list, but do not generate basket_id, legs, isMultiLeg, top-level refId, top-level side, or basketParams for flexi strategy modifications.

Basic Usage

from nubra_python_sdk.start_sdk import InitNubraSdk, NubraEnv
from nubra_python_sdk.trading.trading_data import NubraTrader
from nubra_python_sdk.trading.trading_enum import TradingAPIVersion

nubra = InitNubraSdk(NubraEnv.UAT, env_creds=True)
trader = NubraTrader(nubra, version=TradingAPIVersion.V3)

result = trader.modify_multi_order([
    {
        "orderId": 987654,
        "qty": 1,
        "entryPrice": 24600,
        "deliveryType": "IDAY",
        "priceType": "LIMIT",
        "validityType": "DAY",
        "executionMode": "ENTRY",
        "echoFields": "modify_multi_single_hdfc"
    },
    {
        "orderId": 987655,
        "entryPrice": 18000,
        "deliveryType": "IDAY",
        "priceType": "LIMIT",
        "validityType": "DAY",
        "executionMode": "ENTRY",
        "echoFields": "modify_multi_single_reliance"
    }
])

print(result.message)

Order Type Scope

Existing order type Which ID to use in each item Notes
Single order orderId: orders[i].intentOrderId Modify several independent single orders together.
Multi-order item orderId: orders[i].intentOrderId Each item from a multi-order placement has its own ID.
Flexi / multi-leg strategy orderId: strategy intentOrderId Each flexi strategy is one strategy-level order ID.

Example Modify Patterns

These examples show common grouped modifications. Each item can have a different field set and a different executionMode.

from nubra_python_sdk.start_sdk import InitNubraSdk, NubraEnv
from nubra_python_sdk.trading.trading_data import NubraTrader
from nubra_python_sdk.trading.trading_enum import TradingAPIVersion

nubra = InitNubraSdk(NubraEnv.UAT, env_creds=True)
trader = NubraTrader(nubra, version=TradingAPIVersion.V3)

result = trader.modify_multi_order([
    {
        "orderId": 987654,
        "qty": 1,
        "entryPrice": 24600,
        "deliveryType": "IDAY",
        "priceType": "LIMIT",
        "validityType": "DAY",
        "executionMode": "ENTRY",
        "echoFields": "modify_multi_limit_hdfc"
    },
    {
        "orderId": 987655,
        "qty": 1,
        "entryPrice": 18000,
        "deliveryType": "IDAY",
        "priceType": "LIMIT",
        "validityType": "DAY",
        "executionMode": "ENTRY",
        "echoFields": "modify_multi_limit_reliance"
    }
])

print(result.message)
from nubra_python_sdk.start_sdk import InitNubraSdk, NubraEnv
from nubra_python_sdk.trading.trading_data import NubraTrader
from nubra_python_sdk.trading.trading_enum import TradingAPIVersion

nubra = InitNubraSdk(NubraEnv.UAT, env_creds=True)
trader = NubraTrader(nubra, version=TradingAPIVersion.V3)

result = trader.modify_multi_order([
    {
        "orderId": 987654,
        "entryPrice": 24600,
        "entryConfig": {
            "triggers": [
                {"kind": "AT_OR_ABOVE", "value": 24600}
            ]
        },
        "executionMode": "ENTRY",
        "echoFields": "modify_multi_entry_trigger"
    },
    {
        "orderId": 987655,
        "exitConfig": {
            "targetParams": {
                "targetProfitTriggerPrice": {"value": 18400},
                "targetProfitLimitPrice": {"value": 18420}
            }
        },
        "executionMode": "EXIT",
        "echoFields": "modify_multi_target"
    }
])

print(result.message)
from nubra_python_sdk.start_sdk import InitNubraSdk, NubraEnv
from nubra_python_sdk.trading.trading_data import NubraTrader
from nubra_python_sdk.trading.trading_enum import TradingAPIVersion

nubra = InitNubraSdk(NubraEnv.UAT, env_creds=True)
trader = NubraTrader(nubra, version=TradingAPIVersion.V3)

result = trader.modify_multi_order([
    {
        "orderId": 987654,
        "multiplier": 2,
        "entryPrice": -36000,
        "deliveryType": "CNC",
        "priceType": "LIMIT",
        "validityType": "DAY",
        "executionMode": "ENTRY",
        "echoFields": "modify_multi_flexi_price"
    },
    {
        "orderId": 987655,
        "exitConfig": {
            "targetParams": {
                "targetProfitTriggerPrice": {"value": -39000},
                "targetProfitLimitPrice": {"value": -39050}
            }
        },
        "executionMode": "EXIT",
        "echoFields": "modify_multi_flexi_target"
    }
])

print(result.message)

Use this pattern when several flexi / multi-leg strategy orders need strategy-level updates. Each orderId is a strategy-level intentOrderId.

from nubra_python_sdk.start_sdk import InitNubraSdk, NubraEnv
from nubra_python_sdk.trading.trading_data import NubraTrader
from nubra_python_sdk.trading.trading_enum import TradingAPIVersion

nubra = InitNubraSdk(NubraEnv.UAT, env_creds=True)
trader = NubraTrader(nubra, version=TradingAPIVersion.V3)

result = trader.modify_multi_order([
    {
        "orderId": 987654,
        "entryPrice": 24600,
        "executionMode": "ENTRY",
        "echoFields": "modify_mixed_single_order"
    },
    {
        "orderId": 987655,
        "multiplier": 2,
        "entryPrice": -36000,
        "executionMode": "ENTRY",
        "echoFields": "modify_mixed_flexi_strategy"
    }
])

print(result.message)

Timed And GTE Modifications

Timed entry, timed exit, and GTE validity can also be grouped inside modify_multi_order(). Keep the execution mode aligned to the fields being changed in each item.

result = trader.modify_multi_order([
    {
        "orderId": 987654,
        "entryConfig": {
            "entryTime": "2026-03-20T09:20:00.000Z"
        },
        "exitConfig": {
            "exitTime": "2026-03-20T15:10:00.000Z"
        },
        "executionMode": "ENTRY_AND_EXIT",
        "echoFields": "modify_multi_timed"
    },
    {
        "orderId": 987655,
        "validityType": "GTE",
        "goodTillDate": "2026-03-25T15:20:00.000Z",
        "executionMode": "ENTRY",
        "echoFields": "modify_multi_gte"
    }
])

For futures and options, goodTillDate must not be beyond the contract expiry. For stocks, the date can be up to a maximum of one year.

Execution Modes

Each item inside the list has its own executionMode.

Item payload shape executionMode Meaning
The item modifies entryPrice and/or entryConfig, and has no exitConfig. ENTRY Entry-only order modification.
The item has no entry fields and modifies only exitConfig. EXIT Exit-only order modification.
The item modifies entry fields and also modifies exitConfig. ENTRY_AND_EXIT Entry order with attached exit modifications.

List Item Fields

Field Type Required Allowed values / shape Meaning
orderId int yes Trading API V3 intentOrderId Target Trading API V3 order ID for this item.
refId int no instrument ref ID Replacement instrument reference ID when supported. Do not use for flexi strategy modification.
qty int no positive integer Updated single-order quantity. For flexi strategy size, use multiplier.
side str no BUY, SELL Updated side when supported. Do not use for flexi strategy modification.
multiplier int no positive integer Updated flexi strategy quantity multiplier.
entryPrice int no price integer Updated entry price, or net strategy price for flexi orders.
goodTillDate str no date/time string Updated GTE date/time.
entryConfig object no timed entry or trigger objects Updated entry conditions.
exitConfig object no stop-loss, target, or timed exit object Updated exit conditions.
deliveryType str no IDAY, CNC Updated delivery type when supported by the order.
priceType str no LIMIT Updated price type.
validityType str no DAY, GTE Updated validity.
executionMode str no ENTRY, EXIT, ENTRY_AND_EXIT Execution mode that matches this item's updated fields.
icebergInfo object no numberOfLegs or maxQtyPerLeg Updated iceberg slicing settings when supported.
echoFields str no string Free-form metadata echoed back by Trading API V3.

Response Fields

modify_multi_order() returns NubraAckResponse.

Field Type Meaning
message str Acknowledgement message returned by Trading API V3.

Fetch the latest order state with Get Orders after modification when control flow depends on final order status, fill state, rejection reason, or flexi strategy leg state.

Important Rules

Important Rules

  • Initialize NubraTrader with TradingAPIVersion.V3.
  • Include orderId inside every list item.
  • Send only the fields being changed for each target order.
  • Set executionMode per item based on that item's entry and exit fields.
  • Flexi strategy order IDs can be modified in the same grouped request as single-order IDs.
  • For flexi / multi-leg strategies, use the strategy-level intentOrderId as orderId; do not pass basket_id.
  • Do not send legs, isMultiLeg, or basketParams in modify requests.
  • Do not send top-level refId or top-level side when modifying a flexi strategy order.
  • Use Modify Order when modifying only one Trading API V3 order ID.
  • Use Get Orders to inspect current order state before and after modification.
  1. Modify Order
  2. Place Multi Order
  3. Place Flexi Order
  4. Get Orders
  5. Cancel Order
NEO Assistant