Place Order
API to place an order to the exchange. The instrument_token required for the stock or contracts should be obtained from the BOD instruments.
Upon successfully placing the order with the exchange, a unique order_id is provided in the success response, which can be utilized for order modification or cancellation. If you intend to place an order outside of market hours, the 'is_amo' (After Market Order) should be set to 'true'. You can assign a tag(unique identifier) to your order, allowing you to retrieve orders associated with that tag using the Order History API.
Experience faster trading with our upgraded API, designed for more efficient order executions and quicker market opportunities. Learn more
If you represent a business aiming to incorporate order flow management (including placing, canceling, and modifying orders), please visit the Uplink Business. The direct HTTP order placement API integration is intended for individual API users.
- Currently product type
OCO
is not allowed. - In adherence to CDSL regulations, customers without a DDPI/POA are obligated to use a combination of the CDSL TPIN and OTP to provide the necessary authorization for the deduction of securities from their demat account when engaging in delivery sale transactions.
Header Parameters
Name | Required | Type | Description |
---|---|---|---|
Authorization | true | string | Requires the format Bearer access_token where access_token is obtained from the Token API. |
Content-Type | true | string | Indicates the media type of the resource, set as application/json . |
Accept | true | string | Defines the content format the client expects, which should be set to application/json . |
Request Body
{
"quantity": 1,
"product": "D",
"validity": "DAY",
"price": 0,
"tag": "string",
"instrument_token": "NSE_EQ|INE848E01016",
"order_type": "MARKET",
"transaction_type": "BUY",
"disclosed_quantity": 0,
"trigger_price": 0,
"is_amo": false
}
Name | Required | Type | Description |
---|---|---|---|
quantity | true | integer (int32) | Quantity with which the order is to be placed. For commodity - number of lots is accepted. For other Futures & Options and equities - number of units is accepted in multiples of the tick size. |
product | true | string | Signifies if the order was either Intraday or Delivery. Possible values: I , D . |
validity | true | string | It can be one of the following - DAY(default), IOC. Possible values: DAY , IOC . |
price | true | number (float) | Price at which the order will be placed |
tag | false | string | Tag for a particular order |
instrument_token | true | string | Key of the instrument. For the regex pattern applicable to this field, see the Field Pattern Appendix. |
order_type | true | string | Type of order. It can be one of the following MARKET refers to market order LIMIT refers to Limit Order SL refers to Stop Loss Limit SL-M refers to Stop Loss Market. Possible values: MARKET , LIMIT , SL , SL-M . |
transaction_type | true | string | Indicates whether its a buy or sell order. Possible values: BUY , SELL . |
disclosed_quantity | true | integer (int32) | The quantity that should be disclosed in the market depth |
trigger_price | true | number (float) | If the order is a stop loss order then the trigger price to be set is mentioned here |
is_amo | true | boolean | Signifies if the order is an After Market Order |
- 200
- 4XX
Response Body
{
"status": "success",
"data": {
"order_id": "1644490272000"
}
}
Name | Type | Description |
---|---|---|
status | string | A string indicating the outcome of the request. Typically success for successful operations. |
data | object | Response data for place order request |
data.order_id | string | An order ID for the order request placed |
Error codes
Error code | Description |
---|---|
UDAPI1026 | Instrument key is required - You need to provide the instrument key for this operation. |
UDAPI1004 | Valid order type is required - Please ensure to provide a recognized order type. |
UDAPI1056 | The 'order_type' is invalid - The specified order type isn't acceptable. |
UDAPI1057 | The 'transaction_type' is invalid - The given transaction type is not valid. |
UDAPI1006 | Product is required - You must specify the product in your request. |
UDAPI1054 | The 'product' is invalid - The provided product value doesn't match any accepted values. |
UDAPI1007 | Validity is required - You need to provide the duration the order will remain in effect. |
UDAPI1055 | The 'validity' is invalid - The specified order validity isn't recognized. |
UDAPI1008 | Price is required - Please specify the price in your request. |
UDAPI100049 | Access to this API has been restricted for your account. Please use 'Uplink Business' to place/modify/cancel the order. - Use 'Uplink Business' for order operations. |
UDAPI1052 | The order 'quantity' cannot be zero - You cannot set the order quantity to zero. |
UDAPI1040 | Price not required - You shouldn't specify a price for this type of order. |
UDAPI1043 | The 'price' is required - A valid price value needs to be provided for this order type. |
UDAPI1041 | The 'price' and 'trigger_price' both are required - Ensure to specify both price values in your request. |
UDAPI1042 | Only 'trigger_price' is required - Only the trigger price needs to be provided, not the regular price. |
UDAPI1037 | Trigger price should be less than limit price - Ensure your trigger price is set below the limit price. |
UDAPI1038 | Trigger price should be greater than limit price - The trigger price should exceed the limit price value. |
UDAPI100011 | Invalid Instrument key - The instrument key you provided doesn't match any recognized keys. |
UDAPI100039 | AMO orders cannot be placed during the market hours - After Market Order (AMO) is not valid during active market sessions. |
UDAPI100074 | The Place order API is accessible from 5:30 AM to 12:00 AM IST daily - Thrown when an Place Order API is called between midnight and 5:30 AM in the morning. |
The Place order API is down for maintenance daily from 12:00 AM to 5:30 AM IST and is unavailable during these hours. Users are advised to plan their activities accordingly.
Examples
A comprehensive set of examples is provided to illustrate various use cases and implementation scenarios for this API. To view detailed examples and access sample code, please refer to: API Examples.