Skip to main content

Modify GTT Order Beta

This API allows to modify an existing Good Till Trigger (GTT) order by modifying its parameters, such as quantity, trigger price, or strategy rules. This ensures flexibility in adjusting trade conditions without canceling and re-creating the order.

Note
  • EDIS validation for Equity GTT orders must be performed on Upstox Pro by placing a GTT order and authorizing EDIS. Validating EDIS for any scrip applies to all scrips. You may choose not to place the order on Upstox Pro after validation, as it is a separate step. Once validated, the API can place GTT equity SELL orders without issues.
  • We currently support a maximum of three rules with no duplicate strategies.

Header Parameters

NameRequiredTypeDescription
AuthorizationtruestringRequires the format Bearer access_token where access_token is obtained from the Token API.
Content-TypetruestringIndicates the media type of the resource, set as application/json.
AccepttruestringDefines the content format the client expects, which should be set to application/json.

Request Body

{
"type": "SINGLE",
"quantity": 1,
"gtt_order_id": "GTT-221130000253265",
"rules": [
{
"strategy": "ENTRY",
"trigger_type": "BELOW",
"trigger_price": 2.57
},
{
"strategy": "TARGET",
"trigger_type": "IMMEDIATE",
"trigger_price": 2.6
},
{
"strategy": "STOPLOSS",
"trigger_type": "IMMEDIATE",
"trigger_price": 2.55
}
]
}
NameRequiredTypeDescription
typetruestringSpecifies the GTT order type. Indicates if it's a single or multi-leg order.
Possible values: SINGLE, MULTIPLE.
quantitytrueintegerQuantity with which the order is to be placed.
gtt_order_idtruestringThe order ID for which the order must be modified.
rulestruearrayContains the conditions under which the order should be triggered.
rules[].strategytruestringDefines the role of the rule.
Possible values: ENTRY, TARGET, STOPLOSS

ENTRY - The initial condition to place a BUY or SELL order when the trigger price is met.
TARGET - A condition to exit the position once the desired price level is reached after the ENTRY order is executed.
STOPLOSS - A condition to exit the position when the price moves unfavorably beyond a set threshold.
rules[].trigger_typetruestringSpecifies the condition for triggering the order. The ENTRY strategy can have ABOVE, BELOW, or IMMEDIATE, whereas TARGET and STOPLOSS strategies can only have IMMEDIATE.
Possible values: BELOW, ABOVE, IMMEDIATE

BELOW - The order is triggered when the market price drops below the defined trigger price.
ABOVE - The order is triggered when the market price rises above the defined trigger price.
IMMEDIATE - The order is triggered when the market price matches the defined trigger price.
rules[].trigger_pricetruefloatThe price at which the order should be triggered based on the defined condition.

Responses

Response Body

{
"status": "success",
"data": {
"gtt_order_ids": ["GTT-CU25280200021013"]
},
"metadata": {
"latency": 74
}
}
NameTypeDescription
statusstringA string indicating the outcome of the request.
Possible values: success, error
dataobjectResponse data for modify order request.
data.gtt_order_ids[]stringAn array holding the GTT Order ID for the request placed
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...