Why is the status True and message success even when the order status was already cancelled?

Why is the status True and message success even when the order status was already cancelled?

Error: HTTPSConnectionPool(host='apiconnect.angelbroking.com', port=443): Max retries exceeded with url: /rest/secure/angelbroking/order/v1/getPosition?{} (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0xffff979e7310>, 'Connection to apiconnect.angelbroking.com timed out. (connect timeout=7)')).
I used historicAPI and the data mismatched of the previous candle when the same data was fetched again
I was fetching NSE:LTIM data 5 min OHLC after every 5 min 5 seconds after candle close time and data was different for the same candle in subsequent candle!


Check close values of candle (15:00:00)
NSE:MPHASIS-EQ
Exception in thread Thread-22:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/smartapi/smartConnect.py", line 188, in _request
data = json.loads(r.content.decode("utf8"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/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 "/Users/yashchotrani/Desktop/untitled folder 2/Finalised/Most_Probably_Final.py", line 173, in getHistoricalAPI
candel_json = credentials.SMART_API_OBJ.getCandleData(historicParam)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/smartapi/smartConnect.py", line 403, in getCandleData
getCandleDataResponse=self._postRequest("api.candle.data",historicDataParams)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/smartapi/smartConnect.py", line 220, in _postRequest
return self._request(route, "POST", params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/smartapi/smartConnect.py", line 191, 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'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
self.run()
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1394, in run
self.function(*self.args, **self.kwargs)
File "/Users/yashchotrani/Desktop/untitled folder 2/Finalised/Most_Probably_Final.py", line 191, in checkSingnal
candel_df = getHistoricalAPI(token)
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/yashchotrani/Desktop/untitled folder 2/Finalised/Most_Probably_Final.py", line 176, in getHistoricalAPI
print("Historic Api failed: {}".format(e.message))
^^^^^^^^^