@admin The response is not in a proper json format. That's why SmartConnect,py class throws error. As I observed, it's broke since Apilr01 2026.
Latest posts made by sdrnaikinv
-
RE: SmartConnect.getMarginApi() throws exception.posted in Python SDK
-
SmartConnect.getMarginApi() throws exception.posted in Python SDK
This API was working fine earlier. Started throwing exception from last few days.
Exception:
Lib\site-packages\SmartApi\smartConnect.py", line 235, 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''
Response: 200 b'{"status":true,"message":"SUCCESS","errorcode":"","data":{"net":"6356.4385","availablecash":"6356.4385","availableintradaypayin":"0.0000","availablelimitmargin":"0.0000","collateral":"0.0000","m2munrealized":"-2180.0000","m2mrealized":"0.0000","utiliseddebits":"44976.3715","utilisedspan":null,"utilisedoptionpremium":null,"utilisedholdingsales":null,"utilisedexposure":null,"utilisedturnover":null,"utilisedpayout":"6356.4385"}}'