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

different stuff coming back from eikon.get_data() vs. refinitiv.data.get_data() ... why oh why?

I'd really like to move on from eikon as it is very temperamental ... (400, 500 errors randomly).

But, first thing i want to move away from, getting contents from portfolios, any which way i try, i cannot get the CF_CURR or CURRENCY back from refinitiv.data when downloading my portfolios (or watchlists).

All packages up to date, H2 is 4.x ... all fine

Here are the fields I want back:

('TR.CompanyReportCurrency','CF_CURR','TR.PortfolioShares','TR.PriceClose(SDate=' + datum + ')','TR.PriceClose(SDate=' + datum + ', CURN=' + thisPortCCY + ')','TR.PortfolioWeight')

Works fine in eikon.get_data()

Simply ignores CF_CURR (or CURRENCY) in refinitiv.data

Found no other alternative in DIB

Any clue anybody?

Cheers

Alfred

screenshot-2023-08-02-104240.png


eikon-data-apirefinitiv-dataplatform-eikon#product#contentrefinitiv-dataplatform-libraries
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
Accepted
80k 257 52 75

@the.swiss

Thank you for reaching out to us.

You can enable logging in the RD library to verify the behavior by using the following code.

import refinitiv.data as rd
rd.get_config()["logs.level"] = "debug"
rd.get_config()["logs.transports.file.enabled"] = True
rd.get_config()["logs.transports.file.name"] = "refinitiv-data-lib.log"
rd.open_session()

The RD.get_data method sends a request to the http://localhost:9060/api/udf endpoint to get the data for TR.xxx fields but it sends a request to ws://localhost:9060/api/rdp/streaming/pricing/v1/WebSocket to get the data for CF_CURR.

You may not have permission to access those items via WebSocket. 1691038115533.png

The RD library log shows the following error. I don't have permission to access this item.

[2023-08-03T11:46:52.925311+07:00] - [sessions.desktop.workspace.0] - [DEBUG] - [63312 - Msg-Proc-ThreadOMMSTREAMING_PRICING_0.0] - [_universe_streams] - [_on_stream_complete] - [MixedStreams id=6 universe=['GE.N']] on_complete ({'ID': 11, 'Type': 'Status', 'Key': {'Service': 'IDN_FD3', 'Name': 'GE.N'}, 'State': {'Stream': 'Closed', 'Data': 'Suspect', 'Code': 'NotEntitled', 'Text': 'Access Denied: User req to PE(62)'}},)

However, the ek.get_data method sends a request to the http://localhost:9060/api/udf endpoint to get the data for both TR.xxx fields and real-time fields (CF_CURR).

With the RD library, you can use this TR.PriceClose.Currency instead, as mentioned in this discussion.

1691039216456.png



1691038115533.png (21.3 KiB)
1691039216456.png (14.4 KiB)
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
3 0 1 4

great, thanks, that works!

Now ... had I found TR.PriceClose.Currency in DIB ... or what am i doing wrong there?

On that matter, is it possible to request from two endpoints simultaneously?

I really, really don't want to engage in a trial an error hunt for the correct data reference as DIB doesn't seem to find what i need.

Cheers

Alfred


1691046477084.png

1691046534473.png



1691046477084.png (36.6 KiB)
1691046534473.png (38.3 KiB)
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
80k 257 52 75

@the.swiss

It is a sub-field of TR.PriceClose.

1691047722130.png

1691047748307.png



1691047722130.png (120.1 KiB)
1691047748307.png (109.6 KiB)
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.

Hi Jirapongse

I am struggling with moving everything from Eikon to refinitiv.data.
RD seems very temperamental (lots of arbitrary time outs) and I cannot seem to find adequate documentation.

Most annoying, and maybe you can give me some pointers, is the rd.get_history call.

Questions:

Is there still a data limit of 10,000 datapoints?

How can i catch and log errors like in environments (i.e. except rd.errors.RDError as e:)

Here are my two calls, old and new.

dfTimeSeriesCoreChunk = ek.get_timeseries(list(theseRICSchunk), start_date=str(thisStartDate), end_date=str(tsClosingDate), interval='daily', fields = fieldsToReturnEK)
dfTimeSeriesCoreChunk = rd.get_history(universe=list(theseRICSchunk),fields=fieldsToReturnRD, interval='daily', start=str(thisStartDate), end=str(tsClosingDate) )

Any pointers would be greatly appreciated ... i am not doing this for a living, i actually want to get my analysis of the ground

;-)

Cheers

Alfred

Upvotes
3 0 1 4

Now i know!

Thx a million!

Think I am getting there. Wrestling with data from funds. Guess that needs its own loop.

Thx again

Alfred

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.