today i am not facing issue although , just checking if my code is correct or need any update?
version = “v2”.
Name: dhanhq
Version: 2.0.2
Summary: The official Python client for communicating with the DhanHQ API
Home-page: https://dhanhq.co/
Author: Dhan
Author-email: dhan-oss@dhan.co
License: MIT LICENSE
Location: c:\users\singhvi\appdata\local\programs\python\python38\lib\site-packages
Requires: pandas, pyOpenSSL, requests, websockets
Required-by:
PS C:\Dhan\Code>
no change at my end.
for websocket , i can not use 14.1 as its not compatible with 3.8 version of python.
does it make sense to use latest websocket 14.1 or 13.1? then i have to upgrade python version.
@Hardik getting same error again. please see below:
can you please provide me resolution. it disconnect and start from 1st instrument again and i can not proceed further with my algo.
WebSocket connection error: sent 1011 (internal error) keepalive ping timeout; no close frame received
c:/Dhan/Code/test_multi_symbol_feed.py:80: RuntimeWarning: coroutine ‘DhanFeed.disconnect’ was never awaited
data.disconnect()
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
c:/Dhan/Code/test_multi_symbol_feed.py:87: RuntimeWarning: coroutine ‘DhanFeed.disconnect’ was never awaited
data.disconnect()
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Disconnected from WebSocket feed
i think this error occurs when i am trying to add response data in json file.
when i just print the response and dont do any manipulation on feed , it work fine.
it gave error as soon as we want to handle the data in csv or json.
so here is the question , how can i reference the live feed data if i can not store in json /excel etc ?
@Hardik@Tradehull_Imran@Dhan
see i added logging and every minutes i am getting below error and i am simply printing marketfeed on terminal. thats it.
2024-12-23 12:17:31,688 - ERROR - Error processing item: sent 1011 (internal error) keepalive ping timeout; no close frame received
2024-12-23 12:18:23,097 - ERROR - Error processing item: sent 1011 (internal error) keepalive ping timeout; no close frame received
2024-12-23 12:19:11,067 - ERROR - Error processing item: sent 1011 (internal error) keepalive ping timeout; no close frame received
2024-12-23 12:20:01,491 - ERROR - Error processing item: sent 1011 (internal error) keepalive ping timeout; no close frame received
2024-12-23 12:20:52,288 - ERROR - Error processing item: sent 1011 (internal error) keepalive ping timeout; no close frame received
2024-12-23 12:21:42,850 - ERROR - Error processing item: sent 1011 (internal error) keepalive ping timeout; no close frame received
Understood. This might not be because of storing in JSON or excel but because of the sleep that you are adding in between loop. If the connection is paused and then tried to resume, then the error will occur given the very nature of websockets.