Place Order
Client application
Considering a client application like the one provided above, the client has to provide the access token and order details to UpLink business. The client receives the access token while authenticating the user through Upstox Developer API login.
Sample orders
[
{
"quantity": 1,
"product": "D",
"validity": "DAY",
"price": 0,
"instrument_token": "NSE_EQ|INE848E01016",
"order_type": "MARKET",
"transaction_type": "BUY",
"disclosed_quantity": 0,
"is_amo": false
},
{
"quantity": 1,
"product": "D",
"validity": "DAY",
"price": 0,
"instrument_token": "NSE_EQ|INE848E01016",
"order_type": "MARKET",
"transaction_type": "SELL",
"disclosed_quantity": 0,
"is_amo": false
},
{
"quantity": 1,
"product": "D",
"validity": "DAY",
"price": 152.5,
"instrument_token": "NSE_EQ|INE848E01016",
"order_type": "LIMIT",
"transaction_type": "BUY",
"disclosed_quantity": 0,
"is_amo": false
}
]
Sample request
<form method="post" id="uplink-place" action="https://api.upstox.com/v2/uplink/order/place">
<input type="hidden" name="access_token" value="{upstox developer API access token}" />
<input type="hidden" name="redirect_url" value="https://{redirectUrl}/" />
<input type="hidden" name="data" value="" id="order-data" />
<!-- optional: send the following only if you want to hide the edit option on the UpLink portal -->
<input type="hidden" name="is_editable" value="false" />
</form>
<script>
// orders = sample_order_array_as_seen_above
document.getElementById("order-data").value = JSON.stringify(orders);
document.getElementById("uplink-place").submit();
</script>
- The Upstox developer API access token represents the token acquired through the Get Token API after logging in.
- When using the Uplink Business, please refrain from including the prefix
Bearer
before the Upstox developer API access token. - 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.
Order parameters mapping
Key | Required | Description |
---|---|---|
is_amo | required | Signifies if the order is an After Market Order (boolean). |
instrument_token | required | Key of the instrument. For the regex pattern applicable to this field, see the Field Pattern Appendix. |
validity | required | It can be one of the following - DAY(default), IOC. |
transaction_type | required | BUY or SELL. |
order_type | required | Order type (MARKET, LIMIT, SL, SL-M). |
quantity | required | Quantity with which the order is to be placed. |
product | required | Signifies if the order was either Intraday, Delivery, CO or OCO. |
price | optional | Price at which the order will be placed for LIMIT orders. |
trigger_price | optional | For SL, SL-M etc. |
disclosed_quantity | optional | The quantity that should be disclosed in the market depth. |
tag | optional | Tag to uniquely identify an order. |
UpLink business takes the required access token, list of orders and redirect url as query parameters.
UpLink business application
UpLink business reads the provided query parameters and renders the data for user confirmation to place the order.
Before placing the order, the user is still allowed to edit the order.
When the user clicks on “Edit Order“ button, it takes them to edit page. Here the user is allowed to delete individual orders.
When the user clicks or taps on the bin icon against each order, it asks for confirmation.
When the user confirms to delete by tapping or clicking on 'Delete', a success toast message is shown.
Then, the user is taken back to review order screen.
When the user taps or clicks on 'Show charges', they can view all brokerage and transaction charges involved in placing the orders.
When the user taps or clicks on 'Place order', they can place the order with Upstox. Once placed, they will be provided with the status of each order.
If the user deletes all orders or has no orders to review, an exit screen is shown.
After placing the order, if the user clicks or taps on 'Exit' or 'Done', they will be redirected to the client provided redirect URL.