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 0

Ask.close historical at specific time 17:30 for FVSc1

Hi team, please confirm the script to use on Python API to get historical ask data for only at 17:30 everyday for <FVSc1>?

I tried:


import refinitiv.data.eikon as ek

ek.set_app_key('DEFAULT_CODE_BOOK_APP_KEY')

df = ek.get_timeseries('FVSc1', 'ASK.Close', interval='minute')

df1 = df.iloc[lambda df: df.index.minute == 1730,:]

df1


But not getting results.

Please advise.

eikon-data-apipython#technology#contenttime-series
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.

Upvote
Accepted
14k 30 5 10

Hi @jen.neverida01 ,

Is this what you're looking for?

import refinitiv.data.eikon as ek
import datetime

ek.set_app_key('DEFAULT_CODE_BOOK_APP_KEY')

df = ek.get_timeseries('FVSc1', 'CLOSE', interval='minute')

df1 = df.iloc[df.index.time == datetime.time(17, 30)]
df1

1671162640161.png

field 'ASK.Close' isn't available in the get_timeseries call, to see available fields, the command below can be used

help(ek.get_timeseries)

1671162891276.png

Hope this helps and please let me know in case you have any further questions


1671162640161.png (51.6 KiB)
1671162891276.png (7.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.

Upvotes
20 0 1 4

Hello, I need to get data between 14:30 to 16:30 GMT Daily.

This works:

df1 = df.iloc[df.index.time >= datetime.time(14, 30)]


But this one does not:

df1 = df.iloc[df.index.time >= datetime.time(14, 30), df.index.time <= datetime.time(16, 30)]


Please advise. Thank you.


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
14k 30 5 10

Hi @dianne.palmario ,

You can use the below code

df1 = df.iloc[(df.index.time >= datetime.time(14, 30))&(df.index.time <= datetime.time(16, 30)]


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.