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

image

Best Answer

  • @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