Python API: I try to use get_data fuction to retrieve data,but this time there are some errors when

I run this script as usual, but procedure runs error .While I use CodeBook to run this script,I get the right result .
df, err = ek.get_data(
instruments = ['1YMM1'],
fields = [
'TR.CLOSEPRICE',
'TR.ACCUMULATEDVOLUME',
'TR.BLOCKTRADEVOLUME',
'TR.UPPERTRADINGLIMIT',
'TR.LOWERTRADINGLIMIT',
'TR.HIGHPRICE',
'TR.LOWPRICE',
'TR.OPENPRICE',
'TR.TURNOVER',
'TR.SETTLEMENTPRICE',
'TR.OPENINTEREST',
'TR.OPENINTEREST.date'
],
parameters={'Frq': 'D', 'SDate': '2021-03-29', 'EDate': '2021-04-01'}
)


Best Answer

  • Jirapongse
    Jirapongse admin
    Answer ✓

    @caoruanmin

    The code can be run properly in my environment.

    image

    Please share the error message so we can verify the problem.

Answers

  • @caoruanmin

    I'm afraid it's practically impossible to comment on the issue you experienced without any details of the error. Would you care to describe the symptoms of the issue in detail?