Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Datastream /
avatar image
Question by tom.oddo · Nov 02, 2020 at 09:20 AM · pythondatastream-apidsws-apitime-series

Get Open net return prices

My code is this:

ds.get_data('DJES50I',['NR'], start = '2000-01-01', end = '2020-07-31')


and I just want to know how do I have to fill in the "Open" statement to make it work?

I`ve seen the other article, but that is way too much unnecessary code for me..


so is there an easy solution?

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.

5 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by jonathan.legrand · Nov 02, 2020 at 02:01 PM

Hi @tom.oddo,

If you are particularly looking for historical 'NR' ('Net Return') daily data, you may use the following:


ds.get_data(tickers = 'DJES50I', fields = ['NR'], start = '2000-01-01', end = '2020-07-31', freq = 'D')


I tested it myself and it returns data as expected. I also verified the data returned by Datastream with our Refinitiv Workspace and can confirm that using 'fields = ['PO']' correctly returns Open Prices - i.e.: the EURO STOXX 50 index at the opening of the market.

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
REFINITIV
Answer by umer.nalla · Nov 02, 2020 at 10:02 AM

Hi @tom.oddo

I am not sure what the "Open" statement refers (if you can elaborate that would be great).

However, I am going to guess from the ds prefix that you are trying to use DataStreamDSWS library

If so, the following works for me when I use my own Datastream username and password

import DatastreamDSWS as DSWS
ds = DSWS.Datastream(username ="myusername", password="mypassword")
ds.get_data('DJES50I',['NR'], start = '2000-01-01', end = '2020-07-31'

if you are not using DatastreamDSWS then please state which library ds refers to.

Or if the above does not answer your question please expand on what you mean with (incomplete) code snippets if appropriate.


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 tom.oddo · Nov 02, 2020 at 10:50 AM

Hi,

yes thats right.

With "Open" I want the value of the stoxx 50 index at the opening of the market.

(I think the price I get is the close price)


Thanks in advance

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
REFINITIV
Answer by jonathan.legrand · Nov 02, 2020 at 11:46 AM

Hi @tom.oddo

You may find information on our DatastreamDSWS Python API's fields in several ways, either via the 'help' function:


Via the 'Getting started with Python' found in our Refinitiv Developer Portal's Datastream Web Service's Documentation page, or - most probably what you are looking for :


Via 'product.datastream.com' (where you will need to log in with your Datasream credentials), where you may find information on DSWS data on the ticket 'DJES50I':

Once there, you may click on the 'More' option (that I pointed in red above for you) where you may find the exhaustive list of variables you may use in the 'fields' argument of 'DatastreamDSWS.get_data'.

In your case, I believe the best candidate is 'Price - Opening' with variable 'PO'; i.e.:


ds.get_data(tickers = 'DJES50I',
            fields = ['PO'],
            start = '2000-01-01',
            end = '2020-07-31',
            freq = 'D')



1604316777926.png (34.3 KiB)
1604317182590.png (197.3 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 tom.oddo · Nov 02, 2020 at 01:38 PM

Hi,


with the help function you dont see a lot.

The datastream link is good, but not what I want... I already knew PI and PO

but I want the open for NR , which doesnt seem to be available... that was the question.


Thanks

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

Related Questions

Python API: can not request equity indices timeseries in EUR currency

Get time series data for each constituent in an equity index

Time-series requests Datastream Web Service

Error message "Invalid JSON date"

Identical price data on different exchanges using datastream web service api in python

  • 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