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 dshi · Feb 08 at 08:21 AM · pythonpython apidatastream apidatastream python

Datastream API Datatypes

Hi,

I'm trying to pull data via the python Datastream api as a replacement for the excel plugin. In excel, there is an option to specify datatype and different datatypes change the time series output entirely. I was wondering how I might do that via the python api?

An example for time series TOTMKCN on 2020 Q2 and Q3 data is in the attached photos.

Datatype DWNP:

Datatype DWSE:


Thanks,

capture2.png (1.2 KiB)
capture3.png (1.6 KiB)

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 Alex Putkov. · Feb 08 at 04:30 PM

Assuming you're using DatastreamDSWS library, you can utilize the same mnemonics and datatypes you use in =DSGRID worksheet function in Excel, e.g.

ds.get_data ('TOTMKCN',['DWNP', 'DWSE'], start='-1Y', freq='Q')

Does this answer your question?

Comment
dshi

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
dshi · Feb 09 at 01:07 PM 0
Share

Thanks Alex. Helpful as always!
Just wanted to add the parameter names here as well in case anyone else is wondering.

ds = DSWS.Datastream(username=DSWS_login, password=DSWS_pswd)
df = ds.get_data(tickers="TOTMKCN", fields=['DWNP', 'DWSE'], start=start_date.strftime("%Y-%m-%d"), freq='M')

where start_date is a datetime object.


Thanks again!

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

My API access was suspended. When can I get it back?

How will I be able to solve this?

Retrieving vintage matrix works for certain mnemonics but not others?

Error causing instument

Invalid Token DatastreamDSWS

  • 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