last 3 days FUTURE LTP of NIFTY

indiatechpython
Hi Sujith - I'm new to Kiteconnect and want quick guidance on how to retrieve LTP and OHLC data for future instruments like - NIFTY20OCTFUT or BANKNIFTY20OCTFUT
  • rakeshr
    For python client, you can refer to this documentation.
  • indiatechpython
    Hi Rakesh - not able to get any API for future only. like the query print(kite.ohlc('NSE:NIFTY20OCTFUT')) not giving me any data.
  • sujith
    NSE futures and options will have NFO as the exchange in the Kite Connect universe.
    NSE currency will be CDS and for commodity, MCX is the exchange
  • indiatechpython
    thanks Sujith :), so now my pprint(kite.quote("NFO:NIFTY20OCTFUT")) statement works well... can i get last few days (5 days) similar data using API for FUTURE contract
  • sujith
    You will need to use historical data API.
    The Quote API just gives you snapshot of data at the moment of request.
  • indiatechpython
    thanks again, but from historical data API im not getting LTP :( plz refer code - pprint(kite.historical_data(13014274, date(2020,10,9), date(2020,10,12), "day"))
  • sujith
    If you need only LTP then you will have to try it out during market hours only or try Quote API with MCX instruments.
  • indiatechpython
    ok thanks again.
This discussion has been closed.