Place Strategy Order¶
create_order() places one leg-based Trading API V3 FNO strategy order when the order object sets isMultiLeg=True and provides a non-empty legs list.
Strategy orders help users build complex FNO strategies with ease by grouping multiple option or future legs into one strategy order.
With basket-level execution, users can choose strategy-level entry and/or exit configs. Both time-based and price-based entry and exits are possible, along with trailing stop-loss and other trigger configurations.
LLM guidance
Use this page for one strategy order composed from FNO legs. This shape omits top-level refId, requires isMultiLeg=True, sets the strategy-level side, and uses legs[].refId plus signed legs[].unitQty. Set executionMode based on the top-level entry and exit fields. Do not use this page for multiple independent single orders; use Place Multiple Orders.
All examples on this page assume the SDK client is initialized with trading_version=TradingAPIVersion.V3. The account-side Sentinel/OMS flag must also be enabled before V3 trading requests will execute.
Price and quantity format
Trading API V3 examples on this page use rupee prices snapped to the live contract tick_size. For strategy quantities, use qty as the common executable base quantity derived from the leg lot sizes, and use legs[].unitQty as the lot multiplier for each leg. For example, if both legs trade in 65-lot contracts, set qty: 65 for one strategy unit and unitQty: 1 on each leg. If you want to scale the whole strategy to two strategy units, set qty: 130. If you want two lots only on one leg, keep the same base qty and set that leg's unitQty: 2. Use a negative unitQty for short legs.
Basic Usage¶
from datetime import datetime
from nubra_python_sdk.refdata.instruments import InstrumentData
from nubra_python_sdk.marketdata.market_data import MarketData
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, trading_version=TradingAPIVersion.V3)
instruments = InstrumentData(nubra)
market_data = MarketData(nubra)
trader = NubraTrader(nubra)
def get_option_contract(asset, strike, expiry, option_type):
expiry_key = datetime.strptime(expiry, "%d-%m-%Y").strftime("%Y%m%d")
result = instruments.get_instruments_by_pattern([{
"exchange": "NSE",
"asset": asset,
"strike_price": str(strike * 100),
"expiry": expiry_key,
"option_type": option_type,
}])
if not result:
raise ValueError(f"No contract found for {asset} {strike} {expiry} {option_type}")
instrument = result[0]
quote = market_data.quote(ref_id=instrument.ref_id, levels=1)
return {
"ref_id": int(instrument.ref_id),
"lot_size": int(instrument.lot_size),
"tick_size": float(instrument.tick_size),
"ltp": float(quote.orderBook.last_traded_price),
}
def to_tick(price: float, tick_size: float) -> float:
return round(round(price / tick_size) * tick_size, 2)
long_call = get_option_contract("NIFTY", 23400, "16-06-2026", "CE")
long_put = get_option_contract("NIFTY", 23400, "16-06-2026", "PE")
lot_size = long_call["lot_size"]
tick_size = long_call["tick_size"]
entry_price = to_tick(long_call["ltp"] + long_put["ltp"], tick_size)
result = trader.create_order({
"isMultiLeg": True,
"qty": lot_size,
"side": "BUY",
"deliveryType": "CNC",
"priceType": "LIMIT",
"validityType": "DAY",
"executionMode": "ENTRY_AND_EXIT",
"entryPrice": entry_price,
"legs": [
{"refId": long_call["ref_id"], "unitQty": 1},
{"refId": long_put["ref_id"], "unitQty": 1}
],
"entryConfig": {
"triggers": {
"ltp": {
"atOrAbove": {"value": to_tick(entry_price + 10, tick_size)}
}
}
},
"exitConfig": {
"stoplossParams": {
"stoplossTriggerPrice": {"value": to_tick(entry_price - 40, tick_size)},
"stoplossLimitPrice": {"value": to_tick(entry_price - 50, tick_size)}
},
"targetParams": {
"targetProfitTriggerPrice": {"value": to_tick(entry_price + 80, tick_size)},
"targetProfitLimitPrice": {"value": to_tick(entry_price + 70, tick_size)}
}
},
"stratTags": ["python-sdk-v3", "nifty-buy-straddle"],
})
print(result)
Example Order Patterns¶
These examples show common option strategy orders built with Trading API V3 multi-leg payloads.
- each leg is passed through
legs - strategy-level pricing and controls stay on the top-level order object
- option
refIdvalues are resolved dynamically before order placement - set
isMultiLeg: True, set strategyside: "BUY", omit top-levelrefId, and set the correctexecutionMode - use
qtyas the common executable base quantity for the strategy andlegs[].unitQtyas the signed lot multiplier for each leg - strategy orders can combine
validityType: "GTE",goodTillDate, price and time entry, stop-loss, trailing stop-loss, and target in the same payload - if you use
validityType: "GTE", do not addexitConfig.exitTime - resolve
lot_sizeandtick_sizefrom instruments instead of hardcoding values such as65
from datetime import datetime
from nubra_python_sdk.refdata.instruments import InstrumentData
from nubra_python_sdk.marketdata.market_data import MarketData
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, trading_version=TradingAPIVersion.V3)
instruments = InstrumentData(nubra)
market_data = MarketData(nubra)
trader = NubraTrader(nubra)
def get_option_contract(asset, strike, expiry, option_type):
expiry_key = datetime.strptime(expiry, "%d-%m-%Y").strftime("%Y%m%d")
matches = instruments.get_instruments_by_pattern([{
"exchange": "NSE",
"asset": asset,
"strike_price": str(strike * 100),
"expiry": expiry_key,
"option_type": option_type,
}])
if not matches:
raise ValueError(f"No contract found for {asset} {strike} {expiry} {option_type}")
contract = matches[0]
quote = market_data.quote(ref_id=contract.ref_id, levels=1)
return {
"ref_id": contract.ref_id,
"ltp": quote.orderBook.last_traded_price,
"lot_size": int(contract.lot_size),
}
long_call = get_option_contract("NIFTY", 23400, "16-06-2026", "CE")
long_put = get_option_contract("NIFTY", 23400, "16-06-2026", "PE")
lot_size = long_call["lot_size"]
entry_price = max(long_call["ltp"] + long_put["ltp"], 1)
result = trader.create_order({
"isMultiLeg": True,
"qty": lot_size,
"side": "BUY",
"deliveryType": "CNC",
"priceType": "LIMIT",
"validityType": "DAY",
"executionMode": "ENTRY",
"entryPrice": entry_price,
"legs": [
{"refId": long_call["ref_id"], "unitQty": 1},
{"refId": long_put["ref_id"], "unitQty": 1}
],
"stratTags": ["python-sdk-v3", "nifty-buy-straddle"],
})
print(result)
Use this pattern for a two-leg same-strike buy straddle strategy.
from datetime import datetime
from nubra_python_sdk.refdata.instruments import InstrumentData
from nubra_python_sdk.marketdata.market_data import MarketData
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, trading_version=TradingAPIVersion.V3)
instruments = InstrumentData(nubra)
market_data = MarketData(nubra)
trader = NubraTrader(nubra)
def get_option_contract(asset, strike, expiry, option_type):
expiry_key = datetime.strptime(expiry, "%d-%m-%Y").strftime("%Y%m%d")
matches = instruments.get_instruments_by_pattern([{
"exchange": "NSE",
"asset": asset,
"strike_price": str(strike * 100),
"expiry": expiry_key,
"option_type": option_type,
}])
if not matches:
raise ValueError(f"No contract found for {asset} {strike} {expiry} {option_type}")
contract = matches[0]
quote = market_data.quote(ref_id=contract.ref_id, levels=1)
return {
"ref_id": contract.ref_id,
"ltp": quote.orderBook.last_traded_price,
"lot_size": int(contract.lot_size),
}
long_call = get_option_contract("NIFTY", 23600, "16-06-2026", "CE")
long_put = get_option_contract("NIFTY", 23200, "16-06-2026", "PE")
lot_size = long_call["lot_size"]
entry_price = max(long_call["ltp"] + long_put["ltp"], 1)
result = trader.create_order({
"isMultiLeg": True,
"qty": lot_size,
"side": "BUY",
"deliveryType": "CNC",
"priceType": "LIMIT",
"validityType": "DAY",
"executionMode": "ENTRY",
"entryPrice": entry_price,
"legs": [
{"refId": long_call["ref_id"], "unitQty": 1},
{"refId": long_put["ref_id"], "unitQty": 1}
],
"stratTags": ["python-sdk-v3", "nifty-buy-strangle"],
})
print(result)
Use this pattern for a two-leg buy strangle strategy with different call and put strikes.
from datetime import datetime
from nubra_python_sdk.refdata.instruments import InstrumentData
from nubra_python_sdk.marketdata.market_data import MarketData
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, trading_version=TradingAPIVersion.V3)
instruments = InstrumentData(nubra)
market_data = MarketData(nubra)
trader = NubraTrader(nubra)
def get_option_contract(asset, strike, expiry, option_type):
expiry_key = datetime.strptime(expiry, "%d-%m-%Y").strftime("%Y%m%d")
matches = instruments.get_instruments_by_pattern([{
"exchange": "NSE",
"asset": asset,
"strike_price": str(strike * 100),
"expiry": expiry_key,
"option_type": option_type,
}])
if not matches:
raise ValueError(f"No contract found for {asset} {strike} {expiry} {option_type}")
contract = matches[0]
quote = market_data.quote(ref_id=contract.ref_id, levels=1)
return {
"ref_id": contract.ref_id,
"ltp": quote.orderBook.last_traded_price,
"lot_size": int(contract.lot_size),
"tick_size": int(contract.tick_size),
}
def to_tick(price, tick_size):
return max(int(round(price / tick_size) * tick_size), tick_size)
long_call = get_option_contract("NIFTY", 23400, "16-06-2026", "CE")
short_call = get_option_contract("NIFTY", 23600, "16-06-2026", "CE")
lot_size = long_call["lot_size"]
tick_size = long_call["tick_size"]
entry_price = to_tick(max(long_call["ltp"] - short_call["ltp"], tick_size), tick_size)
stoploss_trigger = to_tick(max(entry_price - 40, tick_size), tick_size)
stoploss_limit = to_tick(max(entry_price - 50, tick_size), tick_size)
target_trigger = to_tick(entry_price + 80, tick_size)
target_limit = to_tick(entry_price + 70, tick_size)
result = trader.create_order({
"isMultiLeg": True,
"qty": lot_size,
"side": "BUY",
"deliveryType": "CNC",
"priceType": "LIMIT",
"validityType": "GTE",
"goodTillDate": "2026-10-16T15:10:00.000Z",
"executionMode": "ENTRY_AND_EXIT",
"entryPrice": entry_price,
"legs": [
{"refId": long_call["ref_id"], "unitQty": 1},
{"refId": short_call["ref_id"], "unitQty": -1}
],
"entryConfig": {
"entryTime": "2026-10-16T09:20:00.000Z",
"triggers": {
"ltp": {
"atOrAbove": {"value": to_tick(entry_price + 10, tick_size)}
}
}
},
"exitConfig": {
"stoplossParams": {
"stoplossTriggerPrice": {"value": stoploss_trigger},
"stoplossLimitPrice": {"value": stoploss_limit},
"stoplossTrailJump": 5
},
"targetParams": {
"targetProfitTriggerPrice": {"value": target_trigger},
"targetProfitLimitPrice": {"value": target_limit}
}
},
"stratTags": ["python-sdk-v3", "nifty-bull-call-flexible"],
})
print(result)
Use this pattern for a two-leg bull call spread that combines good-till validity, price and time entry, stop-loss, trailing stop-loss, and target controls.
Replace the sample entryTime and goodTillDate values before running the code. They are illustrative placeholders and should be updated to valid values for your current testing window.
from datetime import datetime
from nubra_python_sdk.refdata.instruments import InstrumentData
from nubra_python_sdk.marketdata.market_data import MarketData
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, trading_version=TradingAPIVersion.V3)
instruments = InstrumentData(nubra)
market_data = MarketData(nubra)
trader = NubraTrader(nubra)
def get_option_contract(asset, strike, expiry, option_type):
expiry_key = datetime.strptime(expiry, "%d-%m-%Y").strftime("%Y%m%d")
matches = instruments.get_instruments_by_pattern([{
"exchange": "NSE",
"asset": asset,
"strike_price": str(strike * 100),
"expiry": expiry_key,
"option_type": option_type,
}])
if not matches:
raise ValueError(f"No contract found for {asset} {strike} {expiry} {option_type}")
contract = matches[0]
quote = market_data.quote(ref_id=contract.ref_id, levels=1)
return {
"ref_id": contract.ref_id,
"ltp": quote.orderBook.last_traded_price,
"lot_size": int(contract.lot_size),
}
long_put = get_option_contract("NIFTY", 23000, "16-06-2026", "PE")
short_put = get_option_contract("NIFTY", 23200, "16-06-2026", "PE")
short_call = get_option_contract("NIFTY", 23600, "16-06-2026", "CE")
long_call = get_option_contract("NIFTY", 23800, "16-06-2026", "CE")
lot_size = long_put["lot_size"]
entry_price = max(long_put["ltp"] - short_put["ltp"] - short_call["ltp"] + long_call["ltp"], 1)
result = trader.create_order({
"isMultiLeg": True,
"qty": lot_size,
"side": "BUY",
"deliveryType": "CNC",
"priceType": "LIMIT",
"validityType": "DAY",
"executionMode": "ENTRY",
"entryPrice": entry_price,
"legs": [
{"refId": long_put["ref_id"], "unitQty": 1},
{"refId": short_put["ref_id"], "unitQty": -1},
{"refId": short_call["ref_id"], "unitQty": -1},
{"refId": long_call["ref_id"], "unitQty": 1}
],
"stratTags": ["python-sdk-v3", "nifty-iron-condor"],
})
print(result)
Use this pattern for a four-leg defined-risk short-volatility strategy with wider protective wings.
from datetime import datetime
from nubra_python_sdk.refdata.instruments import InstrumentData
from nubra_python_sdk.marketdata.market_data import MarketData
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, trading_version=TradingAPIVersion.V3)
instruments = InstrumentData(nubra)
market_data = MarketData(nubra)
trader = NubraTrader(nubra)
def get_option_contract(asset, strike, expiry, option_type):
expiry_key = datetime.strptime(expiry, "%d-%m-%Y").strftime("%Y%m%d")
matches = instruments.get_instruments_by_pattern([{
"exchange": "NSE",
"asset": asset,
"strike_price": str(strike * 100),
"expiry": expiry_key,
"option_type": option_type,
}])
if not matches:
raise ValueError(f"No contract found for {asset} {strike} {expiry} {option_type}")
contract = matches[0]
quote = market_data.quote(ref_id=contract.ref_id, levels=1)
return {
"ref_id": contract.ref_id,
"ltp": quote.orderBook.last_traded_price,
"lot_size": int(contract.lot_size),
}
long_put = get_option_contract("NIFTY", 23200, "16-06-2026", "PE")
short_put = get_option_contract("NIFTY", 23400, "16-06-2026", "PE")
short_call = get_option_contract("NIFTY", 23400, "16-06-2026", "CE")
long_call = get_option_contract("NIFTY", 23600, "16-06-2026", "CE")
lot_size = long_put["lot_size"]
entry_price = max(long_put["ltp"] - short_put["ltp"] - short_call["ltp"] + long_call["ltp"], 1)
result = trader.create_order({
"isMultiLeg": True,
"qty": lot_size,
"side": "BUY",
"deliveryType": "CNC",
"priceType": "LIMIT",
"validityType": "DAY",
"executionMode": "ENTRY",
"entryPrice": entry_price,
"legs": [
{"refId": long_put["ref_id"], "unitQty": 1},
{"refId": short_put["ref_id"], "unitQty": -1},
{"refId": short_call["ref_id"], "unitQty": -1},
{"refId": long_call["ref_id"], "unitQty": 1}
],
"stratTags": ["python-sdk-v3", "nifty-iron-butterfly"],
})
print(result)
Use this pattern for a four-leg strategy with the short call and short put at the same strike.
Multi-Leg Behavior¶
When isMultiLeg is True, Trading API V3 treats the payload as one strategy order made from legs.
| Rule | Meaning |
|---|---|
isMultiLeg: True |
Selects the leg-based validation path. |
no top-level refId |
The instrument lives on each leg through legs[].refId. |
top-level side is required |
Use side: "BUY" for the strategy order. Leg direction still lives on each leg through the sign of legs[].unitQty. |
legs must be non-empty |
Each leg needs its own FNO refId and signed unitQty. |
qty is the common executable base quantity |
Use the base executable quantity derived from the leg lot sizes. For same-lot NIFTY option legs, one strategy unit is typically qty: 65. To scale the full strategy, multiply that base quantity at the top level. |
legs[].unitQty is the signed leg lot multiplier |
Positive values are buy legs and negative values are sell legs. 1 means one lot of that leg, 2 means two lots of that leg, and so on. |
| entry and exit controls are top-level | entryPrice, entryConfig, and exitConfig apply to the strategy order, not to individual legs. |
Execution Modes¶
Use executionMode to match the strategy lifecycle fields in the payload.
| Payload shape | executionMode |
Meaning |
|---|---|---|
The strategy has entryPrice and/or entryConfig, and no exitConfig. |
ENTRY |
Entry-only multi-leg strategy order. |
The strategy has no entryPrice or entryConfig, and has exitConfig. |
EXIT |
Exit-only multi-leg strategy order. |
The strategy has entryPrice and/or entryConfig, and also has exitConfig. |
ENTRY_AND_EXIT |
Entry multi-leg strategy order with attached stop-loss, target, trailing stop-loss, or timed exit. |
Multi-leg execution mode
executionMode is still required for the strategy order. The difference from single order is that isMultiLeg=True moves instrument direction into legs[], while executionMode still describes whether the strategy payload is defining entry, exit, or both.
Strategy side and leg direction
The top-level side is the strategy-level side required by the Trading API V3 strategy order shape. Individual leg direction is controlled by signed legs[].unitQty: positive values are buy legs and negative values are sell legs.
Python SDK Payload Shape¶
Pass one strategy dictionary to trader.create_order().
{
"isMultiLeg": true,
"qty": 65,
"side": "BUY",
"deliveryType": "CNC",
"priceType": "LIMIT",
"validityType": "DAY",
"executionMode": "ENTRY",
"entryPrice": 0,
"legs": [
{"refId": 111111, "unitQty": 1},
{"refId": 222222, "unitQty": -1}
]
}
Strategy Order Fields¶
| Field | Type | Required | Allowed values / shape | Meaning |
|---|---|---|---|---|
isMultiLeg |
bool |
yes | True |
Enables the leg-based order validation path. |
legs |
list[LegRequest] |
yes | non-empty list | FNO legs inside this one strategy order. |
legs[].refId |
int |
yes | instrument ref ID | FNO instrument reference ID for that leg. |
legs[].unitQty |
int |
yes | signed leg lot multiplier | Per-leg lot multiplier. Use positive values for buy legs and negative values for sell legs. 1 means one lot of that leg, 2 means two lots, and so on. |
qty |
int |
yes | positive integer | Common executable base quantity for the strategy. For same-lot strategies, this is usually the live instrument lot_size. For mixed-lot strategies, use the common executable quantity derived from the leg lot sizes. To scale the full strategy, multiply this base quantity at the top level. |
side |
str |
yes | BUY |
Strategy-level order side required by the current strategy order placement path. Leg buy/sell direction is still represented by signed unitQty. |
deliveryType |
str |
yes | CNC |
Product / delivery type for the strategy order examples. Current Trading API V3 strategy order placement expects CNC for this strategy shape. |
priceType |
str |
no | LIMIT, MARKET |
Price behavior for the strategy order. |
validityType |
str |
no | DAY, IOC, GTE, AMO |
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 the strategy order. Match this to the entry and exit fields in the payload. |
entryPrice |
int |
conditional | price integer | Strategy entry price or net price, as expected by Trading API V3. Required for price-based ENTRY and ENTRY_AND_EXIT payloads. Omit for EXIT-only payloads. |
entryConfig |
object |
no | see below | Delayed or trigger-based strategy entry conditions. |
exitConfig |
object |
no | see below | Strategy stop-loss, target, trailing stop, or time exit settings. |
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. |
refId |
int |
no | omit | Must be absent when isMultiLeg=True. |
icebergInfo |
object |
no | omit unless Trading API V3 enables it for this strategy | Iceberg fields exist on the SDK model, but are not part of the normal leg-based strategy shape. |
Condition Fields¶
| Field | Type | Required | Allowed values / shape | Meaning |
|---|---|---|---|---|
entryConfig.entryTime |
str |
no | date/time string | Time at which the strategy entry can activate. |
entryConfig.triggers.ltp |
object |
no | one or more LTP comparisons | Container for LTP trigger comparisons. |
entryConfig.triggers.ltp.above.value |
int |
conditional | price integer | Trigger when the live price moves above the threshold. |
entryConfig.triggers.ltp.below.value |
int |
conditional | price integer | Trigger when the live price moves below the threshold. |
entryConfig.triggers.ltp.atOrAbove.value |
int |
conditional | price integer | Trigger when the live price reaches or exceeds the threshold. |
entryConfig.triggers.ltp.atOrBelow.value |
int |
conditional | price integer | Trigger when the live price reaches or falls below the 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. |
Response Fields¶
| Field | Type | Meaning |
|---|---|---|
orders |
list[IntentOrderResponse] |
Created Trading API V3 strategy orders. This request normally returns one item. |
orders[].intentOrderId |
int |
Trading API V3 strategy order identifier. |
orders[].status |
str |
Current order status. |
orders[].isMulti |
bool |
True for leg-based strategy orders. |
orders[].exchange |
str |
Exchange. |
orders[].legs |
list[IntentOrderLeg] |
Leg details returned by Trading API V3. |
orders[].legs[].refId |
int |
Leg instrument reference ID. |
orders[].legs[].unitQty |
int |
Signed leg unit quantity. |
orders[].legs[].orderQty |
int |
Expanded leg order quantity. |
orders[].legs[].filledQty |
int |
Filled quantity for the leg. |
orders[].legs[].filledPrice |
int |
Fill price for the leg. |
orders[].legs[].refData |
RefData |
Leg instrument metadata. |
orders[].orderQty |
int |
Strategy quantity. |
orders[].deliveryType |
str |
Delivery type. |
orders[].priceType |
str |
Price type. |
orders[].validityType |
str |
Validity type. |
orders[].executionMode |
str |
Execution mode. |
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[].entryPrice |
int |
Strategy entry price. |
orders[].ltp |
int |
Latest traded price. |
orders[].orderPrice |
int |
Order price. |
orders[].filledPrice |
int |
Fill price. |
orders[].rejectionMsg |
str |
Rejection reason when rejected. |
orders[].timestamps |
IntentOrderTimestamps |
Lifecycle timestamps. |
orders[].positionId |
str |
Position identifier when available. |
orders[].intentOrderType |
str |
Trading API V3 intent order type. |
Important Rules¶
Important Rules
- This is one strategy order, not multiple independent orders.
isMultiLegmust beTrue.legsmust be non-empty.- Top-level
refIdmust be absent. - Top-level
sideshould beBUYfor the strategy shape; leg direction is represented by signedlegs[].unitQty. - Use FNO
refIdvalues inlegs[]. - Use
deliveryType: "CNC"for the strategy order payload. - Use
qtyas the common executable strategy quantity andlegs[].unitQtyas the per-leg signed lot multiplier. - Use integer paise for all prices, and snap limit or trigger values to the contract
tick_size. - Use
ENTRY_AND_EXITwhen the same strategy payload has both entry fields andexitConfig. - Use Get Margin before placement when margin impact matters.