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

China futures closing price

I am looking at this product 'CZCK9', which is Chinese thermal coal futures MAY19 contract on Zhengzhou Commodities Exchange. My question is:

How could I get the closing price for the last 3 days using Python API?

For example, for 18th Jan, closing prices was 591.60 (correct price). However, Eikon Python API returned the settlement price, which was 589.60 (wrong price).

Screenshot is attached and exchange's official published number is here: http://english.czce.com.cn/enportal/DFSStaticFiles/Future/2019/20190118/EnglishFutureDataDailyZC.htm

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-api
zce.png (46.5 KiB)
zce.png (46.5 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.

1 Answer

· Write an Answer
Upvote
Accepted
3.8k 4 4 6

@chong.xu

You can use the below code do get the historical future's close prices

df, err = ek.get_data(['CZCK9'], 
                      ['TR.ClosePrice.date','TR.ClosePrice'],
                      {'SDate': 0, 'EDate': -5, 'Frq':'D' })
df
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.