
Hello Team,
I am observing delayed data in market depth and time and sale in Fyers One desktop app. Can some one please verify why is that the case?
Join FYERS Community to pick others' brains on Trading/Investing
Hello Team,
I am observing delayed data in market depth and time and sale in Fyers One desktop app. Can some one please verify why is that the case?
Hi Team,
I am getting module not found error while trying to import from fyers_api import fyersModel
from fyers_api.Websocket import ws
Following are the version of the packages that I am using
websocket 0.2.1
websocket-client 1.2.1
websockets 8.1
fyers-apiv2 2.0.4
Can some one help me figure out why this is the case?
Posting the entire code, if that helps
from fyers_api import fyersModel
from fyers_api.Websocket import ws
from dotenv import dotenv_values
ENV_DATA = dotenv_values(".env")
IS_TESTING = ENV_DATA.get('TESTING')
access_token = 'My token'
client_id=ENV_DATA.get('CLIENT_ID')
Log_Path = ENV_DATA.get('LOG_PATH') if IS_TESTING == '1' else ENV_DATA.get('LOG_PATH_SERVER')
fyers = fyersModel.FyersModel(token=access_token,is_async=False,client_id=client_id)
def run_process_background_symbol_data(access_token):
data_type = "symbolData"
symbol =["NSE:NIFTY50-INDEX","NSE:NIFTYBANK-INDEX","NSE:SBIN-EQ","NSE:HDFC-EQ","NSE:IOC-EQ"]
fs = ws.FyersSocket(access_token=access_token,run_background=True,log_path="/home/Downloads/")
fs.websocket_data = custom_message
fs.subscribe(symbol=symbol,data_type=data_type)
print(fyers.get_profile())
fs.keep_running()
def run_process_background_order_update(access_token):
data_type = "orderUpdate"
fs = ws.FyersSocket(access_token=access_token,run_background=True,log_path="/home/Downloads/")
fs.websocket_data = custom_message
fs.subscribe(data_type=data_type)
fs.keep_running()
def custom_message(msg):
print (f"Custom:{msg}")
def main():
access_token_websocket= f"{client_id}:{access_token}"
run_process_background_symbol_data(access_token_websocket)
run_process_background_order_update(access_token_websocket)
if __name__ == '__main__':
main()
Hi Team,
I am getting an error code -10 on historic API, its intermittent. Can anyone help me figure out what the error code -10 is? the google sheet with the error code doesn't seem to have it.
Getting the following RuntimeWarning while subscribing to the FyresSocket and no data is received
Access_token = ENV_DATA.get('CLIENT_ID')+":"+access_token
data_type = "symbolData"
symbol=["MCX:CRUDEOIL21SEPFUT", "NSE:INFY-EQ"]
def custom_message(self):
print(self)
ws.FyersSocket.websocket_data = custom_message
fyersSocket = ws.FyersSocket(access_token=Access_token, data_type=data_type,symbol=symbol)
fyers-apiv2 version 2.0.4
any help is appreciated