☰
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.7K
All Categories
0
Incidents
144
Node JS client
38
Go client
786
.Net API client
375
Kite Publisher
537
.Net / VBA / Excel (3rd party)
452
Algorithms and Strategies
986
Java client
1.1K
API clients
402
PHP client
3.9K
Python client
343
Mobile and Desktop apps
1.3K
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.