GTT Orders
Create, modify, cancel and view GTT (Good Till Trigger) orders, both single-leg and OCO. Ask your AI client in plain language; it picks the tool.
create_gtt_order
Place GTT orders that remain active until market conditions are met. Supports SINGLE-LEG (simple GTT) and MULTI-LEG (OCO) orders. SINGLE-LEG: Use for basic buy-on-dip or sell-on-rally strategies (only provide leg1 parameters). MULTI-LEG OCO: Use when you want either of two conditions to trigger (provide both leg1 and leg2 parameters) - when one leg triggers, the other automatically cancels.
Example prompts
- “Create a GTT to buy 10 SBIN if it falls to 750.”
- “Set an OCO GTT on my INFY holding with a target of 1,700 and a stop-loss of 1,400.”
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
leg2Price | number | no | LEG2 limit price for execution when triggered. OPTIONAL - only provide for OCO orders. When provided with leg2TriggerPrice and leg2Qty, creates an OCO order where either leg1 OR leg2 will execute (whichever triggers first), and the other will automatically cancel. |
leg2Qty | number | no | LEG2 order quantity. OPTIONAL - only provide for OCO orders. Usually same as leg1 qty for balanced OCO strategy. |
leg2TriggerPrice | number | no | LEG2 trigger price that activates the order. OPTIONAL - only provide for OCO orders. This creates a SECOND trigger condition. For OCO: if leg1 triggers first, leg2 cancels automatically, and vice versa. |
price | number | yes | LEG1 limit price for execution when triggered. This is the PRIMARY leg - always required for any GTT order. |
productType | string | yes | Product type: CNC (delivery), INTRADAY, MARGIN |
qty | number | yes | LEG1 order quantity. This is the PRIMARY quantity - always required for any GTT order. |
side | number | yes | Order side: 1=Buy, -1=Sell |
symbol | string | yes | Trading symbol (e.g., NSE:SBIN-EQ) |
triggerPrice | number | yes | LEG1 trigger price that activates the order. This is the PRIMARY trigger condition - always required for any GTT order. |
modify_gtt_order
Update existing GTT orders by modifying trigger price, limit price, or quantity based on changing market conditions. Supports both SINGLE-LEG and MULTI-LEG (OCO) modifications. For single-leg GTT: provide only leg1 parameters. For OCO orders: provide both leg1 and leg2 parameters to modify both legs, or leg1 only to modify just the first leg.
Example prompts
- “Change the trigger price of my SBIN GTT to 740.”
- “Move the stop-loss leg of my INFY OCO GTT to 1,420.”
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | GTT order ID to modify |
leg2Price | number | no | New LEG2 limit price for execution. OPTIONAL - only provide when modifying OCO orders. If the original order was OCO and you want to keep it OCO, provide all leg2 parameters. If you want to convert OCO to single-leg, omit all leg2 parameters. |
leg2Qty | number | no | New LEG2 order quantity. OPTIONAL - only provide when modifying OCO orders. Must be provided together with leg2Price and leg2TriggerPrice for OCO modifications. |
leg2TriggerPrice | number | no | New LEG2 trigger price that activates the order. OPTIONAL - only provide when modifying OCO orders. This modifies the SECOND trigger condition. Must be provided together with leg2Price and leg2Qty for OCO modifications. |
price | number | yes | New LEG1 limit price for execution. This is the PRIMARY leg price - always required when modifying any GTT order. |
qty | number | yes | New LEG1 order quantity. This is the PRIMARY quantity - always required when modifying any GTT order. |
triggerPrice | number | yes | New LEG1 trigger price that activates the order. This is the PRIMARY trigger condition - always required when modifying any GTT order. |
cancel_gtt_order
Cancel a specific GTT order by order ID. Use to cancel individual conditional orders when no longer needed.
Example prompts
- “Cancel my GTT order for SBIN.”
- “Cancel the GTT I created yesterday.”
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
orderId | string | yes | GTT order ID to cancel |
get_gtt_orders
Get all Good Till Triggered (GTT) orders, which are conditional orders that remain active until triggered or cancelled. Use to display pending conditional orders, check GTT order status, show trigger prices, and monitor long-term trading strategies.
Example prompts
- “Show all my active GTT orders.”
- “Which GTT orders are closest to their trigger price?”