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
0
Best Answer
-
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], None0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛