Error getting positions and margins

DJ_Jain
DJ_Jain edited March 28 in API clients
For last 3 days there is major problems with margin both at kite portal as well as api, please see stack of error below (in the same module, positions are returned correctly, but not margins, orders and trades)
Traceback (most recent call last):

File "C:\Users\DJain\AppData\Local\Temp/ipykernel_26276/979208526.py", line 1, in <module>
pos.my_positions(kite)

File "C:\Users\DJain\Options\trade_management.py", line 69, in my_positions
margins = self._kite.margins()

File "C:\ProgramData\Anaconda3\lib\site-packages\kiteconnect\connect.py", line 324, in margins
return self._get("user.margins")

File "C:\ProgramData\Anaconda3\lib\site-packages\kiteconnect\connect.py", line 837, in _get
return self._request(route, "GET", url_args=url_args, params=params, is_json=is_json)

File "C:\ProgramData\Anaconda3\lib\site-packages\kiteconnect\connect.py", line 913, in _request
raise exp(data["message"], code=r.status_code)

GeneralException: Message build error
  • rakeshr
    GeneralException: Message build error
    You seem to be making requests during the BOD process time(i.e midnight from 12:30 AM to 7:30 AM). During the BOD process, the system is in maintenance.
  • DJ_Jain
    @rakeshr Yes I was. We also do our maintenance during this period, is there a way to make it work for us? And why only margin errors? why not positions, holdings etc too?
  • sujith
    sujith edited March 29
    @DJ_Jain,
    This is a response from OMS. During beginning of the day (BOD) process, data is erased. On the new OMS, you won't see this error.
Sign In or Register to comment.