Today my code triggered multiple calls because I was checking positions in dhan I code was triggering a call
I am considering I am in the market if there is any position apart from CLOSED.
But in my logs, I saw that returned blank json inside the data key
I didn’t log the entire response and it didn’t fail while parsing
I was using the same dhan object, so with the same obj it was keep on triggering new call options because I didn’t receive non-CLOSED positions. which caused the opening of 2 CALL positions in the market and the later 140 got failed because of insufficient money.
It was great trading, but I need a more reliable solution. So that I don’t have to handle such n number of scenarios in my code.