☰
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
13.8K
All Categories
0
Incidents
154
Node JS client
40
Go client
793
.Net API client
378
Kite Publisher
537
.Net / VBA / Excel (3rd party)
457
Algorithms and Strategies
993
Java client
1.1K
API clients
404
PHP client
4K
Python client
346
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.3K
General
In this Discussion
May 23
humanmedia
May 24
sujith
Failed to Fetch Data. Status Code: 400
humanmedia
May 23
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 23
The API services are available only for paying Kite Connect clients. You can subscribe for the same.
humanmedia
May 23
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 23
You need to pass authorization header as mentioned in the documentation.
humanmedia
May 23
can you please share an example
sujith
May 24
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.