For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
11 4 1 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-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
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 5.0 MiB each and 10.0 MiB total.

1 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 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea