Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Eikon Data APIs /
avatar image
Question by Peter.Winkler3 · Dec 17, 2020 at 06:47 AM · python apimatlab

Using Python API via MATLAB

I am using the Python API via MATLAB which works fine as long as I request only single fields:

py.eikon.set_app_key('*****');

instruments = ['LCO5000B1'];

fields= 'CF_CLOSE'; % OR fields= 'CF_CURR';

df= py.eikon.get_data(instruments,fields);

I am now struggling to get data for both fields (CF_CLOSE and CF_CURR) in a single call of get_data. What would be the correct syntax for that?

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

2 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by Alex Putkov. · Dec 17, 2020 at 02:50 PM

@Peter.Winkler3

Use py.list method of Matlab to create a Python list of fields or instruments, which can then be passed to Eikon Data APIs library for Python:

instruments = py.list({'LCO5000B1','LCO5000B2','LCO5000B3'});
fields = py.list({'CF_CLOSE','CF_CURR'});
res = py.eikon.get_data(instruments, fields);
display(res);
Comment
Peter.Winkler3

People who like this

1 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
Peter.Winkler3 · Dec 17, 2020 at 03:21 PM 0
Share
Thank you very much, @Alex Putkov.! It works perfectly this way!
avatar image
REFINITIV
Answer by chavalit.jintamalit · Dec 17, 2020 at 08:20 AM

Hi @Peter.Winkler3

I cannot answer you on the MATLAB.

I can give you the Python example.


ahs.png (14.0 KiB)
Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
11 People are following this question.

Related Questions

missing data in ek.get_timeseries request

Generating an Eikon Python API

Why is get_timeseries much slower than get_data?

Eikon Python API Query - How do you get the list of ASX listed stocks which have Company Guidance issued for Fiscal Year 2020?

Why do TR.CurrEVEBITDALFY and TR.HistEnterpriseValueEBITDA differ?

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges