Get order history
This API provides the details of the particular order the user has placed. The orders placed by the user is transient for a day and are cleared by the end of the trading session. This API returns all states of the orders, namely, open, pending, and filled ones.
The order history can be requested either using order_id or tag.
If both the options are passed, the history of the order which precisely matches both the order_id and tag will be returned in the response.
If only the tag is passed, the history of all the associated orders which matches the tag will be shared in the response.
Request
- Base URL: https://api-v2.upstox.com
- URL: https://api-v2.upstox.com/v2/order/history
- Auth: OAuth 2 (authorization code, authorization URL https://api-v2.upstox.com/v2/login/authorization/dialog, token URL https://api-v2.upstox.com/v2/login/authorization/token)
Query parameters
The order reference ID for which the order history is required
The unique tag of the order for which the order history is being requested
Response
Successful
Example response
{
"data": [
{
"exchange": "NSE",
"price": 120.01,
"product": "D",
"quantity": 1,
"status": "complete",
"validity": "DAY",
"average_price": 120.01,
"disclosed_quantity": 1,
"exchange_timestamp": "03-Aug-2017 15:03:42",
"order_type": "MARKET",
"tradingsymbol": "GMR",
"trading_symbol": "GMR",
"order_timestamp": "23-Apr-2021 14:22:06",
"filled_quantity": 1,
"transaction_type": "BUY",
"trigger_price": 120.01,
"variety": "SIMPLE"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.