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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
5 4 3 3

Error with parameters in get_data

I was trying to use the following code:

temp = eikon.get_data('BATS.L', ['TR.TURNOVER.Date','TR.TURNOVER'], parameters={'SDate': '2017-06-25', 'EDate': '2017-0 9-25'})

but I am getting following error message:

TypeError: 'builtin_function_or_method' object does not support item assignment

~\eikon-1.0.0b2-py3.6.egg\eikon\data_grid.py

if parameters: payload.update['parameters'] = parameters

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
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

Upvotes
Accepted
4.3k 2 4 5

The version you're using is an Alpha. You should update your eikon lib with the latest 0.1.9 Beta version. You can retrieve it from https://pypi.python.org/pypi/eikon.

Then, parameter EDate has wrong value : '2017-0 9-25' => space character cause Bad Request error. Could you test again with this request :

>>> temp = ek.get_data('BATS.L', ['TR.TURNOVER.Date','TR.TURNOVER'], parameters={'SDate': '2017-06-25', 'EDate': '2017-09-25'})
>>> temp
(   Instrument                  Date     Turnover
0      BATS.L  2017-06-26T00:00:00Z   134.927570
1      BATS.L  2017-06-27T00:00:00Z   174.867660
2      BATS.L  2017-06-28T00:00:00Z   162.414590
3      BATS.L  2017-06-29T00:00:00Z   191.567790
..        ...                   ...          ...
61     BATS.L  2017-09-20T00:00:00Z   119.052108
62     BATS.L  2017-09-21T00:00:00Z   185.998271
63     BATS.L  2017-09-22T00:00:00Z   141.654754
64     BATS.L  2017-09-25T00:00:00Z   170.441317
[65 rows x 3 columns], None
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