GTT Trailing Stoploss Order via API enforces me to include a rule with "ENTRY" strategy

Hi, I’m trying to place a GTT Stoploss (with Trailing SL) on one of my existing positions/holdings via API.

https://api.upstox.com/v3/order/gtt/place.

I’m trying to place a stoploss sell order, with the following request payload.

{
    "type": "SINGLE",
    "quantity": 1,
    "product": "D",
    "rules": [
        {
            "strategy": "STOPLOSS",
            "trigger_type": "IMMEDIATE",
            "trigger_price":110,
            "trailing_gap": 5
        }
    ],
    "transaction_type": "SELL",
    "instrument_token": "NSE_EQ|INE306A01021"
}

However, I’m getting a 400 Bad Request, with message saying “One ENTRY strategy is required.”

Here, the scenario is I have already entered this position and I just want to exit it at a stoploss (and also setup a trailing SL).

If I must include a rule with “ENTRY” strategy, could you please let me know what should I specify the trigger_type and trigger_price as?

Can you please give me an example payload for the following scenario..

Please consider the following scenario.

My average price : 100
LTP: 120
I want SL at 110, with trailing SL enabled with trailing gap of 5 from current LTP.

hello, could anyone help me with this please🙂

@Ketan @Ketan_Gupta @MohitGolecha @Ushnota @Pradeep_Jaiswar @Anand_Sajankar


incase it helps, this is what I’m trying to achieve through the API. Can you please share how the payload should look like, if I’m doing this through API

Hi @ANILKUMAR_4753925
As of now, exiting a position via GTT is not available.

You must always include an entry leg, which makes it a complete GTT order consisting of a primary and a secondary leg.

Thank you!

1 Like

thank you for the response..

could you please try to implement this soon as this feels like a crucial feature that is missing and it would be really helpful!!