How to fetch daily OHLC data

kanika
kanika edited March 10 in Python client
How can we daily OHLC data for NSE scripts ?
  • Sravanthi_bh
    For the day's OHLC, you can use Quote APIs. Go through this documentation.
  • Niru
    Hi, Index Name setting error between "NIFTY BANK" Vs "BANKNIFTY" to fetch instruments (options of BANKNIFTY Index). How to go about it?

    Python code run log as below:

    2025-04-28 10:55:13,288 - INFO - MainThread - Kite Connect/Ticker init complete.
    2025-04-28 10:55:13,288 - INFO - MainThread - Fetching NFO instrument list...
    2025-04-28 10:55:13,957 - INFO - MainThread - Fetched 30380 instruments for NFO.
    2025-04-28 10:55:13,976 - WARNING - MainThread - No options found containing NAME='BANKNIFTY' (case-insensitive, stripped). Check INDEX_NAME setting.
    2025-04-28 10:55:13,979 - INFO - MainThread - Sample instrument names found in NFO list (after strip): ['NIFTY' 'BANKNIFTY' 'AARTIIND' 'ABB' 'ABCAPITAL' 'ABFRL' 'ACC'
    'ADANIENSOL' 'ADANIENT' 'ADANIGREEN']
    2025-04-28 10:55:13,990 - CRITICAL - MainThread - Instrument fetch failed. Exiting.
  • Sravanthi_bh
    To fetch the Banknifty options you may try fetching as "NIFTY BANK"

    Check out the instrument file and fetch this accordingly.
Sign In or Register to comment.