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,
stopPricemust not be above LTP for a sell or below LTP for a buy. For a stop-limit order it must also be belowlimitPricefor a buy and above it for a sell. orderTagmust be 1 to 30 letters or digits, with no spaces or special characters, and cannot be your client ID orUntagged.- Set
isSliceOrdertotrueto 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 secondsX-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
| Attribute | Data Type | Description |
|---|---|---|
symbol* | string | Eg: NSE:SBIN-EQ |
qty* | int | The quantity should be in multiples of lot size for derivatives. |
type* | int |
|
side* | int |
|
productType* | string |
|
limitPrice* | float |
|
stopPrice* | float |
|
disclosedQty* | int |
|
validity* | string |
|
offlineOrder* | boolean |
|
stopLoss | float |
|
takeProfit | float |
|
orderTag | string | (Optional) Tag you want to assign to the specific order |
isSliceOrder | boolean |
|
Response Attributes
| Attribute | Data Type | Description |
|---|---|---|
s | string | ok / error |
code | int |
|
message | string |
|
id | string |
|
Last updated on