Hi, I am using Python to get Order Status update using Web Socket and code for the same is working fine. But I want to fetch the order status in real time into the excel sheet and I am unable to get the same. Can someone help me to know how the same can be achieved. Code I have written is :
from fyers_api.Websocket import ws
def custom_message(ticks):
print(ticks);
token = client_id+‘:’+ access_token
data_type = ‘orderUpdate’
ws.websocket_data = custom_message;
fyersSocket = ws.FyersSocket(access_token=token,run_background=True,log_path=‘fy3/’)
fyersSocket.subscribe(data_type=data_type);
fyersSocket.keep_running();