Good afternoon!
I need to download historical values of Central Bank of Russia key rate from 2014 till today with Eikon Data API in Python. How can I do this?
I have found three rics for this key rate:
- RUKEYRATE=CBRF
- RUCBIR=ECI
- RUCBIR=ECIX
I decided to use the first, because I can not find any fields for the other two in Data Item Browser.
My code in Python:
today_str = datetime.strftime(datetime.today(), format="%Y-%m-%d") keyRate, err = ek.get_data(instruments=['RUKEYRATE=CBRF'], fields={'CF_CLOSE':{'SDate':'2014-01-01', 'EDate':today_str}}) keyRate
When I use 'CF_CLOSE' in fields parameter, NaN is returned; 'CF_LAST' returns only last value of the key rate, and I need historical time series.
Any help is appreciated.
@Alex Putkov. would be great if you could give some advice.