How to exit open position if an option premium is bought using upstox API

I tried using SL-M order using upstox api uplink for a premium of nifty 50 options , but i was unable as i got following error, but i managed to place a market order, now the issue i am facing how to set stop loss for my open position as i did not see any potential way to exit the position by using stop loss or target via upstox api. Here is the error msg generated for SL-M order. it basically says SL-M is not allowed for this script
Failed to place order. Status code: 400Error message: {“status”:“error”,“errors”:[{“errorCode”:“UDAPI100500”,“message”:“Stop-Loss Market (SL-M) orders are not allowed on this scrip.”,“propertyPath”:null,“invalidValue”:null,“error_code”:“UDAPI100500”,“property_path”:null,“invalid_value”:null}]}Order response received: <Response [400]> i am getting this order when i am trying to place order for an nifty 50 instrument

Show drafts

Apologies for the delayed response.

Could you please provide the respective cURL request and the client ID so we can look into this?

I am also facing the same issue. why there are not stop loss allowed for options. Intrument key = ‘NSE_FO|48016’. I am trying to send a stop-loss market order for this.

Hi @amit44,

As we can see, the SL-M orders on option contract were stopped on 27th September 2021. Please check this link for more info → Update on Stop Loss orders for Options Contracts - Upstox

Thanks for the update. I will use SL limit order.

1 Like