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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 0 2

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-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
icon clock
10 |1500

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

Upvotes
39.2k 75 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 5.0 MiB each and 10.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 1 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 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea