Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • DSS /

For a deeper look into our DataScope Select REST API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

avatar image
Question by lhougaard1 · Dec 12, 2020 at 12:37 PM · pythonelektron-sdkdss-rest-apidatascope-selectdsshistoricalbonds

historical bond prices via DSS Python (REST) API

I want to extract historical bond prices (clean, and dirty), yields and bpv for US treasury bonds, (example RIC='9128286H8=') via the DSS Python API - using the Elektron Time Series template:

"https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/GetValidContentFieldTypes(ReportTemplateType=ThomsonReuters.Dss.Api.Extractions.ReportTemplates.ReportTemplateTypes'ElektronTimeseries')

I have browsed through the different fields, and tried: "Ask", "Bid", "Universal Ask", "Universal Bid", "Yield", "Close Yield", "Last". But all these fields returns None.

Question 1: Is it possible to extract historical bond prices (clean, and dirty), yields and bpv for US treasury bonds via DSS Python API?

Question 2: If yes, which fields do I need to request?

Question 3:If no, can I use another DSS template to obtain these data?

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 zoya faberov · Dec 14, 2020 at 05:51 PM

Hello @lhougaard1,

I have tested ElektronTimeSeries via on-demand request via Postman (quickest to test, but should yield exact same result in Python):

{
   "ExtractionRequest": {
    "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.ElektronTimeseriesExtractionRequest",
    "ContentFieldNames": [ "RIC", "Ask", "Bid", "Trade Date" ],
    "IdentifierList": {
      "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList", 
      "InstrumentIdentifiers": [
        { "Identifier": "9128286H8=", "IdentifierType": "Ric" }
      ]
    },
   "Condition": {
            "ReportDateRangeType": "Range",
            "QueryStartDate": "2020-10-01T00:00:00.000Z",
            "QueryEndDate": "2020-12-02T00:00:00.000Z"
        }
  }
}

My response contained valid data points:

...
{
    "@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.ExtractionResult",
    "Contents": [
        {
            "IdentifierType": "Ric",
            "Identifier": "9128286H8=",
            "RIC": "9128286H8=",
            "Ask": 103.26953125,
            "Bid": 103.24609375,
            "Trade Date": "2020-10-01"
        },
        {
            "IdentifierType": "Ric",
            "Identifier": "9128286H8=",
            "RIC": "9128286H8=",
            "Ask": 103.24609375,
            "Bid": 103.22265625,
            "Trade Date": "2020-10-02"
        },
...

Yes, using Python you should get the exact same result, if your user id is permissioned to request this template. Please try the above on-demand request, you can download RTH Python Code Examples and replace the request in OnDemand example with this request or your required request.

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

Related Questions

DSS REST API-Python code examples

Wrong timestamp (LocalExchangeTime) in Intraday Summaries Extraction Request

Client having issue with DSS Intraday extraction on API Visual Studio (case 09572330)

Historical Price Template, not returning data

DSS REST API: Extract RICs for Chain RIC list via Python API

  • 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