Error while fetching orders (happening in random times)

Strategist

The following error occurred today two times one at 9:45 AM and another one at 11:00 AM. Till yesterday did not face any errors, it was perfectly working and getting orders and LTPs. Please provide reason for this

File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Sept 23\Monday\Fin_Dir_diffTimes_Tuesday.py", line 887, in Prg2_FSTrev934am
openorders = kite.orders()
^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\kiteconnect\connect.py", line 415, in orders
return self._format_response(self._get("orders"))
^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\kiteconnect\connect.py", line 851, in _get
return self._request(route, "GET", url_args=url_args, params=params, is_json=is_json)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\kiteconnect\connect.py", line 933, in _request
raise ex.DataException("Unknown Content-Type ({content_type}) with response: ({content})".format(
kiteconnect.exceptions.DataException: Unknown Content-Type (text/html) with response: (b'

503 Service Unavailable

\nNo server is available to handle this request.\n\n')
Tagged:
  • sujith
    How long you got it this? Is this hosted somewhere or a local machine? Is this consistent or intermittent?
  • Strategist
    Hello Sujith,
    Python code is running in AWS server.
    Error happened two times one at around 9:45 AM and other one is around 11:00 AM. After that I have stopped the program.

    Additional details:
    Program check the code once in 30 seconds. In every cycle it looks for status of SL orders (open) and LTP of executed legs.

    Please let me know any additional info. required.
Sign In or Register to comment.