Error while retrieving instruments

Hi, I am getting the below error intermittently while trying to retrieve the instruments through kite.instruments
kiteconnect.exceptions.DataException: Unknown Content-Type (text/html) with response: (b'\r\n502 Bad Gateway\r\n\r\n

502 Bad Gateway


can you give a solution for this?
  • sujith
    Kite instruments file is a huge csv dump that contains data about all the instruments that are traded for the day. It is recommended to fetch this and cache it locally at your end every day once. The local cache should be the source for all your instruments data requirements and not the upstream.

    This is an error from the Cloudflare, we will raise it with them.
  • madhumattangi
    @sujith I got this error too. Any update or workaround?
  • sujith
    How many times do you fetch this file in a day?
Sign In or Register to comment.