I eliminated some of the extra parameters and changed the exchange to FNO. It worked.
I am new and do make some elementary mistakes.
Requesting you for additional help:
I am trying to use the orderStatus== ‘TRADED’ to trigger a Stoploss limit sell order as soon as the buy order is executed, but could not find a sample code that uses orderStatus. Here is my code. Can you help.
This is a scalping code I am trying to build. So further, I will need the LTP to use it to trail this stop loss. Can you provide the code to retrieve the LTP. I have seen some of the websocket code but I am still confused, how do i get the LTP from there. Thanks a ton in advance.
Here is my code till now: