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 4 8 7

How do I get whether a day is a trading day from the Eikon Api?

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-api
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.

Hello @yuyang

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

If yes, please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,


AHS


1 Answer

· Write an Answer
Upvote
Accepted
9.6k 10 7 7

Hello @yuyang

From my finding, one possible way is from the answer of this question, you can use Timeseries / Date functionality available in pandas data frame. This example adds a column to the data frame containing dates adjusted to weekdays:

df = ek.get_timeseries('PTT.BK','CLOSE',interval='daily',start_date='2020-05-01') 

from pandas.tseries.offsets import * 

df['Trading Day'] = df.index + Day(1) - BDay(1) 

df

The example output shows trading day of PTT.BK which is a RIC in The Stock Exchange of Thailand:


tradingdays.png (16.8 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.

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.