Not able to fetch BANKNIFTY data using HistoricalAPI


  • Hi,

    I am not able to fetch BANKNIFTY data using HistoricalAPI.

    try:
      historicParam={
      "exchange": "NSE",
      "symboltoken": "26009",
      "interval": "ONE_MINUTE",
      "fromdate": "2022-02-30 09:15", 
      "todate": "2022-02-30 09:25"
      }
      print(obj.getCandleData(historicParam))
    except Exception as e:
      print("Historic Api failed: {}".format(e.message))
    

    OUTPUT:

    {'status': True, 'message': 'SUCCESS', 'errorcode': '', 'data': None}
    

    I am not sure why the 'data' is None. Do let me know if there is anything wrong in the code?

    Thanks in advance!!


  • No historical data of all NFO scripts.


  • Facing same issue with Nifty50

    Log
    DEBUG:urllib3.connectionpool:https://apiconnect.angelbroking.com:443 "POST /rest/secure/angelbroking/historical/v1/getCandleData HTTP/1.1" 200 62
    INFO:root:{'fromdate': '2022-09-30 04:41', 'todate': '2022-10-29 21:13', 'exchange': 'NSE', 'symboltoken': '2', 'interval': 'ONE_HOUR'}
    INFO:root:{'status': True, 'message': 'SUCCESS', 'errorcode': '', 'data': None}