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
11 3 5 5

get_data() frequency and improved documentation.

I am looking to get the average bid/ask price for the last 30 days. After playing with the get_data() function, I was able to get daily requests. However, there is no documentation for changing the frequency. The best resources I could find are below (and this took about 15 minutes to find).

https://community.developers.refinitiv.com/questions/52700/get-data-specify-time-interval.html



Two things:

1. Is there documentation of the fields for each function? If not, can this please be added. It's very inefficient to search through the forum for notation that should be in the docs.

2. How do you change the interval in get_data() to hourly, tick, minute, etc.?


Thanks in advance!



eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apidocumentation
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
18.2k 21 13 21

Hi @michaelberk99


Q1. Is there documentation of the fields for each function? If not, can this please be added. It's very inefficient to search through the forum for notation that should be in the docs.


The different fields have different supported parameters.

You are correct to use "Data Item Browser" to see all the supported parameters on each field.


To pass in parameters, you can do it at field level (Copy the formula generated from Data Item Browser, see bottom right after you select any prefer parameters).

Or you can pass in the parameter which should apply to all the fields in your request.


The document for get_data() is at this url.

The document for "Data Item Browser" is at this url.


Q2. How do you change the interval in get_data() to hourly, tick, minute, etc.?

I believe that field available from "Data Item Browser" to be used with get_data() does not support "intraday" interval.



ahs.png (82.0 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 Chavalit - thanks for the response! I'm aware of the get_data() documentation and the Data Item Browser, but where is the "Frq" field documentation? The high-level function documentation is good, but no specifics provided. Here's an example of what's needed. For question 2, if this is the case, how do I get intraday bid/ask data?

The "Frq" parameter is a field-specific parameter.

Not every field supports it.

For example, TR.CompanyMarketCap support timeseries and you can use DIB to see what are the available Frq.

M = Monthly, W = Weekly, ... as you could see its document/specification within DIB


get_timeseries() support intraday interval but it also depends on the instrument as well.

And it can only retrieve "default" view of the data.

So you can test it with the instrument you have.

ahs.png (71.2 KiB)
ahs2.png (39.3 KiB)

Great thanks! Extremely helpful.

Upvotes

Are there now any functions / options to get a customized output on minutes level using the get_data function? When looking in the forum it seems that one cannot modify "get_data" such that it works for minutes level. On the othere hand the get_timeseries funtion works for minutes level but does not support Bid and Ask. I am looking for a function that returns Bid and ask on a minutes level for a given stock. Can someone help out?

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 @basilio.konstantin.kalus ,

For your information, after this, please start the new post by asking a further question as the question with an accepted answer won't be monitored by the forum's moderator so the answer might not be provided.

I would recommend you look at the newer RD Library for Python - which is currently in Beta and due for release in the coming months.

The following code is able to get Bid and Ask in a minute interval

import refinitiv.data as rd
rd.open_session()
rd.get_history(universe="LSEG.L", fields=["BID", "ASK"], interval="1min")

You may follow its example in the Codebook app on Eikon Desktop/ Refinitiv Workspace in the directory __Examples__/01. Data Retrieval & Discovery/01.01. Refinitiv Data Library/EX_01_01_02__Access__Get_History.ipynb

1655371937643.png

It will also have fuller documentation - the RD Library team advised that they are awaiting the completion of the documentation to confirm the release date.

Please let me know in case there is any further questions

1655371937643.png (169.0 KiB)

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.