how can we place sensex trades for future and options via api having entry and sl and target all set at once just like gtt the gtt is not enabled to place via api not v2 or v3 nothing is working then how can trade in snsex bse instruments via api rather than placing a limt order how can we have sl and target placed via api ?? any method or way to do ENTRY + SL + TARGET all set at once for sensex options via api ?
Hi @Morampudi_50676697
You can also place GTT orders for Sensex instruments. Please refer to the API documentation for more details:
Place GTT Order API
While it is possible to maintain multiple single-leg orders to achieve an ENTRY + SL + TARGET setup, managing them can be complex. Hence, it is recommended to use GTT orders instead.
Thanks!
Sir @Ketan i am getting erros like these while placing a gtt 2025-10-20 17:55:14,278 - _main_ - INFO - Creating v2 GTT OCO for BSE_FO - Tgt: 235.0, SL: 195.0
- _main_ - INFO - Placing v2 GTT OCO: {“type”: “OCO”, “exchange”: “BSE_FO”, “instrument_token”: “BSE_FO|878125”, “trigger_values”: [235.0, 195.0], “orders”: [{“transaction_type”: “SELL”, “order_type”: “LIMIT”, “quantity”: 20, “product”: “I”, “validity”: “DAY”, “price”: 235.0, “trigger_price”: 0.0, “exchange”: “BSE_FO”, “instrument_token”: “BSE_FO|878125”, “disclosed_quantity”: 0, “is_amo”: false}, {“transaction_type”: “SELL”, “order_type”: “SL”, “quantity”: 20, “product”: “I”, “validity”: “DAY”, “price”: 195.0, “trigger_price”: 195.0, “exchange”: “BSE_FO”, “instrument_token”: “BSE_FO|878125”, “disclosed_quantity”: 0, “is_amo”: false}]}
2025-10-20 17:55:15,108 - _main_ - ERROR - HTTP error during POST https://api-v2.upstox.com/gtt/rules: 404 Client Error: Not Found for url: https://api-v2.upstox.com/gtt/rules - Response: {“status”:“error”,“errors”:[{“errorCode”:“UDAPI100060”,“message”:“Resource not Found.”,“propertyPath”:null,“invalidValue”:null,“error_code”:“UDAPI100060”,“property_path”:null,“invalid_value”:null}]}
ERROR - v2 GTT OCO Failed: HTTP 404 - None: Resource not Found.
- _main_ - ERROR -
Exit GTT Failed: HTTP 404 - None: Resource not Found.
I need quick clarification on GTT order support for BSE F&O (Sensex Options/Futures) through the Upstox v3 API.
I’ve already verified that:
I have verified it by trying to NIFTY INSTRUMENTS it was working with NSE but only BSE is giving trouble please help
- The API documentation and regex patterns explicitly include
BSE_FOandBSE_INDEXas validinstrument_tokenprefixes. - The
/v3/order/gtt/placeendpoint works perfectly forNSE_FOsymbols. - But when using a valid Sensex option instrument key (like
BSE_FO|<symbol>), the API doesn’t process it as a GTT order — instead, it defaults to a standard limit order.
Could you please confirm:
- Is GTT (single-leg or multi-leg) officially supported for BSE_FO / Sensex derivatives via the v3 API?
- If yes, what is the correct instrument prefix or exchange key we should use (e.g.,
BFOinstead ofBSE_FO)? - If not yet supported, is there an estimated timeline or recommended workaround to replicate the same via
/v2/gtt/create-rule?
We’ve already tested with working NSE instruments, so it’s not a payload or code-level issue — it’s specific to the Sensex segment.
Would really appreciate your confirmation so we can finalize BSE integration on our side.
Bro you are using wrong URL. Also your parameters are not matching with documentation. Please refer Place GTT Order | Upstox Developer API to make it work.
Are you shure bro cause it have successfully placed order for NSE options are you talking about the v2 or v3 end point api usage for API ??
I was talking about v2 URL. It is invalid. You need to use V3 to place GTT orders. Add prefix BSE_FO for FnO and BSE_EQ for Equity
bro
That is the exact problem I am facing.
- I am using the v3 GTT endpoint:
/v3/order/gtt/place - I am using a valid
BSE_FO|...instrument key (fetched from the instrument master).
This exact combination fails with an HTTP 404 - Resource not Found error.
The same code works perfectly when I use an NSE_FO|... instrument (like NIFTY).
Can you please confirm: Is the /v3/order/gtt/place endpoint officially supported for the BSE_FO segment right now? It seems to be a limitation on the Upstox side."
Endpoint is correct please share entire URL you are using to place GTT order. Might be you are using wrong host?