I am building a trading bot in nodejs using the Kite Connect API. I am having trouble accessing historical data. I have paid for the access to historical data and my app is active. I am using the latest access token as well. The screenshots of the relevant code and the response are attached. Please let me know what is the issue. Thanks!
@rish17 We generated the same URL at our end as yours and it's working fine. https://api.kite.trade/instruments/historical/738561/day?from=2020-10-15+00%3A00%3A00&to=2020-10-23+12%3A26%3A37&continuous=0&oi=0 You can avoid re-building the whole URLs, param, etc, and instead use our official nodejs client, as well. Refer nodejs documentation here.
Thanks @rakeshr . This is indeed puzzling. My URL seems to be fine and I tried the exactly same authentication headers for downloading instrument token data, which worked fine as well, therefore my headers are working fine too. I will have to investigate more and if it doesn't work out, probably the best wold be to use you official nodejs client
We generated the same URL at our end as yours and it's working fine.
https://api.kite.trade/instruments/historical/738561/day?from=2020-10-15+00%3A00%3A00&to=2020-10-23+12%3A26%3A37&continuous=0&oi=0
You can avoid re-building the whole URLs, param, etc, and instead use our official nodejs client, as well. Refer nodejs documentation here.