-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting Bad Request on Kite.ltp("NSE:INFY") #59
Comments
I'm also facing the same.
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: Atul ***@***.***>
Sent: Wednesday, May 22, 2024 10:34:29 AM
To: jugaad-py/jugaad-trader ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [jugaad-py/jugaad-trader] Getting Bad Request on Kite.ltp("NSE:INFY") (Issue #59)
Started seeing this error since 21st May : Getting HTTP 400 on Quotes Endpoint
Code snippet
d = kite.ltp("NSE:INFY")
Error
{
"name": "InputException",
"message": "Bad Request",
"stack": "[text] 0m: Bad Request"
}
—
Reply to this email directly, view it on GitHub<#59>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AG5WQVW5BR4IWM2ZB65ZEYLZDQRN3AVCNFSM6AAAAABIC3GOO6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGMYDSNJXG42DONI>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Zerodha is blocking users without api key |
Alternatively we can use yahoo library to get the price information.
All other kite APIs working fine, like AMO, GTT, Orders etc. Seems, only price data APIs are blocked zerodha.quote(), zerodha.ltp() and so on, these are blocked |
will this work for multiple instruments? Did you try? |
It won't work with multiple instruments at once, you can loop through the instruments. Something like this:
Though it is slow, but It is at least unblocking to earn money. :-P |
@iampankajkumar Infy was just for example. I actually need quotes/ltp on FnO instruments. |
@AtulShinde94 , No idea for FnO. A project can be created using AngelOne APIs, they all are free to use. |
I think websocket still works. You can use that for price |
@aneesh2312 Any code reference? |
@aneesh2312 I need to calculate spread of FnO instruments for which I need bid and ask price. Is it possible to get that from ticker? |
Yes, ticker was not working. You need to make this change in the ticker function in https://github.com/jugaad-py/jugaad-trader/blob/master/jugaad_trader/zerodha.py#L217, instead of the existing return (will raise PR at some point, or you can raise after confirming):
As for bid and ask price, I don't know - I guess you can try subscribing to the tokens you want in MODE_FULL - I think the Kite Ticker documentation will be more helpful. |
in ticket method replace the WebSocket URL as zerodha updated this. return KiteTicker(api_key=api_key, You can add below code in Zerodha.py at the end of Zerodha(KiteConnect):
Then calling as for token in list_tokens: Please review, this might provide you some idea... I wont be able to assist further. |
@ssheikh098 in which file these changes needs to be made ? in the juggad-trade library or the native zerodha's kiteconnect library files ? |
Started seeing this error since 21st May : Getting HTTP 400 on Quotes Endpoint
Code snippet
d = kite.ltp("NSE:INFY")
Error
{
"name": "InputException",
"message": "Bad Request",
"stack": "[text] 0m: Bad Request"
}
The text was updated successfully, but these errors were encountered: