Get Order Trades
API to retrieve the list of all trades executed for a specific order.To access the trade information, you need to pass order_id.
Header Parameters
Name | Required | Type | Description |
---|---|---|---|
Authorization | true | string | Requires the format Bearer access_token where access_token is obtained from the Token API. |
Accept | true | string | Defines the content format the client expects, which should be set to application/json . |
Query Parameters
Name | Required | Type | Description |
---|---|---|---|
order_id | true | string | The order ID for which the order to get order trades. For the regex pattern applicable to this field, see the Field Pattern Appendix. |
Responses
- 200
- 4XX
Response Body
{
"status": "success",
"data": [
{
"exchange": "NSE",
"product": "D",
"trading_symbol": "GMRINFRA-EQ",
"tradingsymbol": "GMRINFRA-EQ",
"instrument_token": "151064324",
"order_type": "MARKET",
"transaction_type": "BUY",
"quantity": 1,
"exchange_order_id": "221013001021540",
"order_id": "221013001021539",
"exchange_timestamp": "03-Aug-2017 15:03:42",
"average_price": 299.4,
"trade_id": "50091502",
"order_ref_id": "udapi-aqwsed14356",
"order_timestamp": "23-Apr-2021 14:22:06"
}
]
}
Name | Type | Description |
---|---|---|
status | string | A string indicating the outcome of the request. Typically success for successful operations. |
data | object[] | Response data for trades |
data[].exchange | string | Exchange to which the order is associated. Valid exchanges can be found in the Exchange Appendix |
data[].product | string | Signifies if the order was either Intraday, Delivery or CO. Possible values: I , D , CO , MTF . |
data[].trading_symbol | string | Shows the trading symbol which could be a combination of symbol name, instrument, expiry date etc |
data[].instrument_token | string | Key of the instrument. For the regex pattern applicable to this field, see the Field Pattern Appendix. |
data[].order_type | 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 . |
data[].transaction_type | string | Indicates whether its a buy or sell order. Possible values: BUY , SELL . |
data[].quantity | int32 | The total quantity traded from this particular order |
data[].exchange_order_id | string | Unique order ID assigned by the exchange for the order placed |
data[].order_id | string | Unique order ID assigned internally for the order placed |
data[].exchange_timestamp | string | User readable time at when the trade occurred |
data[].average_price | float | Price at which the traded quantity is traded |
data[].trade_id | string | Trade ID generated from exchange towards traded transaction |
data[].order_ref_id | string | Uniquely identifies an order for internal usage. |
data[].order_timestamp | string | User readable timestamp at which the order was placed |
Notice of Deprecation
The lowercase field (tradingsymbol
) is deprecated and will be removed in future versions. Use the snake_case versions for consistency.
Error codes
Error code | Description |
---|---|
UDAPI1023 | Order id is required - Please ensure you provide an order id. |
UDAPI1010 | Order id accepts only alphanumeric characters and '-'. - The order id you've provided isn't accepted. |
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.
Loading...