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
5 0 1 2

Is it possible to replicate in python the data I see on a chart in real time in eikon? For example, EUR, be able to download the last 2 days on 1 minute data and keep getting the real time updates?

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-api
eur.jpg (80.1 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
Accepted
18.2k 21 13 21

Hi @fredy.sarmiento

First, you can use get_timeseries to get 2 days amount of 1-minute data.

Then if you still want 1-minute data, you can loop the call every 1 minute to get 1-minute data

Or if you need realtime data, you can use StreamingPrice API call to get the realtime data. Please refer to this document.


ahs.png (23.9 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.

Thanks a lot !!

Upvotes
21.8k 57 14 21

Hi @fredy.sarmiento, Replying to you in this thread, since it is more relevant to your new question. As Chavalit mentioned, you can use the get_timeseries API call to get the historical data and combine it with get_data call as described in other thread to get minute updates.

So essentially:

df = ek.get_timeseries('EUR=', fields=['CLOSE'], count=10, interval='minute')
while True:
  df2,err = ek.get_data('EUR=', ['CF_CLOSE'])
  print(df2)
  time.sleep(60)

You might want to append to the dataframe, if you need one continuous series:

df2.columns = ['Instrument', 'CLOSE']
df.append(df2)

                       CLOSE  Instrument
2020-01-21 16:04:00    1.1098        NaN
2020-01-21 16:05:00    1.1098        NaN
2020-01-21 16:06:00    1.1097        NaN
2020-01-21 16:07:00    1.1096        NaN
2020-01-21 16:08:00    1.1097        NaN
2020-01-21 16:09:00    1.1099        NaN
2020-01-21 16:10:00    1.1096        NaN
2020-01-21 16:11:00    1.1097        NaN
2020-01-21 16:12:00    1.1097        NaN
2020-01-21 16:13:00    1.1095        NaN
0                      1.1094       EUR=

There is technical analysis fields available as well (don't seem to be working for FX instruments though):

Get Moving averages:

>>> df3,err = ek.get_data('IBM.N', fields=['TR.Price200DayAverage','TR.Price50DayAverage', 'TR.MovAvgCDSignal', 'TR.PriceMoVolatilityDly'])
>>> df3
  Instrument  200-day SMA  50-day SMA  MACD - Signal  Price Momentum Daily Volatility
0      IBM.N     137.9519    134.8674       0.391135                          1.19946
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.

@Gurpreet !

Many thanks !! much appreciated it.

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.