Skip to Content

Single Order

This API allows you to place an order to any supported exchange.

USE CASE

Place a buy or sell order for a specific instrument.

Details

  • This allows the user to place an order to any exchange via Fyers
  • Placing orders needs an app with the Order Placement permission.
  • Placing, modifying and cancelling orders together must stay within 10 orders per second. Requests beyond this limit are rejected.
  • Every price input (limitPrice, stopPrice, stopLoss, takeProfit) must be a multiple of the symbol tick size, which is available in the symbol master.
  • Quantity must be in multiples of 1 for equities, currency and commodity derivatives, and in multiples of the exchange lot size for equity derivatives.
  • For a stop order, stopPrice must not be above LTP for a sell or below LTP for a buy. For a stop-limit order it must also be below limitPrice for a buy and above it for a sell.
  • orderTag must be 1 to 30 letters or digits, with no spaces or special characters, and cannot be your client ID or Untagged.
  • Set isSliceOrder to true to split a quantity above the freeze limit into separate orders, each with its own order id. Allowed only for NSE CM, NFO and BFO, with at most 10 slices per request.
  • If the response code is 201, the order request was made but not acknowledged. Check the order book before placing the order again.
  • To change or cancel this order, use Modify Single Order or Cancel Single Order.
  • For order types, product types, validations and sync vs async behaviour, refer to the Order Placement Guide.
  • When order rate limiting is triggered, the API returns 429 Too Many Requests.
  • Retry timing is provided through response headers, not in the response body.
  • Retry-After — Wait time before retrying, in seconds
  • X-Retry-After-Ms — Wait time before retrying, in milliseconds
  • Use the retry interval returned in the response headers before sending another order request.
  • Rate limits differ between the Standard and Prime plans. See Plans & rate limits.

Request Attributes

AttributeData TypeDescription
symbol*stringEg: NSE:SBIN-EQ
qty*intThe quantity should be in multiples of lot size for derivatives.
type*int
  • 1 => Limit Order
  • 2 => Market Order
  • 3 => Stop Order (SL-M)
  • 4 => Stoplimit Order (SL-L)
  • View Details
side*int
productType*string
  • CNC => For equity only
  • INTRADAY => Applicable for all segments.
  • MARGIN => Applicable only for derivatives
  • MTF => Approved Symbols Only
  • View Details
limitPrice*float
  • Default => 0
  • Provide valid price for INTRADAY, CNC, MTF, or MARGIN (required for Limit and Stoplimit orders).
stopPrice*float
  • Default => 0
  • Provide valid price for INTRADAY, CNC, MTF, or MARGIN (required for Stop and Stoplimit orders).
disclosedQty*int
  • Default => 0
  • Allowed only for Equity
validity*string
  • IOC => Immediate or Cancel
  • DAY => Valid till the end of the day
offlineOrder*boolean
  • False => When market is open
  • True => When placing AMO order
stopLossfloat
  • Default => 0
  • Provide valid price for INTRADAY, CNC, MTF, or MARGIN.
takeProfitfloat
  • Default => 0
  • Provide valid price for INTRADAY, CNC, MTF, or MARGIN.
orderTagstring(Optional) Tag you want to assign to the specific order
isSliceOrderboolean
  • False => The full quantity is placed as one single order.
  • True => The quantity is placed in multiple smaller orders if the total quantity is more than the freeze quantity.

Response Attributes

AttributeData TypeDescription
sstringok / error
codeint
  • This is the code to identify specific responses
  • If 201 comes in code it implies that order request has been made but no acknowledgement has been received in this case check orderbook before placing order
messagestring
  • Message to clarify the request status.
  • Eg: Order submitted successfully.
  • Your Order Ref. No.119062829763
idstring
  • The order number of the placed order.
  • Eg: 119031547242
Last updated on