Skip to main content

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

NameRequiredTypeDescription
AuthorizationtruestringRequires the format Bearer access_token where access_token is obtained from the Token API.
AccepttruestringDefines the content format the client expects, which should be set to application/json.

Query Parameters

NameRequiredTypeDescription
gtt_order_idfalsestringThe GTT order reference ID for which the order details is required.
Responses

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
}
}
NameTypeDescription
statusstringIndicates the outcome of the request. Typically success for successful operations.
dataarrayContains details of the requested GTT order(s).
typestringSpecifies the GTT order type. Indicates if it's a single or multi-leg order.
Possible values: SINGLE, MULTIPLE.
exchangestringThe exchange where the order is placed.
Possible values: NSE_EQ, BSE_EQ, etc.
quantityintegerThe number of units specified in the order.
productstringSpecifies whether the order is for Intraday or Delivery trading.
Possible values: I (Intraday), D (Delivery).
instrument_tokenstringUnique identifier for the instrument being traded.
trading_symbolstringThe symbol of the traded instrument.
gtt_order_idstringUnique identifier assigned to the GTT order.
expires_atintegerThe timestamp indicating when the GTT order expires.
created_atintegerThe timestamp when the GTT order was created.
rulesarrayDefines the conditions for order execution, such as trigger price and strategy.
rules[].strategystringSpecifies 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[].statusstringIndicates the status of the rule.
Possible values: PENDING, COMPLETED, FAILED, CANCELLED.
rules[].trigger_typestringSpecifies 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_pricefloatThe price at which the order will be triggered based on the condition.
rules[].transaction_typestringDefines whether the order is a buy or sell transaction.
Possible values: BUY, SELL.
rules[].order_idstringUnique identifier for the order generated after execution. May be null if the order hasn't been placed yet.
metadataobjectMetadata information.
metadata.latencyintegerThe overall time taken by API platform to process the request, measured in milliseconds.

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...