Future Historical data using curl

guruppk46
guruppk46 edited May 2020 in API clients
Hi,

Could you please help me with the following.

I was trying to get historical data for NIFTY FUT.

I can fetch the latest data through curl, however when I tried fetching 3minute data from last year I got blank data.

Here is the command

curl -v -H "X-Kite-Version: 3" -H "Authorization: token johsr81w720sft64:hXiH809EkYR7FRzT8XdieOIW6n6fb82F" "https://api.kite.trade/instruments/historical/13430274/minute?from=2019-04-01+09:30:00&to=2019-04-30+10:30:00&continuous=1"

Here is the output.
* Trying 2606:4700::6812:5b26...
* TCP_NODELAY set
* Trying 104.18.90.38...
* TCP_NODELAY set
* Connected to api.kite.trade (2606:4700::6812:5b26) port 443 (#0)
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /anaconda3/ssl/cacert.pem
CApath: none
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: CN=*.kite.trade
* start date: Mar 3 00:00:00 2020 GMT
* expire date: Apr 2 23:59:59 2022 GMT
* subjectAltName: host "api.kite.trade" matched cert's "*.kite.trade"
* issuer: C=GB; ST=Greater Manchester; L=Salford; O=Sectigo Limited; CN=Sectigo RSA Domain Validation Secure Server CA
* SSL certificate verify ok.
> GET /instruments/historical/13430274/minute?from=2019-04-01+09:30:00&to=2019-04-30+10:30:00&continuous=1 HTTP/1.1
> Host: api.kite.trade
> User-Agent: curl/7.60.0
> Accept: */*
> X-Kite-Version: 3
> Authorization: token johsr81w720sft64:hXiH809EkYR7FRzT8XdieOIW6n6fb82F
>
< HTTP/1.1 200 OK
< Date: Mon, 11 May 2020 18:20:15 GMT
< Content-Type: application/json
< Content-Length: 46
< Connection: keep-alive
< Set-Cookie: __cfduid=dd02f564936f869f947dd6b9db66335971589221214; expires=Wed, 10-Jun-20 18:20:14 GMT; path=/; domain=.kite.trade; HttpOnly; SameSite=Lax
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept
< Accept-Ranges: bytes
< CF-Cache-Status: DYNAMIC
< Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
< Strict-Transport-Security: max-age=15552000; includeSubDomains
< Server: cloudflare
< CF-RAY: 591de9afdd480202-SIN
< cf-request-id: 02a69061e800000202530da200000001
<
* Connection #0 to host api.kite.trade left intact
{"status": "success", "data": { "candles":[]}}



  • sujith
    We only provide day candle data for expired futures instruments.
Sign In or Register to comment.