Python API error 400 for same set of data that works in Excel

Excel formula that pulls data (EPS numbers) as expected:

=TR("SCREEN(U(IN(Equity(active,public,primary))),avail(TR.EPSEstValue(Period=FY1,Brokers=US_3202),TR.EPSEstValue(Period=FY1,Brokers=US_63721),TR.EPSEstValue(Period=FY1,Brokers=US_63725))>=-100)","TR.PrimaryRIC","avail(TR.EPSEstValue(Period=FY1,Brokers={US_3202}),TR.EPSEstValue(Period=FY1,Brokers={US_63721}),TR.EPSEstValue(Period=FY1,Brokers={US_63725}))")

Python Web script API that error 400 Bad Request consistently:

df, err = ek.get_data(['SCREEN(U(IN(Equity(active,public,primary))),avail(TR.EPSEstValue(Period=FY1,Brokers=US_3202),TR.EPSEstValue(Period=FY1,Brokers=US_63721),TR.EPSEstValue(Period=FY1,Brokers=US_63725))>=-100)'], ['TR.PrimaryRIC','avail(TR.EPSEstValue(Period=FY1,Brokers={US_3202}),TR.EPSEstValue(Period=FY1,Brokers={US_63721}),TR.EPSEstValue(Period=FY1,Brokers={US_63725}))'])

Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    I have contacted the development team and found that it returns 400 Bad Request because of timeout. The SCREEN function is complex and takes a lot of time to be processed so it can be timeout.

    As I know, Equity Screener is available but not yet supported through Eikon Data API.

Answers