Skip to Content
Getting StartedAPI GuidesOrder Placement Guide

Order Placement Guide

Note: SEBI’s retail algo trading regulations are now in effect. To check the changes related to the algo trading regulations, refer to the SEBI algo trading rules .

The order placement process requires you to carefully input several parameters at the time of making the request. There are several validations which are required to be done before sending the request.

Overview - Sync and Async APIs

Sync APIs (/sync)

All existing /sync order endpoints (single order, multi order, multi-leg order and related /sync flows documented under Sync Order Placement) remain unchanged in request shape and response shape. They continue to return the exchange order reference id (and other fields). Execution is subject to a 10 orders per second (OPS) limit.

Async APIs (/async)

Async counterparts use the same request bodies and HTTP methods as sync where applicable, but target:

  • POST https://<host>/api/v3/orders/async — place order (intraday / margin / CNC, same attributes as sync).
  • PATCH https://<host>/api/v3/orders/async — modify order (same body rules as sync; id in the body is the order reference once known).
  • DELETE https://<host>/api/v3/orders/async — cancel order (JSON body with id, same idea as sync).

Note: stopLoss and takeProfit are not supported with Async Order Placement.

Queuing: When you call an async endpoint, the request is accepted and queued immediately. A queuing mechanism drains the queue and sends work downstream at most 10 orders per second (aligned with the OPS limit). High burst traffic is absorbed in the queue rather than failing fast for rate at the HTTP edge. Final placement, modification or cancellation outcomes are not implied by an HTTP 200 alone.

Immediate HTTP response: On success, the async API returns id_fyers (the FYERS system identifier for the queued/async operation). It does not return id (exchange order number) in this immediate response. Use id_fyers to correlate with:

  • General WebSocket — subscribe to order updates; payloads include identifiers such as id and id_fyers (see General WebSocket Overview).
  • GET APIs — for example the order book GET /api/v3/orders and related transaction GET APIs (see Order Book).

Hosts: The examples use https://api-t1.fyers.in; other environments may use the same path suffixes on a different host (for example https://api-y1.fyers.in). Set <host> accordingly.

Reference collection: Parity with the internal Postman collection Async apiv3 orders (place/modify/cancel).

Order Types

Limit Order

  • type: 1
  • A limit order allows you to buy or sell an asset at a specific price (limitPrice) or better. It will only be executed at the specified price or lower for a buy order, and at the specified price or higher for a sell order.

Sample input:

{ "symbol": "NSE:SBIN-EQ", "qty": 100, "type": 1, "side": 1, "productType": "INTRADAY", "limitPrice": 100, "stopPrice": 0, "validity": "DAY", "stopLoss": 0, "takeProfit": 0, "offlineOrder": false, "disclosedQty": 0, "isSliceOrder" : false }

Market Order (MPP)

  • type: 2 (MPP: Market Price Protection )
  • A market order allows you to buy or sell an asset at the current market price. The limitPrice and stopPrice should be set to 0, as they are not used in this order type.

Sample input:

{ "symbol": "NSE:SBIN-EQ", "qty": 100, "type": 2, "side": 1, "productType": "INTRADAY", "limitPrice": 0, "stopPrice": 0, "validity": "DAY", "stopLoss": 0, "takeProfit": 0, "offlineOrder": false, "disclosedQty": 0, "isSliceOrder" : false }

Stop Order / SL-M (MPP)

  • type: 3
  • A stop order is designed to limit losses on a position. It becomes a market order (MPP: Market Price Protection ) when the stopPrice is reached. The stopPrice is the trigger price at which the market order will be placed.
  • The stopPrice must not be higher than the Last Traded Price (ltp) for a sell order and not lower than the ltp for a buy order.

Sample input:

{ "symbol": "NSE:SBIN-EQ", "qty": 100, "type": 3, "side": 1, "productType": "INTRADAY", "limitPrice": 0, "stopPrice": 100, "validity": "DAY", "stopLoss": 0, "takeProfit": 0, "offlineOrder": false, "disclosedQty": 0, "isSliceOrder" : false }

Stop Limit Order / SL-L

  • type: 4
  • A stop-limit order combines features of a stop order and a limit order. It triggers a limit order once the stopPrice is reached.
  • The stopPrice must not be higher than the Last Traded Price (ltp) for a sell order and not lower than the ltp for a buy order.
  • The stopPrice must be lower than the limitPrice for a buy order and higher than the limitPrice for a sell order.

Sample input:

{ "symbol": "NSE:SBIN-EQ", "qty": 100, "type": 4, "side": 1, "productType": "INTRADAY", "limitPrice": 100, "stopPrice": 95, "validity": "DAY", "stopLoss": 0, "takeProfit": 0, "offlineOrder": false, "disclosedQty": 0, "isSliceOrder" : false }

Product Types

  • Intraday
    • Used to place orders which will be bought and sold the same day.
    • Order type can be anything (Market, Limit, Stop and Stop Limit).
  • CNC
    • Used to place orders only in stocks which will be carried forward.
    • Order type can be anything (Market, Limit, Stop and Stop Limit).
  • Margin
    • Used to place orders in derivative contracts which will be carried forward.
    • Order type can be anything (Market, Limit, Stop and Stop Limit).
  • Margin Trading Facility (MTF)
    • This order type is for placing trades with additional margin.
    • MTF orders require activation.
    • Only stocks from the approved MTF list are allowed.
    • Supported order types: Market, Limit, Stop and Stop Limit.

Take Profit and Stop Loss (TPSL) orders

Take Profit and Stop Loss (TPSL) orders are linked to a parent order. Which API you use depends on whether the parent order is still pending or has executed into an open position.

  • From order placement (new order): the parent order is placed but not yet executed. Use the Orders API (order modification).
  • From open position: the parent order has executed and you hold an open position. Use the Positions API (position modification), PATCH /api/v3/positions.

TPSL is supported for the INTRADAY, CNC, MARGIN and MTF product types.

Creating TPSL

From order placement (new order)

Use the Orders API Single Order and send the takeProfit and stopLoss parameters with the order, using an applicable supported productType (INTRADAY, CNC, MARGIN or MTF). TPSL is supported only with sync order placement; async order placement does not support takeProfit and stopLoss.

From open position

Use the Positions API Set Stop Loss & Target. Send the positionId with takeProfit and/or stopLoss. qty is optional and can’t be more than the position quantity.

Modifying TPSL

From order placement (new order)

While the parent order is pending (not yet executed), use the Orders API Modify Single Order and send the new takeProfit and/or stopLoss values.

From open position

Once the parent order has executed and you have an open position, use the Positions API Modify Stop Loss & Target. Send only the parameters you want to change; any parameter you leave out keeps its current value.

Cancelling TPSL

From order placement (new order)

If a pending parent order is cancelled using the Orders API Cancel Single Order, its linked Take Profit and Stop Loss orders are cancelled automatically.

To cancel only the linked Take Profit or Stop Loss without cancelling the parent order, use the Orders API Modify Single Order and pass null for the applicable takeProfit or stopLoss parameter. Pass both parameters as null to cancel both.

From open position

Use the Positions API Cancel Stop Loss & Target and pass null for the parameter you want to cancel: takeProfit, stopLoss, or both.

Price Validations

For all transaction requests (order placement / modification), the price input should be in accordance with the exchange-provided tick size for the particular symbol.

  • Tick size is applicable for all price inputs (limit / stop / stopLoss / target).
  • Each symbol has its own tick size.
  • All price inputs have to be in multiples of the tick size.
  • The tick size is available in the Symbol Master.

Quantity Validations

For all transaction requests (order placement / modification), the quantity input should be in accordance with the exchange-provided minimum lot size.

SegmentMinimum Quantity Details
EquitiesThe quantity will be in multiples of 1
Equity DerivativesThe quantity will be in multiples of the lot size specified by the exchange
Currency DerivativesThe quantity will be in multiples of 1
Commodity DerivativesThe quantity will be in multiples of 1

Order Tag

For all order placement requests where tags are passed, they should meet the following requirements:

  • The order tag string should be alphanumeric, i.e. no spaces or special characters are allowed.
  • The order tag string should not exceed 30 characters and should have a minimum length of 1 character.
  • The order tag string cannot be your clientID or the string Untagged.

Auto-Order Slice

Use the auto-slice feature to place large orders that exceed the exchange’s freeze-quantity limits.

Enable it by setting "isSliceOrder": true in the order request. When enabled, the system automatically splits the order into smaller quantities based on the applicable freeze limit. Each slice is submitted as a separate order with its own Order ID.

Note:

  • Slicing is only allowed for NSE CM, NFO and BFO.
  • Maximum slices per request: 10.

Sample input:

{ "symbol": "NSE:BANKNIFTY25NOV58900PE", "qty": 3150, "type": 2, "side": 1, "productType": "MARGIN", "limitPrice": 0, "stopPrice": 0, "disclosedQty": 0, "validity": "DAY", "offlineOrder": false, "stopLoss": 0, "takeProfit": 0, "IsSliceOrder": true }

Response output:

{ "code": 1101, "message": "Order Slice placed successfully", "data": [ { "statusCode": 200, "body": { "code": 1101, "message": "Successfully placed order", "s": "ok", "id": "25120400000372" }, "statusDescription": "OK" }, { "statusCode": 200, "body": { "code": 1101, "message": "Successfully placed order", "s": "ok", "id": "25120400000373" }, "statusDescription": "OK" }, { "statusCode": 200, "body": { "code": 1101, "message": "Successfully placed order", "s": "ok", "id": "25120400000374" }, "statusDescription": "OK" } ] }
Last updated on