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
1 0 0 3

famous Backend error. 400 Bad Request starting from yesterday

The api works fine until yesterday. Starting from yesterday, i keep getting the 404 bad request. I simply just wrote a try catch loop for 3 times and it worked through.

However, starting from this morning, my try catch loop could not give me any result. I increased the repeat time to 20 times, and it didn't succeeded once.

To replicate:

python 3.6
import eikon as ek
ek.set_app_id(app_id)
ek.set_timeout(120)
date = '2018-03-28'
symbol_ric = ['AUDCAD=', 'AUDCHF=', 'AUDJPY=', 'AUDNZD=', 'AUD=', 'CADCHF=', 'CADJPY=', 'CHFJPY=', 'EURAUD=',
 'EURCAD=', 'EURCHF=', 'EURGBP=', 'EURJPY=', 'EURNZD=', 'EUR=', 'GBPAUD=', 'GBPCAD=', 'GBPCHF=',
 'GBPJPY=', 'GBPNZD=', 'GBP=', 'NZDCAD=R', 'NZDCHF=R', 'NZDJPY=', 'NZD=', 'CAD=', 'CHF=', 'JPY=']
req, error = ek.get_data(symbol_ric, parameters={'SDate':f'{date}', 'EDate':f'{date}'}, fields=['TR.ASKPRICE','TR.BIDPRICE'], debug=True)

some times the result is timeout, sometimes it is returns a dataframe with some ric missing

full log on one trial with debug=True on is attached.trdebug-log.txt

I tried to get the rate one by one, and it always stuck on AUDCHF=

please advise how to fix this!

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.

Upvotes
39.4k 77 11 27

@yikang

Thank you for reporting this issue. I have reproduced and escalated it. I will post on this thread as soon as I hear back from the resolver team. As an immediate workaround you can retrieve yesterday's closing bid and ask rates for FX RICs using CLOSE_BID and CLOSE_ASK fields, e.g.

ek.get_data(symbol_ric, fields=['CLOSE_BID','CLOSE_ASK'])
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.

thanks, the close_bid works.

So right now the TR.ASK and TR.BID is working, but no matter what SDATE and EDATE i post to the request for ['CLOSE_BID','CLOSE_ASK'], it will give me todays data. any thoughts on that?

ek.get_data('JPY=', parameters={'SDate':'2018-03-01', 'EDate':'2018-04-01'},fields=['CLOSE_BID','CLOSE_ASK'], debug=True)

CLOSE_BID and CLOSE_ASK fields can only provide bid/ask rates as of yesterday's close. SDate and EDate parameters are not applicable to these fields and are ignored in the request. In general field names that do not start with TR.* come from the real-time data stream and do not provide timeseries of history.

ok, only found out that today. I will keep using TR.askprice and TR.bidprice since it was fixed(I assume?)

Show more comments
Upvotes
3 2 2 4

I also have the same problem starting yesterday........

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.

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.