error while getting margins

durghy_trades
durghy_trades edited October 8 in General

Hello,

I am getting the following exception on a regular basis and there seems to be no problem in my code

I have a command that calculates margin every 10 seconds and the code sudenly throxs the following error:

return self._get("user.margins.segment", url_args={"segment": segment})
return self._request(route, "GET", url_args=url_args, params=params, is_json=is_json)
raise exp(data["message"], code=r.status_code)
kiteconnect.exceptions.DataException: Error parsing response (kitetrade-oms).
# Attaching the screenshot for your perusal

Can you please explain the exception and a possible way to mitigate or handle the same?
Tagged:
  • rakeshr
    I have a command that calculates margin every 10 seconds
    It's not recommended to poll funds API. You can alternatively fetch funds value at the start of the trading day and keep reducing the required order placed amount, which you can fetch from the order margin API.
Sign In or Register to comment.