Hello, I hope you all are doing well. I've encountered an issue while working on a project and was hoping to get some guidance.
While trying to place an order for BANKNIFTY26OCT2342300CE, I received the following exception: 'NoneType' object is not subscriptable. This error arose when I attempted to access the 'orderid' key from the response of a function call.
Here's the relevant code snippet:
pythonCopy code
orderResponse = self._postRequest("api.order.place", params)['data']['orderid']
I understand that this error typically occurs when trying to index or call methods on a None object. However, I'm unsure why the response would be None in this context or if there's a better way to handle such scenarios.
Can anyone please provide some insights or suggestions on how to address this issue and prevent such errors in the future?
Thank you in advance for your guidance!
Best regards
Sudhanshu