I am getting the data today, but not for days like 30Aug, though i have enabled the `continuous data` param kiteSdk.getHistoricalData(startTime, endTime, instrumentToken, interval, true);
@rakeshr: as the needed data is available in the charts, can the same api be made available? This is a problem on transition from expired to new contract. Will be a great helping feature
The Kite chart shows intraday data for live instruments only and not for expired instruments. For expired futures instruments, we only provide day candles.
It seems to work by setting, flag continuous=false in getHistoricalData API. Please let me know, the use of continuous=true, as we don't provide minute based candles of expired contracts.
<code class="CodeInline">okhttp3.internal.platform.Platform: <-- 200 OK https://api.kite.trade/instruments/historical/11381762/60minute?continuous=1&from=2019-08-30%2009:00:00&to=2019-09-02%2011:41:21 (538ms)
okhttp3.internal.platform.Platform: Date: Mon, 02 Sep 2019 06:11:22 GMT
okhttp3.internal.platform.Platform: Content-Type: application/json
okhttp3.internal.platform.Platform: Content-Length: 46
okhttp3.internal.platform.Platform: Connection: keep-alive
okhttp3.internal.platform.Platform: Set-Cookie: __cfduid=d258df47e5c61cdd919dc2dd7fe41ccc91567404682; expires=Tue, 01-Sep-20 06:11:22 GMT; path=/; domain=.kite.trade; HttpOnly
okhttp3.internal.platform.Platform: Access-Control-Allow-Origin: *
okhttp3.internal.platform.Platform: Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept
okhttp3.internal.platform.Platform: Accept-Ranges: bytes
okhttp3.internal.platform.Platform: Strict-Transport-Security: max-age=15552000; includeSubDomains
okhttp3.internal.platform.Platform: Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
okhttp3.internal.platform.Platform: Server: cloudflare
okhttp3.internal.platform.Platform: CF-RAY: 50fd53804e0089bb-MAA
okhttp3.internal.platform.Platform:
okhttp3.internal.platform.Platform: {"status": "success", "data": { "candles":[]}}
okhttp3.internal.platform.Platform: <-- END HTTP (46-byte body)
kiteSdk.getHistoricalData(startTime, endTime, instrumentToken, interval, true);
https://api.kite.trade/instruments/historical/11381762/60minute?continuous=1&from=2019-08-30%2009:00:00&to=2019-09-02%2011:41:21
For expired futures instruments, we only provide day candles.
2019-09-04 09:29:59,399 INFO okhttp3.internal.platform.Platform [XNIO-1 task-10] --> GET https://api.kite.trade/instruments/historical/11382018/15minute?continuous=1&from=2019-09-03%2009:15:00&to=2019-09-04%2016:00:00
2019-09-04 09:29:59,400 INFO okhttp3.internal.platform.Platform [XNIO-1 task-10] User-Agent: javakiteconnect/3.0.0
2019-09-04 09:29:59,400 INFO okhttp3.internal.platform.Platform [XNIO-1 task-10] X-Kite-Version: 3
2019-09-04 09:29:59,400 INFO okhttp3.internal.platform.Platform [XNIO-1 task-10] Authorization: token n58jodaiufrv0ur4:KlobgV3m0qERAM2UV0kVf9TpJNvyriAa
2019-09-04 09:29:59,400 INFO okhttp3.internal.platform.Platform [XNIO-1 task-10] --> END GET
2019-09-04 09:29:59,810 INFO okhttp3.internal.platform.Platform [XNIO-1 task-10] <-- 200 OK https://api.kite.trade/instruments/historical/11382018/15minute?continuous=1&from=2019-09-03%2009:15:00&to=2019-09-04%2016:00:00 (409ms)
2019-09-04 09:29:59,811 INFO okhttp3.internal.platform.Platform [XNIO-1 task-10] Date: Wed, 04 Sep 2019 03:59:59 GMT
2019-09-04 09:29:59,811 INFO okhttp3.internal.platform.Platform [XNIO-1 task-10] Content-Type: application/json
2019-09-04 09:29:59,812 INFO okhttp3.internal.platform.Platform [XNIO-1 task-10] Transfer-Encoding: chunked
2019-09-04 09:29:59,812 INFO okhttp3.internal.platform.Platform [XNIO-1 task-10] Connection: keep-alive
2019-09-04 09:29:59,813 INFO okhttp3.internal.platform.Platform [XNIO-1 task-10] Set-Cookie: __cfduid=dcdc8d35d90dafb1e1cebe0834a9f8c321567569599; expires=Thu, 03-Sep-20 03:59:59 GMT; path=/; domain=.kite.trade; HttpOnly
2019-09-04 09:29:59,814 INFO okhttp3.internal.platform.Platform [XNIO-1 task-10] Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept
2019-09-04 09:29:59,814 INFO okhttp3.internal.platform.Platform [XNIO-1 task-10] Access-Control-Allow-Origin: *
2019-09-04 09:29:59,815 INFO okhttp3.internal.platform.Platform [XNIO-1 task-10] Strict-Transport-Security: max-age=15552000; includeSubDomains
2019-09-04 09:29:59,815 INFO okhttp3.internal.platform.Platform [XNIO-1 task-10] Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
2019-09-04 09:29:59,816 INFO okhttp3.internal.platform.Platform [XNIO-1 task-10] Server: cloudflare
2019-09-04 09:29:59,816 INFO okhttp3.internal.platform.Platform [XNIO-1 task-10] CF-RAY: 510d0dcc4a7cce87-LHR
2019-09-04 09:29:59,818 INFO okhttp3.internal.platform.Platform [XNIO-1 task-10]
2019-09-04 09:29:59,819 INFO okhttp3.internal.platform.Platform [XNIO-1 task-10] {"status": "success", "data": { "candles":[["2019-09-04T09:15:00+0530",10829,10856.25,10801.5,10807,1465650]]}}
Above you may check for the request from 2019-09-03 to: 2019-09-04 16:00:00, I am getting today's candles
Please let me know, the use of continuous=true, as we don't provide minute based candles of expired contracts.