Upgrade from Eikon -> Workspace. Learn about programming differences.

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
55 1 3 2

Client is repeatedly getting error 400 - bad request

Hello,


I have a client who is repeatedly encountering error 400 bad request codes When he tries to use the API. I took a look at his code, and at most he is requesting 5000 datapoints from ek.get_data, which is well below the 10,000 data points limit. What could be causing the error code?

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hello @r.patel

Does the issue still persist in your environment?

Upvotes
Accepted
24.4k 53 17 14

Hello @r.patel

Does the issue still persist in your environment? Could you please test with the new version of Eikon Data API (1.1.7)? You can update the library with "pip install eikon==1.1.7" command.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
39.4k 77 11 27

Can you provide an example of the request that returns this error? The version of Eikon Data APIs library for Python would also be very helpful.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1.1.2b0 is the version. Here is one of the requests that I make that throws an error

Index = RU2500-G

date = '2020-09-30'

date2 = date.replace("-","")

date3 = "\"{dt}\"".format(dt=date2)

Index_RICS, err = ek.get_data('Index({ind},{dt})'.format(ind=Index,dt=date3),['TR.RIC(SDate={dt})'.format(dt = date), 'TR.PortfolioShares(SDate={dt})'.format(dt = date), 'TR.PortfolioWeight(SDate={dt})'.format(dt = date)])


Index_RICS.dropna(inplace=True)

Index_RICS_List = Index_RICS['RIC'].to_list()


data = ek.get_data(Index_RICS_List,fields =

['TR.PretaxROAPercent(SDate=dt},Period=FY0,AlignType=PeriodEndDate)'.format(dt=date), 'TR.PretaxROAPercent(SDate={dt},Period=FY-1, AlignType = PeriodEndDate)'.format(dt=date)]

)[0]

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.