Historic API not working


  • I know that the rate limit of historic API is 3 requests per second. However today I am getting error b'Access denied because of exceeding access rate' randomly. sometime just after 1st request, sometimes after 2nd request.
    @admin @admin123 is there any problem with the API today? Please confirm.


  • Today whole day I got errors. No trade was placed today
    Leaving Angel and shifting to ICICI or Zerodha
    last 2 days facing issue
    Cant beleive big broker like u can have this for 2 full days!!!!!

    22-Feb-23 09:45:12 :     fetch_ohlc_angel() - Getting candles
    22-Feb-23 09:45:13 :     fetch_ohlc_angel() - Exception occured while fetching OHLC for ticker:NIFTY23FEB23FUT from 2023-02-20 09:45 to 2023-02-22 09:45
    Traceback (most recent call last):
      File "/home/a/.local/lib/python3.10/site-packages/smartapi/smartConnect.py", line 191, in _request
        data = json.loads(r.content.decode("utf8"))
      File "/usr/lib/python3.10/json/__init__.py", line 346, in loads
        return _default_decoder.decode(s)
      File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
        obj, end = self.raw_decode(s, idx=_w(s, 0).end())
      File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
        raise JSONDecodeError("Expecting value", s, err.value) from None
    json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/home/a/Desktop/angel_st/src/angel_main.py", line 443, in fetch_ohlc_angel
        data = obj.getCandleData(historic_param)
      File "/home/a/.local/lib/python3.10/site-packages/smartapi/smartConnect.py", line 416, in getCandleData
        getCandleDataResponse = self._postRequest(
      File "/home/a/.local/lib/python3.10/site-packages/smartapi/smartConnect.py", line 225, in _postRequest
        return self._request(route, "POST", params)
      File "/home/a/.local/lib/python3.10/site-packages/smartapi/smartConnect.py", line 194, in _request
        raise ex.DataException("Couldn't parse the JSON response received from the server: {content}".format(
    smartapi.smartExceptions.DataException: Couldn't parse the JSON response received from the server: b'Access denied because of exceeding access rate'
    22-Feb-23 09:45:13 :     fetch_ohlc_angel() - Exception: Couldn't parse the JSON response received from the server: b'Access denied because of exceeding access rate'
    Traceback (most recent call last):
      File "/home/a/.local/lib/python3.10/site-packages/smartapi/smartConnect.py", line 191, in _request
        data = json.loads(r.content.decode("utf8"))
      File "/usr/lib/python3.10/json/__init__.py", line 346, in loads
        return _default_decoder.decode(s)
      File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
        obj, end = self.raw_decode(s, idx=_w(s, 0).end())
      File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
        raise JSONDecodeError("Expecting value", s, err.value) from None
    json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/home/a/Desktop/angel_st/src/angel_main.py", line 443, in fetch_ohlc_angel
        data = obj.getCandleData(historic_param)
      File "/home/a/.local/lib/python3.10/site-packages/smartapi/smartConnect.py", line 416, in getCandleData
        getCandleDataResponse = self._postRequest(
      File "/home/a/.local/lib/python3.10/site-packages/smartapi/smartConnect.py", line 225, in _postRequest
        return self._request(route, "POST", params)
      File "/home/a/.local/lib/python3.10/site-packages/smartapi/smartConnect.py", line 194, in _request
        raise ex.DataException("Couldn't parse the JSON response received from the server: {content}".format(
    smartapi.smartExceptions.DataException: Couldn't parse the JSON response received from the server: b'Access denied because of exceeding access rate'
    

  • I was facing the same issue from last 2 days. Now it seems it starts working fine. Need to test in live market though.


  • Looks like issue is resolved now. I am able to pull historical data. Thanks @admin


  • 2023-02-22 12:44:35.901798 : Start task in the background
    {'task': 'hb', 'channel': '', 'token': '0894940755', 'user': 'XXXXXX', 'acctid': 'XXXXXXX'}
    HeartBeat Sending Failed
    2023-02-22 12:44:39.117428 : Start task in the background
    {'task': 'hb', 'channel': '', 'token': '0894940755', 'user': 'XXXXXX', 'acctid': 'XXXXX'}
    HeartBeat Sending Failed

    getting this error please help


  • 188 data = json.loads(r.content.decode("utf8"))
    190 except ValueError:

    failed while getting historical data


  • Facing Same issue since Yesterday , no response from Admin ...Do we have any clue if someone is out here from Angel to help us on this issue?


  • Not working for me also. Kindly resolve the issue ASAP.


  • Any update?


  • @admin i am also facing similar issue kindly resolve


  • facing similar issue


  • @admin123 @admin , facing the similar issue. Any update on this issue?


  • @admin , I am able to get the LastTradingPrice of an instrument, But History API is not working for me as well. Can you resolve the history API issue asap please.?


  • i am also facing same issue


  • Same issue here too.

    Access denied because of exceeding access rate
    

    9894182e-1e9b-47ef-9405-b8e4a2759ddf-image.png

    @admin @administrators Please take a look


  • i have 403 error. I fetch 2 time per minute. please increase limit


  • facing similar issue..


  • @admin I am too facing the issue. kindly check and resolve


  • @admin Facing same issue, please resolve


  • @admin facing similar issue. Kindly check the issue.