☰
Login
Signup
Home
›
Python client
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Register
Categories
Recent Discussions
Activity
Categories
14K
All Categories
0
Incidents
157
Node JS client
40
Go client
794
.Net API client
383
Kite Publisher
537
.Net / VBA / Excel (3rd party)
462
Algorithms and Strategies
1K
Java client
1.1K
API clients
405
PHP client
4K
Python client
349
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.4K
General
In this Discussion
May 2024
humanmedia
May 2024
sujith
Failed to Fetch Data. Status Code: 400
humanmedia
May 2024
in
Python client
Suddenly I am not able to fetch data. Status Code:400 . It was working perfectly earlier.
Please help.
url = "
https://api.kite.trade/instruments/historical/
" + str(niftytoken) + "/" + str(tframe) + "minute?from=" + frm + "&to=" + to
a = requests.get(url, headers={"X-Kite-Version": "3", "Authorization": "enctoken " + kite_login.self.sessions[user_id][0]})
print(a,"url is working ",url)
print(a.status_code,"statuscode")
image.png
173.3K
sujith
May 2024
The API services are available only for paying Kite Connect clients. You can subscribe for the same.
humanmedia
May 2024
If I pass the values in URL, as I am using, it's giving the same error as above.
Used documentation from Zerodha
https://kite.trade/docs/connect/v3/historical/
zero_Error.png
87.3K
sujith
May 2024
You need to pass authorization header as mentioned in the documentation.
humanmedia
May 2024
can you please share an example
sujith
May 2024
You can refer to the pykiteconnect example
here
.
You can refer to the API documentation for cURL
example
.
Sign In
or
Register
to comment.
Used documentation from Zerodha
https://kite.trade/docs/connect/v3/historical/
You can refer to the API documentation for cURL example.