Skip to main content

Place Order

Client application

Client application place order

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>

NOTE
  • 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

KeyRequiredDescription
is_amorequiredSignifies if the order is an After Market Order (boolean).
instrument_tokenrequiredKey of the instrument. For the regex pattern applicable to this field, see the Field Pattern Appendix.
validityrequiredIt can be one of the following - DAY(default), IOC.
transaction_typerequiredBUY or SELL.
order_typerequiredOrder type (MARKET, LIMIT, SL, SL-M).
quantityrequiredQuantity with which the order is to be placed.
productrequiredSignifies if the order was either Intraday, Delivery, CO or OCO.
priceoptionalPrice at which the order will be placed for LIMIT orders.
trigger_priceoptionalFor SL, SL-M etc.
disclosed_quantityoptionalThe quantity that should be disclosed in the market depth.
tagoptionalTag to uniquely identify an order.

UpLink business takes the required access token, list of orders and redirect url as query parameters.

UpLink business reads the provided query parameters and renders the data for user confirmation to place the order.

UpLink business application place 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.

UpLink business application edit order

When the user clicks or taps on the bin icon against each order, it asks for confirmation.

UpLink business application delete order

When the user confirms to delete by tapping or clicking on 'Delete', a success toast message is shown.

UpLink business application delete order success

Then, the user is taken back to review order screen.

UpLink business application review order

When the user taps or clicks on 'Show charges', they can view all brokerage and transaction charges involved in placing the orders.

UpLink business application order charges

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.

UpLink business application order charges

If the user deletes all orders or has no orders to review, an exit screen is shown.

UpLink business application order charges

After placing the order, if the user clicks or taps on 'Exit' or 'Done', they will be redirected to the client provided redirect URL.