On Modification of GTT order, is there a change in GTT Order ID?

Namaskara,

Modify GTT Order

Request Body

{
“type”: “MULTIPLE”,
“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
}
]
}

Response body:

{
“status”: “success”,
“data”: {
“gtt_order_ids”: [“GTT-CU25280200021013”]
},
“metadata”: {
“latency”: 74
}
}

The response body has a different GTT number…

My questions..

  1. If I have to modify only SL what to do ? Is that SINGLE or MULTIPLE Leg
  2. Does the GTT order Id changes on successful modification?

The ans to the above 2 questions take less than 5 seconds of effort. Please, i appreciate, if UPSTOX SW engineers can ans quickly.

Regards
Rathnadhar K V

They won’t bro. You will need to wait at least 2 days…

Namaskara,

Even if I get a reply after 2 days I am super lucky…

I normally give myself next life to get an Hi from UPSTOX… :grin:

If you observe, there is no difference between place_gtt_order and modify_gtt_order description or example.

Gtt can have 3 legs… : Order executed price, take profit and SL.

Each of them can be independently modified, till order gets filled.

After that only take profit, or SL can be modified.

I was expecting examples for each…but I think they simply copy pasted the place order example in modify gtt order. That is messy…

Regards
Rathnadhar K V

You need to pass all legs with modified data. once entry leg is completed, it will be ignored.

When I’ve tested GTT APIs, gtt_order_id didn’t got changed. Even in modify response it is returning same. You can check one more time to confirm it.

Hi @RathnadharKV

If you only need to modify the Stop Loss (SL) leg of the order, you must send a MULTIPLE request while keeping the Entry and Target legs the same as they were when the order was initially placed.

No GTT order ID does not change while modification, it remains the same

Thanks!

Then your documentation has a serious error… Kindly correct it fast and give this information that the id is invariant on modification.

Thanks for the reply.

Namaskara Jagdish_j_ptl,

Have you place the GTT order via api for NIFTY 50 ATM options…

If yes what are the key that you assigned while placing the order please give complete list of them…Please help me here.

UPSTOX refuses to give any information on F&O fields. Perhaps they sell that information for a fat fees. I am exhausted requesting F&O order placement field information from UPSTOX.

Regards
Rathnadhar K V

I am out of station today. I’ll share you sample payload for it tomorrow.

Thank you so much, I am eagerly awaiting your reply.

Regards
Rathnadhar K V

@RathnadharKV
Here is an example: NIFTY 24800 CE 26 JUN 25.
To get the corresponding instrument keys, please refer to the instrument JSON file:

curl --location 'https://api.upstox.com/v3/order/gtt/place' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_access_token}' \
--data '{
  "type": "MULTIPLE",
  "quantity": 1,
  "product": "D",
  "rules": [
    {
      "strategy": "ENTRY",
      "trigger_type": "ABOVE",
      "trigger_price": 179
    },
    {
      "strategy": "TARGET",
      "trigger_type": "IMMEDIATE",
      "trigger_price": 190
    },
    {
      "strategy": "STOPLOSS",
      "trigger_type": "IMMEDIATE",
      "trigger_price": 150
    }
  ],
  "instrument_token": "NSE_FO|62387",
  "transaction_type": "BUY"
}'

@RathnadharKV
It is commonly understood that modifying an order does not change its order ID.

However, thank you for your suggestion — we’ve forwarded your request to explicitly add a note clarifying that modifying orders does not alter the order ID.

Thanks!

Thanks for the reply

1 Like