GTT Stoploss Leg Missing, Trailing Gap Not Working & STOPLOSS/TARGET Not Created — Please Investigate (GTT-C25281100110631)

Hi @Ushnota @MohitGolecha @Anand_Sajankar @Ketan @Pradeep_Jaiswar @Samit

I placed a MULTIPLE GTT order through the API (GTT ID: GTT-C25281100110631) and received a successful response with the GTT order ID. So I assumed that all three legs (Entry, Target, and Stoploss) were created correctly.

However, the actual behavior after execution was incorrect and resulted in an unexpected loss. Below is the exact sequence of events:


✔ 1. Entry leg worked correctly

The ENTRY leg was successfully created and executed (order_id: 251128000107733).


❌ 2. The Stoploss leg did NOT appear in the Upstox app

Only the TARGET leg was visible in the app.

The STOPLOSS leg did not show at all, even though I submitted it clearly in the API request body.


❌ 3. After the entry executed, the trailing stoploss

did NOT activate

The price moved up significantly, but my stoploss never moved upward with it.

The stoploss remained fixed at the original value that I sent in the API, instead of trailing with the market.

This caused the stoploss to trigger at the fixed level, and the trade closed at a loss.


❌ 4. After the trade closed, Fetch GTT API showed the following:

  • STOPLOSS: INACTIVE, order_id = null

  • TARGET: CANCELLED, order_id = null

  • Only ENTRY shows COMPLETED

This clearly means that the system never created the STOPLOSS and TARGET legs after the entry order filled.

As a result, the trailing mechanism never started, the stoploss did not move, and the position remained unprotected.


❗ My questions (please clarify these clearly):

1. Why did the STOPLOSS leg remain INACTIVE with no order_id, even though the API returned a successful GTT creation response?

2. Why did the TARGET leg get CANCELLED automatically without ever being created?

3. Why did the trailing stoploss not activate even though the price moved upward after entry?

4. Why did the Upstox app show only the Target leg and completely hide the Stoploss leg?

5. What was the exact internal rejection reason when your system attempted to create the STOPLOSS/TARGET orders after the entry filled?

(Freeze range, tick size, MPP, margin, or instrument restrictions?)


❓

Important clarification needed about how Trailing Stoploss works in Upstox

Please also clarify exactly how trailing stoploss is calculated in your system:

Is the stoploss supposed to be:

  1. Current Market Price – trailing_gap?

    (For example: if CMP = 510 and trailing_gap = 2.5, then SL becomes 507.5)

OR

  1. Should the stoploss only move upward as the market goes up, without ever moving downward again?

I need confirmation on the exact trailing logic Upstox uses, so I can apply it correctly in my automated trading system.


✔ Summary

  • API placement returned success

  • STOPLOSS leg never created

  • TARGET leg cancelled

  • Trailing stoploss did not activate

  • Trade closed at the fixed SL, not the trailed SL

  • Fetch API confirmed both protective legs were never spawned

This left the position unprotected and caused a loss.


Please investigate this issue and share the detailed internal reason why the protective legs (STOPLOSS and TARGET) were not created after entry execution.

Thank you,

Ayush

Hi @Ayush_47923710,

We investigated your GTT order issue and found that the second leg (STOPLOSS) was successfully executed immediately at 2025-11-28 12:12:17. The order ID 251128000107848 was generated as expected, and the execution price was 414.15. However, due to an internal error while fetching GTT orders, the STOPLOSS leg did not appear on the UI and TARGET leg was cancelled as STOPLOSS leg already executed.

Our team has identified the root cause and is currently working on a fix. Thank you for bringing this to our attention.

plus also why the trailing gap also didnt work for this order??

Hi @Ushnota @MohitGolecha @Anand_Sajankar @Ketan @Pradeep_Jaiswar @Samit

I am facing multiple recurring issues while using the Upstox APIs (especially with GTT, trailing stop-loss, and other real-time functionalities). Some important features are not working as expected, and the same problems have occurred multiple times.

Because this directly impacts my automated trading system, I request a call with your Product or Technical team to discuss these issues in detail and understand the correct behavior and limitations of the APIs.

Kindly arrange a callback on my registered mobile number at your earliest convenience.

Hi @Ayush_47923710, Please refer to the documentation link below for a complete explanation of GTT orders

Let us know if you’re still facing any issues with this. Thanks!

Hello, I am also facing multiple issues with Trailing Stop Loss GTT orders. I am placing orders through API.
I have just one question. Until few days back, I could see me GTT order Trailing Status in “Order” section in Upstox App. This is missing from past few days. I dont know the status of my order, how much has it trailed. Where is my Stop Loss etc. Please explain why this information is unavailable now.

Hi @Anand_Sajankar I have gone through all your documentation as well as the posts on the forums but there still seems to be a gap in understanding. I would like to discuss this further preferably over a call or in a meeting.