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 emily123456 · Mar 05, 2020 at 04:54 PM · apirapi requestsrefinitivspot price

How can I pull historical spot prices for soybeans?

I am trying to get historical spot prices for soybeans using this code in R:

get_timeseries(list("0#SOYBWCAADR:"),
         list("*"),
         "2020-01-01T15:04:05",
         "2020-01-10T15:04:05")

I cannot get it to work, and I also can't seem to find the historical prices anywhere in the desktop terminal either. I know my API key is set up properly because I can pull historical data from "MSFT.O" by doing.

get_timeseries(list("MSFT.O:"),
         list("*"),
         "2020-01-01T15:04:05",
         "2020-01-10T15:04:05")

Thanks.

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.

1 Reply

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by chavalit.jintamalit · Mar 05, 2020 at 07:20 PM

Hi @emily123456

Your API call is not correct, please refer to the document at https://docs-developers.refinitiv.com/1583434790598/14684/book/en/eikon/index.html#get_timeseries


For MSFT.O, the call should be:

df = ek.get_timeseries("MSFT.O",
                       fields='*',
                       start_date = "2020-01-01T15:04:05",
                       end_date = "2020-01-10T15:04:05")
print(df)


For 0#SOYBWCAADR: , this is a chain RIC, so you should expand it to get a full RIC list first.

Then use the RIC list in the get_timeseries API call.

df,e = ek.get_data('0#SOYBWCAADR:','DSPLY_NAME')
ric_list = df['Instrument'].tolist()

df2 = ek.get_timeseries(ric_list,
                        fields='*',
                       start_date = "2020-01-01T15:04:05",
                       end_date = "2020-01-10T15:04:05")
df2

Eikon Data API(Python) only allows you to access to "default" view of the data.

So it is not possible to retrieve the data from other views.


Here is the data retrieved from Eikon Excel (Using "LAST_QUOTE" view)


If you need to retrieve data from "LAST_QUOTE" view, I suggest you to use Eikon Data API .NET

Please see document at https://developers.refinitiv.com/eikon-apis/net-apis-use-custom-applications/learning?content=8724&type=learning_material_item


ahs.png (56.9 KiB)
ahs1.png (30.6 KiB)
Comment

People who like this

0 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
REFINITIV
chavalit.jintamalit ♦♦ · Mar 05, 2020 at 07:26 PM 0
Share

Here is the sample code for Eikon Data API .NET

ahs1.png (99.8 KiB)

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

R compatibility with eikon api

R package available for Eikon?

announcement: updated version of eikonapir R package

NAICS industry with TR.BGS.BusExternalRevenue

The disappearance of monthly data.

  • 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