Hello everybody,
I am trying to automate my strategy using the python libraries of API v3.
I have coded the websocket for the general type through which I am receiving for the types “OnOrders,OnTrades,OnPositions,OnGeneral”
I have coded for another websocket for symbol update data type through which I am receiving for the type “SymbolUpdate”
I have coded for another websocket for market depth data type through which I am receiving for the type “DepthUpdate”
All three of them run flawlessly when run single. If I try to run all three simultaneously, then the general type runs successfully and between the symbol update and depth update, whichever is the last to start runs and the other doesn’t run and I get no errors too. If I try to combine the two data websockets like “SymbolUpdate,DepthUpdate”, I get no errors and no data either
Since all the three are required for my strategy, I am stuck. Is this an implementation. Is it by design that we can get either of symbol update or depth update? Can someone please confirm. If not then is the issue at the server end? Can it be rectified? At the client end there are no coding or implementation issues.
Any help is highly appreciated. Thanks in advance.
This is the Expected behaviour for websockets subscription the same is mentioned in docs as well - https://myapi.fyers.in/docsv3#tag/Data-Api/paths/~1DataApi/delete
In this case 1 general socket and 2 data sockets are being subscribed . The suggested option would be to use Single Instance for both general socket and data socket.
I am aware of the documentation which stipulates only one instance of the data and general socket each can be run. In the case of general socket, I am able to combine types as
However in the case of data sockets if I combine the types as
data_type = “SymbolUpdate,DepthUpdate”
it doesn’t work. I neither get the stream nor any error. Is this data_type = “SymbolUpdate,DepthUpdate” allowed in the system? If not then we can run either market tick data or the market depth but not both simultaneously.
I am sure there will be many developers who would need both the data streams. Can you not enable data_type = “SymbolUpdate,DepthUpdate” to be accepted at the server end. It will be a great gesture towards the community.