@admin, I am getting the error
'Access denied because of exceeding access rate'
when using smartApi.getCandleData function
@admin, I am getting the error
'Access denied because of exceeding access rate'
when using smartApi.getCandleData function
@deeeepak Some more details
(angelone) [ec2-user@ip-172-111-111-111 angelone]$ pip list installed
Package Version
------------------ ---------
attrs 23.1.0
autobahn 23.6.2
Automat 22.10.0
certifi 2023.5.7
cffi 1.15.1
charset-normalizer 3.1.0
constantly 15.1.0
contourpy 1.3.3
cryptography 43.0.1
cycler 0.12.1
fonttools 4.61.1
hyperlink 21.0.0
idna 3.4
incremental 22.10.0
isodate 0.6.1
jwt 1.4.0
kiwisolver 1.4.9
logzero 1.7.0
matplotlib 3.10.8
mplfinance 0.12.10b0
numpy 2.4.0
packaging 25.0
pandas 2.3.3
pandas-ta-classic 0.3.59
pillow 12.1.0
pip 25.3
pycparser 2.21
pycryptodome 3.23.0
pyotp 2.8.0
pyparsing 3.1.0
python-dateutil 2.8.2
pytz 2023.3
rdflib 6.3.2
rdflib-jsonld 0.6.2
requests 2.31.0
setuptools 80.9.0
simplejson 3.19.1
six 1.16.0
smartapi-python 1.4.8
Twisted 22.10.0
txaio 23.1.1
typing_extensions 4.6.3
tzdata 2025.3
urllib3 2.0.3
websocket-client 1.8.0
wheel 0.45.1
zope.interface 6.0
Hi Team,
Can you please check the error below, where the SmartConnect Python SDK is not able to handle the response from the server?
Tue, 02-Jun 14:56:06 COFORGE ------------------------------------------------------------------------------------------------------------------------------------------------------
Traceback (most recent call last):
File "/home/ec2-user/angelone/lib64/python3.11/site-packages/SmartApi/smartConnect.py", line 230, in _request
data = json.loads(r.content.decode("utf8"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/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/ec2-user/angelone/top_gainers_losers.py", line 429, in <module>
hist_data = smartApi.getCandleData({"exchange": "NFO","symboltoken": str(opt_token),"interval": "FIVE_MINUTE","fromdate":fromdate ,"todate": todate})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ec2-user/angelone/lib64/python3.11/site-packages/SmartApi/smartConnect.py", line 465, in getCandleData
getCandleDataResponse=self._postRequest("api.candle.data",historicDataParams)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ec2-user/angelone/lib64/python3.11/site-packages/SmartApi/smartConnect.py", line 263, in _postRequest
return self._request(route, "POST", params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ec2-user/angelone/lib64/python3.11/site-packages/SmartApi/smartConnect.py", line 233, 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'
Hi @admin can you please share what's wrong with my inputs? I get the same error.
[E 260107 09:21:35 smartConnect:246] Error occurred while making a POST request to https://apiconnect.angelone.in/rest/secure/angelbroking/historical/v1/getCandleData.
Error: Something Went Wrong, Please Try After Sometime.
URL: https://apiconnect.angelone.in/rest/secure/angelbroking/historical/v1/getCandleData,
Headers: {'Content-type': 'application/json', 'X-ClientLocalIP': '127.0.0.1', 'X-ClientPublicIP': 'XXXXXXXX', 'X-MACAddress': 'XXXXXXXXXX', 'Accept': 'application/json', 'X-PrivateKey': 'XXXXXX', 'X-UserType': 'USER', 'X-SourceID': 'WEB'},
Request: {'exchange': 'NFO', 'symboltoken': '123274', 'interval': 'FIVE_MINUTE', 'fromdate': '2026-01-06 09:15', 'todate': '2026-01-07 09:20'},
Response: {'message': 'Something Went Wrong, Please Try After Sometime', 'errorcode': 'AB1004', 'status': False, 'data': None}
[E 260106 11:13:55 smartConnect:246]
Error occurred while making a POST request to https://apiconnect.angelone.in/rest/secure/angelbroking/historical/v1/getCandleData. Error: Something Went Wrong, Please Try After Sometime. URL: https://apiconnect.angelone.in/rest/secure/angelbroking/historical/v1/getCandleData,
Headers: {'Content-type': 'application/json', 'X-ClientLocalIP': '127.0.0.1', 'X-ClientPublicIP': '106.198.198.198', 'X-MACAddress': 'b5:b5:b5:b5:b5:b5', 'Accept': 'application/json', 'X-PrivateKey': 'XXXXXX', 'X-UserType': 'USER', 'X-SourceID': 'WEB'},
Request: {'exchange': 'NFO', 'symboltoken': '119475', 'interval': 'FIVE_MINUTE', 'fromdate': '2026-01-05 09:15', 'todate': '2026-01-06 11:13'},
Response: {'message': 'Something Went Wrong, Please Try After Sometime', 'errorcode': 'AB1004', 'status': False, 'data': None}
Timestamp: 06-Jan-2026 11:13:55
Inputs:
NATIONALUM27JAN26335CE
2026-01-05 09:15
2026-01-06 11:13
Hi @Moderator_3 ,
API for gainersLosers was working till 11:20 today and stopped after it.
[E 240912 11:59:03 smartConnect:243] Error occurred while making a POST request to https://apiconnect.angelbroking.com/rest/secure/angelbroking/marketData/v1/gainersLosers. Error: Something Went Wrong, Please Try After Sometime. URL: https://apiconnect.angelbroking.com/rest/secure/angelbroking/marketData/v1/gainersLosers, Headers: {'Content-type': 'application/json', 'X-ClientLocalIP': '127.0.0.1', 'X-ClientPublicIP': ' ', 'X-MACAddress': '', 'Accept': 'application/json', 'X-PrivateKey': '', 'X-UserType': 'USER', 'X-SourceID': 'WEB'}, Request: {'datatype': 'PercOIGainers', 'expirytype': 'NEAR'}, Response: {'message': 'Something Went Wrong, Please Try After Sometime', 'errorcode': 'AB1004', 'status': False, 'data': None}
so far i have tried
Can you please check and fix.
My username: D58222660
Hi Team, Can you please share any update
Can someone please guide me how to place pay later order in python