How to get historical data for expired Futures

sameer
How to get historical data for expired Futures
I can't see instrument token for "HDFC17DECFUT" in "instruments()" list.
I guess you are supporting historical data for expired futures and not expired options ?
  • sameer
    Hi @sujith ,
    You reply is not clear to me.

    I know how to get historical data. But to get historical data, one needs instrument token.

    How to get instrument_token for expired futures ?
    For example, I can't see instrument_token for expired HDFC future "HDFC17DECFUT" in "/instruments/NSE".
    Can you please tell me instrument_token for "HDFC17DECFUT" ?
  • sujith
    You need to give current month contract's instrument token and pass continuous param as 1 with from and to param.
  • sameer
    sameer edited January 2018
    N/A
  • sameer
    Hi @sujith
    I tried to get values for HDFC current month futures from 9th Sept with continuous = 1 but I got data from Nov only(from when Jan18 series started) ... So I am not able to get data for expired contracts

    HDFC18JANFUT -> 11996418

    I am sharing my observation here:

    ~ $ ======================== continuous=1 ========================
    ~ $ curl "https://api.kite.trade/instruments/historical/11996418/day?from=2017-09-01+09:30:00&to=2017-11-16+10:30:00&continuous=1" -H "X-Kite-Version: 3" -H "Authorization: token key:token"
    {"status": "success", "data": {"candles": [["2017-11-13T09:15:00+0530",1700,1700,1700,1700,500],["2017-11-14T09:15:00+0530",1682.35,1682.35,1682.35,1682.35,500],["2017-11-15T09:15:00+0530",1675.8,1677.7,1675.8,1677.7,1500],["2017-11-16T09:15:00+0530",1682.15,1689.9,1680.7,1684,6000]]}}
    ~ $
    ~ $ ======================== continuous=0 ========================
    ~ $ curl "https://api.kite.trade/instruments/historical/11996418/day?from=2017-09-01+09:30:00&to=2017-11-16+10:30:00&continuous=0" -H "X-Kite-Version: 3" -H "Authorization: token key:token"
    {"status": "success", "data": {"candles": [["2017-11-13T09:15:00+0530",1700,1700,1700,1700,500],["2017-11-14T09:15:00+0530",1682.35,1682.35,1682.35,1682.35,500],["2017-11-15T09:15:00+0530",1675.8,1677.7,1675.8,1677.7,1500],["2017-11-16T09:15:00+0530",1682.15,1689.9,1680.7,1684,6000]]}}
  • sameer
    Hi @sujith
    I tried to get values for HDFC current month futures from 9th Sept with continuous = 1 but I got data from Nov only(from when Jan18 series started) ... So I am not able to get data for expited contracts

    I am sharing my observation here:
    ~ $ curl "https://api.kite.trade/instruments/historical/11996418/day?from=2017-09-01+09:30:00&to=2017-12-31+10:30:00&continuous=1" -H "X-Kite-Version: 3" -H "Authorization: token key:token"
    {"status": "success", "data": {"candles": [["2017-11-13T09:15:00+0530",1700,1700,1700,1700,500],["2017-11-14T09:15:00+0530",1682.35,1682.35,1682.35,1682.35,500],["2017-11-15T09:15:00+0530",1675.8,1677.7,1675.8,1677.7,1500],["2017-11-16T09:15:00+0530",1682.15,1689.9,1680.7,1684,6000],["2017-11-17T09:15:00+0530",1713.75,1734.9,1710.05,1725.6,14500],["2017-11-20T09:15:00+0530",1718.05,1720.05,1708.1,1712.2,6000],["2017-11-21T09:15:00+0530",1721.5,1726.3,1712.05,1721.9,6500],["2017-11-22T09:15:00+0530",1725.45,1734.4,1725.45,1734.4,2000],["2017-11-23T09:15:00+0530",1725,1725,1725,1725,500],["2017-11-24T09:15:00+0530",1722.2,1727,1722.2,1722.3,3000],["2017-11-27T09:15:00+0530",1722.3,1722.3,1722.3,1722.3,0],["2017-11-28T09:15:00+0530",1742.45,1745.15,1740,1740.95,11500],["2017-11-29T09:15:00+0530",1740.95,1740.95,1740.95,1740.95,0],["2017-11-30T09:15:00+0530",1710,1710,1690.1,1693.45,24500],["2017-12-01T09:15:00+0530",1694,1694,1668.5,1675.35,65000],["2017-12-04T09:15:00+0530",1671.2,1697.95,1671.2,1692.9,36500],["2017-12-05T09:15:00+0530",1687.25,1700,1679.35,1692,33500],["2017-12-06T09:15:00+0530",1682.8,1683.65,1657.1,1663.45,47000],["2017-12-07T09:15:00+0530",1665.05,1672,1658.35,1671,26000],["2017-12-08T09:15:00+0530",1677.25,1696.5,1677.25,1693.35,31000],["2017-12-11T09:15:00+0530",1705.7,1728.2,1703.35,1722.4,52000],["2017-12-12T09:15:00+0530",1713.6,1723.55,1710.1,1722.3,21500],["2017-12-13T09:15:00+0530",1720.35,1728,1701.7,1710.75,36500],["2017-12-14T09:15:00+0530",1701,1719.6,1697.1,1714.95,42500],["2017-12-15T09:15:00+0530",1730,1747.2,1724,1735,102000],["2017-12-18T09:15:00+0530",1720.1,1752,1692.15,1729.55,106000],["2017-12-19T09:15:00+0530",1728.15,1731.05,1717.1,1720.9,204500],["2017-12-20T09:15:00+0530",1724.05,1729.75,1703.5,1707,778500],["2017-12-21T09:15:00+0530",1712,1718.5,1706.6,1711.15,326000],["2017-12-22T09:15:00+0530",1706.95,1725,1706.95,1717.8,850500],["2017-12-26T09:15:00+0530",1723,1723.4,1713,1719.45,2400000],["2017-12-27T09:15:00+0530",1714,1723.4,1712.35,1715.35,5245500],["2017-12-28T09:15:00+0530",1713.45,1722.6,1700.4,1706.6,6000000],["2017-12-29T09:15:00+0530",1708.9,1716.65,1705.95,1714.05,2241500]]}}~ $
    ~ $
    ~ $
    ~ $ curl "https://api.kite.trade/instruments/historical/11996418/day?from=2017-09-01+09:30:00&to=2017-12-31+10:30:00&continuous=0" -H "X-Kite-Version: 3" -H "Authorization: token key:token"
    {"status": "success", "data": {"candles": [["2017-11-13T09:15:00+0530",1700,1700,1700,1700,500],["2017-11-14T09:15:00+0530",1682.35,1682.35,1682.35,1682.35,500],["2017-11-15T09:15:00+0530",1675.8,1677.7,1675.8,1677.7,1500],["2017-11-16T09:15:00+0530",1682.15,1689.9,1680.7,1684,6000],["2017-11-17T09:15:00+0530",1713.75,1734.9,1710.05,1725.6,14500],["2017-11-20T09:15:00+0530",1718.05,1720.05,1708.1,1712.2,6000],["2017-11-21T09:15:00+0530",1721.5,1726.3,1712.05,1721.9,6500],["2017-11-22T09:15:00+0530",1725.45,1734.4,1725.45,1734.4,2000],["2017-11-23T09:15:00+0530",1725,1725,1725,1725,500],["2017-11-24T09:15:00+0530",1722.2,1727,1722.2,1722.3,3000],["2017-11-27T09:15:00+0530",1722.3,1722.3,1722.3,1722.3,0],["2017-11-
  • sujith
    @sameer,
    We have informed data team they are looking into this.
  • sameer
    Thanks @sujith
    Please look into following two points also
    1. Muhurat trading day minute data
    2. Market traded on Saturday on 28th Feb 2015 for Budget day, but that data also seems to be missing
  • sameer
    Hi @sujith
    Any update from data team ?

    Can u confirm if that issue on your side or am I missing something while calling historical data API ?
    For example I see timestamp in format:
    2017-11-14T09:15:00+0530

    and I guess u have chnaged format to:
    2017-11-14 09:15:00+05:30
  • sujith
    @sameer,
    We are still waiting for their reply.

    The params you send is like this yyyy-mm-dd hh:mm:ss but the response will be yyyy-mm-ddThh:mm:ss+0530
    It has always been like this.
  • sujith
    sujith edited January 2018
    We do have data for 28 FEB 2015 and muhurat trading.
  • sameer
    @sujith
    I think u dont have data for 2014 Muhurat trading
    23rd Oct 2014
  • sujith
    @sameer,
    We do have day data for 23rd October 2014.
  • sameer
    @sujith
    yes but I was expecting minute data becauze u have minute data for days prior to 23rd October 2014.
  • sujith
    We have minute level data from FEB 2015, but we have back populated data for some instruments which we could manage to get.
  • sameer
    Hi @sujith
    Just now checked again...I am still not seeing minute and day data for expired futures

    1) When kite team expected to provide historical data for expired futures ?
    2) Also are u providing continuous data for expired options also as description of "continous flag" says flag used for futures and options ("`continuous` is a boolean flag to get continuous data for futures and options instruments."?
  • sujith
    Hi @sameer,
    We don't have minute level data for expired instruments. We only have day candles for expired futures instruments.
    We don't have historical data for expired options instruments. We will provide it in future.
  • sameer
    Hi @sujith ,
    1. Wasn't kite 3.0 supposed to provide minute data for expired futures ?
    2. I can't see day candles also for expired futures
  • sujith
    @sameer,
    As of now, we don't have any plans for providing minute level data for expired instruments.
    Can you give an example for which you are not receiving data for expired futures instruments?
  • sameer
    Hi @sujith , NF and BNF are two most highest traded instruments. For backtesting we need sufficient historical data.
    Also, you have already resolved instrument token issue for day data for expired futures.

    Please provide minute data for atleast two highest traded futures Nifty and Bank Nifty
  • sujith
    Hi @sameer,
    As of now, our data team is working on revamp of the historical data API. I will forward your concern.
  • sameer
    Hi @sujith
    NIFTY 22nd Feb 2018 and BANKNIFTY 22nd Feb 2018 Futures...I tried downloading data from 1st Jan 2017 but got data from 1st Dec 2017
  • sameer
    Continuous = True was set still did not receive old data
  • sujith
    Can you check now? It is fixed.
  • mintuhouse
    Is this issue fixed?
    I want to resubscribe to the historical data service, but it won't make sense for until this is fixed.

    I need historical data for all futures (index and individual) data since 2011. Is it possible today?
  • sujith
    @mintuhouse,
    It is fixed.
    We have day's historical data for expired instruments from JUL 2011.
Sign In or Register to comment.