Skip to content

Place Multi Order

create_order() can place multiple independent Trading API V3 single-instrument orders in one request by passing a Python list of order dictionaries. The SDK wraps this list internally before posting to Trading API V3.

Each dictionary in the list is a full single-place-order payload. The same cases documented in Place Single Order can be grouped together here, including limit, AMO, trigger or stop-loss, iceberg, GTE, and timed entry or exit orders.

LLM guidance

Use this page when the user wants several independent single orders submitted together. Each list item uses the same field contract as Place Single Order: it has refId, qty, side, deliveryType, isMultiLeg: False, and an executionMode that matches that item's entry and exit fields. Do not use this page for one strategy order made from FNO legs; use Place Flexi Order for isMultiLeg=True.

Basic Usage

from nubra_python_sdk.start_sdk import InitNubraSdk, NubraEnv
from nubra_python_sdk.refdata.instruments import InstrumentData
from nubra_python_sdk.marketdata.market_data import MarketData
from nubra_python_sdk.trading.trading_data import NubraTrader
from nubra_python_sdk.trading.trading_enum import ExchangeEnum, TradingAPIVersion

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

icici_ref_id = instruments.get_instrument_by_symbol("ICICIBANK", exchange=ExchangeEnum.NSE).ref_id
reliance_ref_id = instruments.get_instrument_by_symbol("RELIANCE", exchange=ExchangeEnum.NSE).ref_id

icici_ltp = market_data.quote(ref_id=icici_ref_id, levels=1).orderBook.last_traded_price
reliance_ltp = market_data.quote(ref_id=reliance_ref_id, levels=1).orderBook.last_traded_price

result = trader.create_order([
    {
        "refId": icici_ref_id,
        "qty": 1,
        "side": "BUY",
        "deliveryType": "IDAY",
        "priceType": "LIMIT",
        "validityType": "DAY",
        "isMultiLeg": False,
        "executionMode": "ENTRY",
        "entryPrice": icici_ltp,
        "stratTags": ["python-sdk-test", "multi-limit-icici"],
        "echoFields": "multi_limit_icici"
    },
    {
        "refId": reliance_ref_id,
        "qty": 1,
        "side": "SELL",
        "deliveryType": "IDAY",
        "priceType": "LIMIT",
        "validityType": "DAY",
        "isMultiLeg": False,
        "executionMode": "ENTRY",
        "entryPrice": reliance_ltp,
        "stratTags": ["python-sdk-test", "multi-limit-reliance"],
        "echoFields": "multi_limit_reliance"
    }
])

for order in result.orders:
    print(order.intentOrderId, order.status)

Example Order Patterns

These examples show how to send multiple independent orders in one create_order() request using a list of single-order payloads with different refId values.

  • use one payload per order inside the list
  • mix any supported single-place-order case inside the same multi-order request
  • keep the order-specific fields inside each item
  • set isMultiLeg: False and the correct executionMode inside each item
  • add entryConfig or exitConfig only for the orders that require it
from nubra_python_sdk.start_sdk import InitNubraSdk, NubraEnv
from nubra_python_sdk.refdata.instruments import InstrumentData
from nubra_python_sdk.marketdata.market_data import MarketData
from nubra_python_sdk.trading.trading_data import NubraTrader
from nubra_python_sdk.trading.trading_enum import ExchangeEnum, TradingAPIVersion

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

icici_ref_id = instruments.get_instrument_by_symbol("ICICIBANK", exchange=ExchangeEnum.NSE).ref_id
reliance_ref_id = instruments.get_instrument_by_symbol("RELIANCE", exchange=ExchangeEnum.NSE).ref_id

icici_ltp = market_data.quote(ref_id=icici_ref_id, levels=1).orderBook.last_traded_price
reliance_ltp = market_data.quote(ref_id=reliance_ref_id, levels=1).orderBook.last_traded_price

result = trader.create_order([
    {
        "refId": icici_ref_id,
        "qty": 1,
        "side": "BUY",
        "deliveryType": "IDAY",
        "priceType": "LIMIT",
        "validityType": "DAY",
        "isMultiLeg": False,
        "executionMode": "ENTRY",
        "entryPrice": icici_ltp,
        "stratTags": ["python-sdk-test", "multi-limit-icici"],
        "echoFields": "multi_limit_icici"
    },
    {
        "refId": reliance_ref_id,
        "qty": 1,
        "side": "SELL",
        "deliveryType": "IDAY",
        "priceType": "LIMIT",
        "validityType": "DAY",
        "isMultiLeg": False,
        "executionMode": "ENTRY",
        "entryPrice": reliance_ltp,
        "stratTags": ["python-sdk-test", "multi-limit-reliance"],
        "echoFields": "multi_limit_reliance"
    }
])

for order in result.orders:
    print(order.intentOrderId, order.status)

Use this pattern when each order is a standard limit order and no order-specific trigger or exit fields are required.

from nubra_python_sdk.start_sdk import InitNubraSdk, NubraEnv
from nubra_python_sdk.refdata.instruments import InstrumentData
from nubra_python_sdk.marketdata.market_data import MarketData
from nubra_python_sdk.trading.trading_data import NubraTrader
from nubra_python_sdk.trading.trading_enum import ExchangeEnum, TradingAPIVersion

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

icici_ref_id = instruments.get_instrument_by_symbol("ICICIBANK", exchange=ExchangeEnum.NSE).ref_id
reliance_ref_id = instruments.get_instrument_by_symbol("RELIANCE", exchange=ExchangeEnum.NSE).ref_id

icici_ltp = market_data.quote(ref_id=icici_ref_id, levels=1).orderBook.last_traded_price
reliance_ltp = market_data.quote(ref_id=reliance_ref_id, levels=1).orderBook.last_traded_price

result = trader.create_order([
    {
        "refId": icici_ref_id,
        "qty": 1,
        "side": "BUY",
        "deliveryType": "IDAY",
        "priceType": "LIMIT",
        "validityType": "DAY",
        "isMultiLeg": False,
        "executionMode": "ENTRY",
        "entryPrice": icici_ltp,
        "stratTags": ["python-sdk-test", "multi-limit-icici"],
        "echoFields": "multi_limit_icici"
    },
    {
        "refId": reliance_ref_id,
        "qty": 1,
        "side": "BUY",
        "deliveryType": "IDAY",
        "priceType": "LIMIT",
        "validityType": "DAY",
        "isMultiLeg": False,
        "executionMode": "ENTRY_AND_EXIT",
        "entryPrice": reliance_ltp,
        "exitConfig": {
            "stoplossParams": {
                "stoplossTriggerPrice": {"value": reliance_ltp - 30},
                "stoplossLimitPrice": {"value": reliance_ltp - 20}
            }
        },
        "stratTags": ["python-sdk-test", "multi-stoploss-reliance"],
        "echoFields": "multi_stoploss_reliance"
    }
])

for order in result.orders:
    print(order.intentOrderId, order.status)

Use this pattern when one independent order is a plain limit order and another independent order carries a stop-loss exit.

Execution Modes

Each item inside the list uses the same executionMode rules as Place Single Order.

Item payload shape executionMode Meaning
The item has entryPrice and/or entryConfig, and no exitConfig. ENTRY Entry-only order item.
The item has no entryPrice or entryConfig, and has exitConfig based on an exit trigger. EXIT Exit-only order item.
The item has entryPrice and/or entryConfig, and also has exitConfig. ENTRY_AND_EXIT Entry order item with attached exits.

Per-item execution mode

In a multi-order payload, executionMode is set per list item. One item can be ENTRY, while another item in the same list can be ENTRY_AND_EXIT.

List Item Fields

Field Type Required Allowed values / shape Meaning
list input list[IntentOrderStruct] yes non-empty list Independent single-order payloads passed directly to create_order().
refId int yes instrument ref ID Instrument for that order.
qty int yes positive integer Quantity for that order.
side str yes BUY, SELL Side for that order.
deliveryType str yes IDAY, CNC Product / delivery type.
priceType str no LIMIT Price behavior.
validityType str no DAY, GTE Order validity.
goodTillDate str no date/time string Good-till date for supported good-till workflows.
executionMode str yes ENTRY, EXIT, ENTRY_AND_EXIT Execution mode for that order item. Match this to the entry and exit fields in the same item.
entryPrice int conditional price integer Limit entry price for that order. Required for price-based ENTRY and ENTRY_AND_EXIT items. Omit for EXIT-only items.
entryConfig object no entryTime, triggers[] Delayed or trigger-based entry conditions.
exitConfig object no stop-loss, target, exit time Exit conditions for that independent order.
icebergInfo object no numberOfLegs or maxQtyPerLeg Iceberg slicing for that order.
algoId str no string Algo identifier when applicable.
stratTags list[str] no strings Strategy or tracking tags.
echoFields str no string Free-form metadata echoed back by Trading API V3.
orderId int no integer Present in the SDK model but not normally sent for new create requests.
isMultiLeg bool yes False Keep False for every item on this page.
legs list no omit Do not use on this page. Use the FNO leg page instead.

Nested Condition Fields

Field Type Required Allowed values / shape Meaning
entryConfig.entryTime str no date/time string Entry activation time for that order.
entryConfig.triggers[].kind str yes for trigger ABOVE, BELOW, AT_OR_ABOVE, AT_OR_BELOW Trigger comparison.
entryConfig.triggers[].value int yes for trigger price integer Trigger threshold.
exitConfig.stoplossParams.stoplossTriggerPrice object no {"value": int} or {"disabled": true} Stop-loss trigger price wrapper.
exitConfig.stoplossParams.stoplossLimitPrice object no {"value": int} or {"disabled": true} Stop-loss limit price wrapper.
exitConfig.stoplossParams.stoplossTrailJump float no number Trailing stop jump.
exitConfig.targetParams.targetProfitTriggerPrice object no {"value": int} or {"disabled": true} Target trigger price wrapper.
exitConfig.targetParams.targetProfitLimitPrice object no {"value": int} or {"disabled": true} Target limit price wrapper.
exitConfig.exitTime str no date/time string Time-based exit.
icebergInfo.numberOfLegs int conditional integer Number of iceberg slices. Mutually exclusive with maxQtyPerLeg.
icebergInfo.maxQtyPerLeg int conditional integer Maximum quantity per iceberg slice. Mutually exclusive with numberOfLegs.

Response Fields

Field Type Meaning
orders list[IntentOrderResponse] One response item per submitted independent order.
orders[].intentOrderId int Trading API V3 order identifier.
orders[].status str Current order status.
orders[].isMulti bool False for these independent single orders.
orders[].refId int Instrument reference ID.
orders[].refData RefDataWrapper Instrument metadata.
orders[].orderQty int Order quantity.
orders[].filledQty int Filled quantity.
orders[].deliveryType str Delivery type.
orders[].priceType str Price type.
orders[].validityType str Validity type.
orders[].executionMode str Execution mode for that returned order item.
orders[].entryConfig IntentOrderEntryConfig Entry conditions as returned by Trading API V3.
orders[].exitConfig list[IntentOrderExitTrigger] Exit triggers as returned by Trading API V3.
orders[].stratTags list[str] Strategy tags.
orders[].echoFields str Echo metadata.
orders[].rejectionMsg str Rejection reason when rejected.
orders[].timestamps IntentOrderTimestamps Lifecycle timestamps.

Important Rules

Important Rules

  • orders must be non-empty.
  • Every item is validated independently.
  • Every item needs its own refId, qty, side, deliveryType, isMultiLeg: False, and executionMode.
  • Do not use isMultiLeg=True or legs here; that creates one leg-based strategy order, not multiple independent single orders.
  1. Place Single Order
  2. Place Flexi Order
  3. Get Margin
NEO Assistant