Get GTT Order Details
API to retrieve the latest status of a specific order. Orders placed by the user remain available for one trading day and are automatically removed at the end of the trading session.
Note
The Get GTT API does not support retrieving completed GTT orders.
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 |
---|---|---|---|
gtt_order_id | false | string | The GTT order reference ID for which the order details is required. |
Responses
- 200
- 4XX
Response Body
{
"status": "success",
"data": [
{
"type": "MULTIPLE",
"exchange": "NSE_EQ",
"quantity": 1,
"product": "I",
"rules": [
{
"strategy": "ENTRY",
"status": "COMPLETED",
"trigger_type": "IMMEDIATE",
"trigger_price": 7.7,
"transaction_type": "BUY",
"order_id": "250228010168535"
},
{
"strategy": "STOPLOSS",
"status": "CANCELLED",
"trigger_type": "IMMEDIATE",
"trigger_price": 7.6,
"transaction_type": "SELL",
"order_id": null
},
{
"strategy": "TARGET",
"status": "COMPLETED",
"trigger_type": "IMMEDIATE",
"trigger_price": 7.64,
"transaction_type": "SELL",
"order_id": "250228010171117"
}
],
"trading_symbol": "IDEA",
"instrument_token": "NSE_EQ|INE669E01016",
"gtt_order_id": "GTT-CU25280200021010",
"expires_at": 1740767399000000,
"created_at": 1740723100000000
}
],
"metadata": {
"latency": 58
}
}
Name | Type | Description |
---|---|---|
status | string | Indicates the outcome of the request. Typically success for successful operations. |
data | array | Contains details of the requested GTT order(s). |
type | string | Specifies the GTT order type. Indicates if it's a single or multi-leg order. Possible values: SINGLE , MULTIPLE . |
exchange | string | The exchange where the order is placed. Possible values: NSE_EQ , BSE_EQ , etc. |
quantity | integer | The number of units specified in the order. |
product | string | Specifies whether the order is for Intraday or Delivery trading. Possible values: I (Intraday), D (Delivery). |
instrument_token | string | Unique identifier for the instrument being traded. |
trading_symbol | string | The symbol of the traded instrument. |
gtt_order_id | string | Unique identifier assigned to the GTT order. |
expires_at | integer | The timestamp indicating when the GTT order expires. |
created_at | integer | The timestamp when the GTT order was created. |
rules | array | Defines the conditions for order execution, such as trigger price and strategy. |
rules[].strategy | string | Specifies the role of the rule. Possible values: ENTRY , TARGET , STOPLOSS .ENTRY - Defines the condition for the first-leg order execution (BUY or SELL). TARGET - Sets an exit condition at a predefined profit level. STOPLOSS - Sets an exit condition to limit losses. |
rules[].status | string | Indicates the status of the rule. Possible values: PENDING , COMPLETED , FAILED , CANCELLED . |
rules[].trigger_type | string | Specifies the condition under which the order is triggered. Possible values: BELOW , ABOVE , IMMEDIATE .BELOW - Triggers when the market price falls below the trigger price. ABOVE - Triggers when the market price rises above the trigger price. IMMEDIATE - Triggers when the market price matches the trigger price. |
rules[].trigger_price | float | The price at which the order will be triggered based on the condition. |
rules[].transaction_type | string | Defines whether the order is a buy or sell transaction. Possible values: BUY , SELL . |
rules[].order_id | string | Unique identifier for the order generated after execution. May be null if the order hasn't been placed yet. |
metadata | object | Metadata information. |
metadata.latency | integer | The overall time taken by API platform to process the request, measured in milliseconds. |
Error codes
Error Code | Description |
---|---|
UDAPI1135 | GTT order ID must start with 'GTT-' - The order ID should follow the required format. |
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...