Websocket background mode

Websocket background mode is not calling on_ticks function

Can anyone help me in solving that

Hi @mbascoup-m2p ,
Can you share the code where you are getting the error?

is there any callback_function in background WS.

I dont see in the sample code here

fyers-api-sample-code/v3/python/websocket/data_socket/data_websocket_background.py at sample_v3 · FyersDev/fyers-api-sample-code · GitHub

Hi @chirag

You can give callback function in background as well.
if you don’t give then by default which we are not showing, but if you will give callback function for particular thing then your callback function will override default callback function.

Hope you got it.

@Z4PBvkQGyF are all the CB funcs defined in foreground(FG) example also valid for BG WS?

Bcos in BG sample file the params are not explicitly mentioned like in FG sample file? for this method data_ws.FyersDataSocket()

Hi @chirag

you can mentioned in BG as well. Do once and try you will get automatically.