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 /

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

avatar image
Question by tta · Nov 12, 2020 at 05:38 AM · eikoneikon-data-apiworkspacepythonworkspace-data-apirefinitiv-dataplatform-eikoneikon-data-api-r

eikonapir: how to get dates returned from get_data()

Hi,

I wonder how to get dates returned from get_data() of the "philaris/eikonapir" package. I'd like to download SPY's market cap over a period. Using eikon package in Python, I can get this done easily with ek.get_data() as follows:

df, err = ek.get_data('SPY',['TR.CompanyMarketCap', 'TR.CompanymarketCap.Date'], {'SDate':'2020-01-02', {'EDate:'2020-10-31'})

However, if I use the get_data() in eikonapir package in r in the same fashion as follows,

sample_period = list('SDate'='2020-01-02', 'EDate'='2020-10-31')

fields = list(TR_Field('tr.companymarketcap', sample_period), TR_Field('tr.companymarketcap.date'))

df = eikonapir::get_data('SPY', fields)

the date column in the dataframe df returns only the last date of the sample period, instead of all the dates in the sample period.

I would highly appreciate any advice/suggestion to get all the dates returned with aikonapir::get_data()!

Thank you!


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 Jirapongse · Nov 12, 2020 at 06:54 AM

@tta

Please try this one:

data_frame2 <- get_data(list("SPY"), 
                        list("TR.CompanyMarketCap", "TR.CompanymarketCap.Date"),
                        list("Frq"="D","SDate"="2020-01-02","EDate"="2020-10-31"))
data_frame2

The output is:


1605164031410.png (16.1 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.

avatar image
Answer by tta · Nov 13, 2020 at 02:38 PM

Thank you very much. It works beautifully!

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 >
9 People are following this question.

Related Questions

Eikon R API install error

Company trees don't match in Eikon online tool and the Eikon Proxy API

How to get all investors for a list of stocks, historically with the python API

EIKON API Calls (Count)

R eikonapir - Proxy

  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Intelligent Tagging
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open Calais
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • RDMS
  • 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
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • Workspace SDK
    • Element Framework
    • Grid
  • World-Check Data File
  • 中文论坛
  • Explore
  • Tags
  • Questions
  • Badges