Issue with the streaming script


I am having trouble streaming consistently. Is there something I am missing here?
I have attached a pdf of my script and the error log as well. Can someone help me out please?

Note: It so happens that the connection is consistent, I have checked it by pinging a couple of sites throughout the day continuously and saw that there is hardly a packet loss of 1 or 2 packets out of 9999. So I believe my network is consistent.

Thanks in advance,
  • sujith
    sujith edited November 2020
    builtins.KeyError: 'oi'
    Are you trying to read oi field for non F&O contracts?
    The open interest(OI) field is available only for the F&O contract.
    Also, you seem to be performing computation inside on_ticks(ws, ticks) , which is not recommended. You may refer to the Websocket section of FAQs.
Sign In or Register to comment.