Error code 400 at call ​ek.get_data

We saw an error code 400 bad request at calling ek.get_data('SCREEN(U(IN(Equity(active,public))), IN(TR.ExchangeMarketIdCode,"XMEX"))', 'TR.CommonName') from Eikon Python Data API yesterday, and a retry works. Can you please tell what is causing to this 400 error code?

Best Answer

  • Most likely the time out from the backend. When the backend times out the request, it responds with this error. The backend can can time out a request for a number of reasons including the request being too broad (in other words you're asking for too much data in a single request), the request processing taking too long because server is busy and so on.
    If the request is too broad, try narrowing it or splitting it into multiple requests, but mind also that as a result you may hit requests or response volume based limits.
    If the request is not too broad as in your example, simply retry the request as you did.

Answers