Open shitizbansal247 opened 3 months ago
Does everything else working? Can you check client.holdings()
yes i can check client.holdings() just fine. as well as client.order_report()
Try deleting the kotak-neo-api
folder and try to reinstall using
pip install --force-reinstall "git+https://github.com/Kotak-Neo/kotak-neo-api
yes i deleted and made a fresh install. still it shows authentication failed. please help. all other things are working like limits, positions, holdings etc.
I'm sorry, I don't know what's the issue. I don't use order feed because it will keep disconnecting after 5 to 10 minutes.
thanks anyways crypt0inf0. just a small query. actually i used client.order_history() and client.order_report() for fetching order status but they sometimes give null value. so i thought of trying orderfeed. are you ok with working with client.order_history() ?
I only use the api to place and modify orders.
showing error: {'type': 'order_feed', 'data': '{"ak":"nk","type":"cn","task":"cn","msg":"Authentication Failed"}'}
my code: from neo_api_client import NeoAPI def on_message(message): print(message) def on_error(error_message): print(error_message) def on_close(message): print(message) def on_open(message): print(message)
client = NeoAPI(consumer_key="xxxxxxx", consumer_secret="x", environment='prod', access_token=None, neo_fin_key=None)
client.login(mobilenumber="+xxxxxx", password="xxxxxxxx.") otp = input("enter otp: ") client.session_2fa(OTP=otp)
client.on_message = on_message
client.on_error = on_error
client.on_close = on_close
client.on_open = on_open client.subscribe_to_orderfeed()