Get Trades
API to retrieve the list of all trades executed for the day. An order, initially submitted as one entity, can be executed in smaller segments based on market situation. Each of these partial executions constitutes a trade, and a single order may consist of several such trades.
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 . |
Responses
- 200
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.
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...