Open sid201288 opened 7 months ago
Check docs/webSocket.md
same issue for me after upgrading 1.2.0
self.client = NeoAPI(consumer_key=self.consumer_key, consumer_secret=self.consumer_secret, environment=self.environment) self.client.on_message = self.on_message self.client.on_error = self.on_error self.client.on_close = self.on_close self.client.on_open = self.on_open
This should work with 1.2.0
@hardikpatel043 We can not use custom call back function like we did on client.subscribe_to_orderfeed(custom_cb, on_close, on_error)
using the 1.2.1, Is there any workaround? Using client.on_message = custom_cb
is set as a default for all call backs. How to individually set custom call backs for order feed, LTP, etc...
@hardikpatel043 , @abimk9 , @crypt0inf0 can you guys please help with this ? I am getting this
{'type': 'order_feed', 'data': '{"ak":"nk","type":"cn","task":"cn","msg":"Authentication Failed"}'}
after subscribing to subscribe_to_orderfeed
api.
i have checked that all other apis are working fine. here is how i am logging in
import pandas as pd
import threading
import time
from pprint import pprint
from neo_api_client import NeoAPI
from datetime import datetime
consumerKey = "xxxx"
secretKey = "xxxx"
loginPwd = "xxxx"
mobileNumber = "xxxx"
client = NeoAPI(consumer_key=consumerKey, consumer_secret=secretKey,
environment='prod')
pprint(client.login(mobilenumber=mobileNumber, password=loginPwd))
pprint(client.session_2fa("xxxx"))
@Hardik131 On client.session_2fa("xxxx")
enter your mpin
@Hardik131 On
client.session_2fa("xxxx")
enter yourmpin
Yes i have been using mpin only. Without mpin other apis won't work but in my case other apis are working fine
getting the same "Authentication Failed" error on subscribe_to_orderfeed api. anybody found any fix for the same ?
getting the same "Authentication Failed" error on subscribe_to_orderfeed api. anybody found any fix for the same ?
@hardikpatel043 , @abimk9 , @crypt0inf0 can you guys please help with this ? I am getting this
{'type': 'order_feed', 'data': '{"ak":"nk","type":"cn","task":"cn","msg":"Authentication Failed"}'}
after subscribing to
subscribe_to_orderfeed
api.i have checked that all other apis are working fine. here is how i am logging in
import pandas as pd import threading import time from pprint import pprint from neo_api_client import NeoAPI from datetime import datetime consumerKey = "xxxx" secretKey = "xxxx" loginPwd = "xxxx" mobileNumber = "xxxx" client = NeoAPI(consumer_key=consumerKey, consumer_secret=secretKey, environment='prod') pprint(client.login(mobilenumber=mobileNumber, password=loginPwd)) pprint(client.session_2fa("xxxx"))
Change the ORDER_FEED_URL
in neo_api_client/urls.py
wss://mlhsi.kotaksecurities.com/realtime?sId=
-> wss://mdlhsi.kotaksecurities.com/realtime?sId=
getting the same "Authentication Failed" error on subscribe_to_orderfeed api. anybody found any fix for the same ?
@hardikpatel043 , @abimk9 , @crypt0inf0 can you guys please help with this ? I am getting this
{'type': 'order_feed', 'data': '{"ak":"nk","type":"cn","task":"cn","msg":"Authentication Failed"}'}
after subscribing tosubscribe_to_orderfeed
api. i have checked that all other apis are working fine. here is how i am logging inimport pandas as pd import threading import time from pprint import pprint from neo_api_client import NeoAPI from datetime import datetime consumerKey = "xxxx" secretKey = "xxxx" loginPwd = "xxxx" mobileNumber = "xxxx" client = NeoAPI(consumer_key=consumerKey, consumer_secret=secretKey, environment='prod') pprint(client.login(mobilenumber=mobileNumber, password=loginPwd)) pprint(client.session_2fa("xxxx"))
Change the
ORDER_FEED_URL
inneo_api_client/urls.py
wss://mlhsi.kotaksecurities.com/realtime?sId=
->wss://mdlhsi.kotaksecurities.com/realtime?sId=
Were did you get this URL wss://mdlhsi.kotaksecurities.com/realtime?sId=
from? Its not working for me.
getting the same "Authentication Failed" error on subscribe_to_orderfeed api. anybody found any fix for the same ?
@hardikpatel043 , @abimk9 , @crypt0inf0 can you guys please help with this ? I am getting this
{'type': 'order_feed', 'data': '{"ak":"nk","type":"cn","task":"cn","msg":"Authentication Failed"}'}
after subscribing tosubscribe_to_orderfeed
api. i have checked that all other apis are working fine. here is how i am logging inimport pandas as pd import threading import time from pprint import pprint from neo_api_client import NeoAPI from datetime import datetime consumerKey = "xxxx" secretKey = "xxxx" loginPwd = "xxxx" mobileNumber = "xxxx" client = NeoAPI(consumer_key=consumerKey, consumer_secret=secretKey, environment='prod') pprint(client.login(mobilenumber=mobileNumber, password=loginPwd)) pprint(client.session_2fa("xxxx"))
Change the
ORDER_FEED_URL
inneo_api_client/urls.py
wss://mlhsi.kotaksecurities.com/realtime?sId=
->wss://mdlhsi.kotaksecurities.com/realtime?sId=
Were did you get this URL
wss://mdlhsi.kotaksecurities.com/realtime?sId=
from? Its not working for me.
working for me
did you change it in the neo_api_client/urls.py
?
getting the same "Authentication Failed" error on subscribe_to_orderfeed api. anybody found any fix for the same ?
@hardikpatel043 , @abimk9 , @crypt0inf0 can you guys please help with this ? I am getting this
{'type': 'order_feed', 'data': '{"ak":"nk","type":"cn","task":"cn","msg":"Authentication Failed"}'}
after subscribing tosubscribe_to_orderfeed
api. i have checked that all other apis are working fine. here is how i am logging inimport pandas as pd import threading import time from pprint import pprint from neo_api_client import NeoAPI from datetime import datetime consumerKey = "xxxx" secretKey = "xxxx" loginPwd = "xxxx" mobileNumber = "xxxx" client = NeoAPI(consumer_key=consumerKey, consumer_secret=secretKey, environment='prod') pprint(client.login(mobilenumber=mobileNumber, password=loginPwd)) pprint(client.session_2fa("xxxx"))
Change the
ORDER_FEED_URL
inneo_api_client/urls.py
wss://mlhsi.kotaksecurities.com/realtime?sId=
->wss://mdlhsi.kotaksecurities.com/realtime?sId=
Were did you get this URL
wss://mdlhsi.kotaksecurities.com/realtime?sId=
from? Its not working for me.
the fix is not working for me either. @manojkumar5251 still getting the same error.
can you please explain further.
Same Error.
Price Feeds / Order Placement etc are all working fine.
I am also getting the same error. Did you get the resolution for this?
{'type': 'order_feed', 'data': '{"ak":"nk","type":"cn","task":"cn","msg":"Authentication Failed"}'}
Try installing the package with this command
pip install "git+https://github.com/manojkumar5251/kotak-neo-api.git#egg=neo_api_client"
till the PR is approved
I tried editing the "urls.py" file but it is still giving me same error.
self.kotakneo.session_2fa(OTP=accessCode)
self.kotakneo.on_message = on_message_stock # called when message is received from websocket
self.kotakneo.on_error = on_error # called when any error or exception occurs in code or websocket
self.kotakneo.on_close = on_close # called when websocket connection is closed
self.kotakneo.on_open = on_open # called when websocket successfully connects
self.kotakneo.subscribe_to_orderfeed()
It seems that it is not working for others also. Can you pls verify it?
I am facing the same issue. Also url change does not fix the issue
Can someone please suggest the workaround or fix for the issue?
getting the same "Authentication Failed" error on subscribe_to_orderfeed api. anybody found any fix for the same ?
@hardikpatel043 , @abimk9 , @crypt0inf0 can you guys please help with this ? I am getting this
{'type': 'order_feed', 'data': '{"ak":"nk","type":"cn","task":"cn","msg":"Authentication Failed"}'}
after subscribing tosubscribe_to_orderfeed
api. i have checked that all other apis are working fine. here is how i am logging inimport pandas as pd import threading import time from pprint import pprint from neo_api_client import NeoAPI from datetime import datetime consumerKey = "xxxx" secretKey = "xxxx" loginPwd = "xxxx" mobileNumber = "xxxx" client = NeoAPI(consumer_key=consumerKey, consumer_secret=secretKey, environment='prod') pprint(client.login(mobilenumber=mobileNumber, password=loginPwd)) pprint(client.session_2fa("xxxx"))
Change the
ORDER_FEED_URL
inneo_api_client/urls.py
wss://mlhsi.kotaksecurities.com/realtime?sId=
->wss://mdlhsi.kotaksecurities.com/realtime?sId=
Were did you get this URL
wss://mdlhsi.kotaksecurities.com/realtime?sId=
from? Its not working for me.the fix is not working for me either. @manojkumar5251 still getting the same error.
can you please explain further.
Modifying in urls.py worked for me. Don't forget to compile urls.py after modifying, that could be one of the reason for not working.
I am facing the same issue. Also url change does not fix the issue
Did you run urls.py after modifying?
Using the wss://mdlhsi.kotaksecurities.com/realtime?sId=
I get the auth error but rest of the api works fine like positions and trade report, etc...
The Session has been Opened!
{'type': 'order_feed', 'data': '{"ak":"nk","type":"cn","task":"cn","msg":"Authentication Failed"}'}
urls
Same happeing with me
I am facing this issue with kotak neo only for subscribe_to_orderfeed
CODE-> client.subscribe_to_orderfeed()
Error->
'type': 'order_feed', 'data': '{"ak":"nk","type":"cn","task":"cn","msg":"Authentication Failed"}'}
but here comes the twist all other api are working with accurate data like order_report, positions, etc.
Modifying url worked for me, but it worked only in one account. My brother also has account in kotak i tried to run code in his account and it failed. I think it is related to the account not code. When i login through my account in response i am getting that mfaccess : 2 but in my brother's account mfaccess : 1. maybe this is happening because in some accounts they don't give enough access.
Please let me know if anyone has any idea about mfaccess.
Pls Try changing url to wss://clhsi.kotaksecurities.com/realtime . Saw it in there Public App.
Whenevr I have tried to subscribe order feed this error displays:
TypeError: subscribe_to_orderfeed() missing 3 required positional arguments: 'on_message', 'on_close', and 'on_error'
Please give any solution.