Place Strategy Order¶
Use this page to place one leg-based Trading API V3 FNO strategy order through the REST API.
A strategy order sets isMultiLeg: true and sends a non-empty legs list. The strategy is treated as one order object, with one strategy-level intentOrderId in the response.
Strategy orders help users build complex FNO strategies by grouping multiple option or future legs into one strategy order.
With basket-level execution, users can choose strategy-level entry and exit controls without breaking the strategy into separate independent orders. Price-based entry, time-based entry, target, stop-loss, trailing stop-loss, and GTE-style validity can all be expressed through the same REST strategy payload shape.
Scope
Use this page for one strategy order composed from FNO legs.
This shape:
- sets
isMultiLeg: true - omits top-level
refId - sends
legs - uses one top-level
qtyfor the full strategy - uses
legs[].unitQtyfor leg-level multipliers
Price and quantity format
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. If both legs trade in 65-lot contracts, one strategy unit is usually qty: 65 with unitQty: 1 on each leg. To scale the full strategy to two strategy units, set qty: 130. To scale only one leg, keep the same base qty and adjust that leg's unitQty.
Basic Usage¶
{
"orders": [
{
"isMultiLeg": true,
"qty": 65,
"side": "BUY",
"deliveryType": "CNC",
"priceType": "LIMIT",
"validityType": "DAY",
"executionMode": "ENTRY",
"entryPrice": 44935,
"legs": [
{
"refId": 1497712,
"unitQty": 1
},
{
"refId": 1497713,
"unitQty": 1
}
],
"stratTags": ["rest-api-v3", "basic-strategy-order"]
}
]
}
Example Strategy Payload Notes¶
- each leg is passed through
legs - strategy-level pricing and controls stay on the top-level order object
- option
refIdvalues should be resolved before placement - set
isMultiLeg: true, set strategyside, 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 - there is no separate top-level basket
multiplierfield in this strategy shape; scale the whole strategy throughqty
Multi-Leg Behavior¶
Strategy quantity uses two layers:
qty: the common executable base quantity for the full strategylegs[].unitQty: the per-leg multiplier
For a one-lot NIFTY straddle:
- top-level
qtyis65 - each leg uses
unitQty: 1 - each leg expands to
orderQty: 65in the response
If you want to scale the whole strategy, increase the top-level base quantity appropriately and keep unitQty as the leg multiplier. If you want to scale only one leg, keep the same base quantity and change only that leg's unitQty.
Execution Modes¶
| Value | Use |
|---|---|
ENTRY |
Entry-only strategy order |
ENTRY_AND_EXIT |
Strategy order with target, stop-loss, trailing stop-loss, timed exit, or a combination of these |
EXIT |
Exit-only strategy management workflow |
REST Payload Shape¶
{
"orders": [
{
"isMultiLeg": true,
"qty": 65,
"side": "BUY",
"deliveryType": "CNC",
"priceType": "LIMIT",
"validityType": "DAY",
"executionMode": "ENTRY",
"entryPrice": 44935,
"legs": [
{ "refId": 1497712, "unitQty": 1 },
{ "refId": 1497713, "unitQty": 1 }
],
"stratTags": ["rest-api-v3", "basic-strategy-order"]
}
]
}
Strategy Order Fields¶
| Field | Type | Required | Description |
|---|---|---|---|
orders[].isMultiLeg |
boolean | Yes | Must be true for strategy orders |
orders[].qty |
int | Yes | Common executable base quantity for the strategy |
orders[].side |
enum | Yes | Strategy direction |
orders[].deliveryType |
enum | Yes | CNC or IDAY |
orders[].priceType |
enum | Yes | LIMIT or MARKET |
orders[].validityType |
enum | Yes | DAY or GTE depending on the payload |
orders[].executionMode |
enum | Yes | ENTRY, ENTRY_AND_EXIT, or EXIT |
orders[].entryPrice |
int | Conditional | Strategy net entry price for limit-based strategies |
orders[].goodTillDate |
string | Conditional | Required for GTE strategy payloads |
orders[].legs |
array | Yes | Strategy leg definitions |
orders[].legs[].refId |
int | Yes | Instrument reference id for the leg |
orders[].legs[].unitQty |
int | Yes | Leg multiplier |
Condition Fields¶
| Field | Type | Description |
|---|---|---|
entryConfig.triggers.* |
object | Entry trigger controls |
entryConfig.entryTime |
string | Timed entry in ISO format |
exitConfig.stoplossParams.* |
object | Stop-loss controls |
exitConfig.targetParams.* |
object | Target controls |
exitConfig.exitTime |
string | Timed exit in ISO format |
Response Fields¶
| Field | Meaning |
|---|---|
intentOrderId |
Strategy-level Trading API V3 order id |
isMulti |
Indicates the returned order is a multi-leg strategy |
legs[].unitQty |
Multiplier used for each leg |
legs[].orderQty |
Expanded final quantity for the leg |
orderQty |
Final accepted top-level strategy quantity |
intentOrderType |
Normalized strategy response family |
Response Shape¶
{
"message": "order creation request pushed successfully",
"orders": [
{
"intentOrderId": 9965,
"exchange": "NSE",
"status": "OPEN",
"isMulti": true,
"legs": [
{
"refId": 1497712,
"unitQty": 1,
"orderQty": 65,
"filledQty": 0,
"filledPrice": 0
},
{
"refId": 1497713,
"unitQty": 1,
"orderQty": 65,
"filledQty": 0,
"filledPrice": 0
}
],
"filledQty": 0,
"orderQty": 65,
"deliveryType": "CNC",
"priceType": "LIMIT",
"validityType": "DAY",
"executionMode": "ENTRY",
"stratTags": ["rest-api-v3", "basic-strategy-order"],
"orderPrice": 44935,
"intentOrderType": "REGULAR",
"side": "BUY"
}
]
}
Important Rules¶
- every leg must use a unique instrument
- all legs must belong to the same exchange
- choose
qtyas the common executable base quantity derived from the leg lot sizes - use
unitQtyas the leg multiplier, not as the absolute lot size - there is no separate basket-level multiplier field; scale the full strategy through
qty - keep the same
qtyandunitQtylogic in both placement and margin-estimation payloads so the estimated strategy matches the placed strategy