Hi I found my websocket connection stopped fetching ticks, I had to manually restart the socket to get them back. Is anyone facing similar issue.
Faced same issues today, right now also one more drop
not receiving Websocket data
Yes @chirag, I am not getting ticks again after sometime.
I had similar episodes on 5th, 9th, I just don’t have samples to show. @Z4PBvkQGyF please take a look.
Yes, I never observed in v2, but its the 3rd time that I observed with v3. @Z4PBvkQGyF please take a look, I was under impression that, I don’t need to look at websocket once I started, but that impression is slowly melting down.
There is no drop in v2 between 11:00 - 11:02 AM
. Survived for another day!
Try to use thread and keep on monitor the thread is alive or not. If not try to restart the thread recursively.
import threading
def subscribe():
fyers = data_ws.FyersDataSocket(access_token=access_token,
log_path="",
litemode=False,
write_to_file=False,
reconnect=True,
on_connect=onopen,
on_close=onclose,
on_error=onerror,
on_message=onmessage
)
# Establish a connection to the Fyers WebSocket
fyers.connect()
def start_websocket():
thread = threading.Thread(target= subscribe )
return (thread)
thread = start_websocket()
while True:
if not thread.is_alive():
thread = start_websocket()
thread.start()
else:
break
yaar, i put everything in its own thread, i’m running 6-7 of them. This post is not even being listed in home page.
Order socket thread crash is affecting main thread which then ultimately brings everything down. Data to tool can only be performed by Queue in Main thread.
today’s day wasted in debugging only
on drops in Order websocket (fyers.in)
See this issue in the post
Hi @chirag I missed your post. This is unfortunate.
You are right, Data to tool can only be performed by Queue. Try to add buffer data in case of an exception in the data thread. I am sure you probably have.
Just a suggestion for your future development, Don’t rely on any single data source, Spawn a free vpc cloud server and get data from 2/3 brokers simultaneosly, If data stream from 1 broker fails patch it from other. This way your algo doesn’t face error.
Implementing this model in python has significant delay, hoping this gets improved in py3.12 or mojo, but better to be sure it doesn’t break the algo with active positions.
I am currently trying to package my rust code into python to balance this time delay of 1-3 seconds, but it hasn’t been smooth so far.
Happy to see fellow traders discussing over bugs, initially I used to blabber here with errors on v2 but the community was small and taciturn.
For this specific Exception in that Order socket issue, can you guess which part of the code i can wrap to Catch Exception?
when exception is caused in order socket thread, there seems nothing in my code that i can catch or atleast thats what i think.
you could just look at the github sample code because only that much interacts with fyers api threads. my stuff is on my own threads. Its like fyers should handle Exceptions on their threads.
@shruthi_shetty kindly tag Pankaj/Vinay, unable to do so. thanks
Has fyers staff acknowledged WS data issue today and the reason behind it?
Hi @chirag
Do you all guys face issue at some time As I can check @subhajit_bhar not faced any issue for that time.
@Z4PBvkQGyF Today I just ran the plain code taken from fyers_v3 docs. subscribed to symbol_socket and general_socket. Exactly @10:59 got a disconnection, later symbol_socket works fine and general socket failed.
Yes @immature_trader
You are right, this issue we already got it. Fix is ready and we will push a new update within 1 or 2 days.
That time you will not get the issue for general socket as well.
I will update you as well there.
yes, today also my drop at the same time like immature trader
Hi @chirag @immature_trader @subhajit_bhar
Order websocket issue has been fixed and in data websocket.
You will get the data without extra parameter “channel=15”
You can directly use now.
fyers.subscribe(symbols=symbols, data_type=data_type)
Please upgrade the latest module of fyers-apiv3
pip install upgrade fyers-apiv3
or
pip install fyers-apiv3=3.0.4
thank you team.
Upgraded to 3.0.4 now, prices are ticking, order status received from order socket ![]()
hi @Z4PBvkQGyF I have written a whole post with some issues in V3.04 order socket but I dont see my post. When submitted, it said pending for moderator approval.
Ok @chirag
I checked from my side. It is approved.
thanks, i have opened new thread on order socket in which some new issues have been introduced. kindly check
Again, webscoket was stuck from last one hour and it’s pushing the same old data. It’s been repeating since I migrated to v3. @Z4PBvkQGyF any plan to rectify this

