getMarginApi is not working


  • Getting the following error:

    File "/usr/local/lib/python3.10/dist-packages/SmartApi/smartConnect.py", line 526, in getMarginApi
    marginApiResult=self._postRequest("api.margin.api",params)
    File "/usr/local/lib/python3.10/dist-packages/SmartApi/smartConnect.py", line 263, in _postRequest
    return self._request(route, "POST", params)
    File "/usr/local/lib/python3.10/dist-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''


  • @admin, any update here


  • From 1st April, ordertype is either a newly added request param or made required. Without it, this error.

    With ordertype, no error!