DataScope Select - REST API

Close Menu
Expand All Collapse All
Introductory Tutorials Tutorials Introduction Programming without SDK Tutorial REST API Tutorials REST API Tutorials Introduction REST API Tutorial 1: Connecting to the DSS server REST API Tutorial 2: On Demand End of Day Extraction REST API Tutorial 3: On Demand intraday extraction, embargo REST API Tutorial 4: On Demand price history extraction REST API Tutorial 5: On Demand corporate actions extraction REST API Tutorial 6: On Demand ownership data extraction REST API Tutorial 7: On Demand T&C extraction REST API Tutorial 8: On Demand composite extraction REST API Tutorial 9: On Demand extraction: instrument list REST API Tutorial 10: GUI control calls: immediate extract REST API Tutorial 11: Search by Instrument REST API Tutorial 12: Search for an Equity REST API Tutorial 13: Search for a Future or Option REST API Tutorial 14: On Demand price history extraction raw .Net SDK Tutorials .Net SDK Tutorial 1: Connecting to the DSS server .Net SDK Tutorial 2: GUI control calls: List, report, sched .Net SDK Tutorial 3: GUI control calls: Validate, extraction .Net SDK Tutorial 4: GUI control calls: Embargo, note files .Net SDK Tutorial 5: On Demand: EoD extraction .Net SDK Tutorial 6: On Demand: EoD extraction, file I/O .Net SDK Tutorial 7: On Demand: large instrument lists .Net SDK Tutorial 8: On Demand: Terms & Conditions .Net SDK Tutorial 9: On Demand: Composite extraction .Net SDK Tutorial 10: Search by Instrument .Net SDK Tutorial 11: Search for Equity .Net SDK Tutorial 12: Search for Future or Option

REST API Tutorial 9: On Demand extraction: instrument list

Last update November 2019
Environment Any
Language Any HTTP is supported
Compilers None
Prerequisites DSS login, internet access
Source code Below

Tutorial purpose

In the previous tutorials we created an instrument list on the fly, directly in our client application.

Instrument lists can also be created and stored on the DSS server. This can be done manually using the GUI, or using the API (as described in the next tutorial).

This tutorial explains how to use a pre-existing instrument list, saved on the DSS server, instead of creating one on the fly.

To use a pre-existing instrument list we need to know its indentifier.

 

    Table of contents

     

    On Demand HTTP request: defining an instrument list on the fly

    As a recap of the previous tutorials, here is how we defined an instrument list on the fly in our client application:

    Body:

    {
      "ExtractionRequest": {
        ...
        "IdentifierList": {
          "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
          "InstrumentIdentifiers": [
            { "Identifier": "438516AC0", "IdentifierType": "Cusip" },
            { "Identifier": "IBM.N", "IdentifierType": "Ric" }
          ]
        }
        ...
      }
    }

    Note the data type which is InstrumentIdentifierList and contains InstrumentIdentifiers.

     

    Finding the identifier of a pre-existing instrument list, stored on the DSS server

    An instrument list can also be stored on the DSS server. It can either be created using the API (the next tutorial explains how to do this), or manually in the DSS web GUI.

    If it was created uisng the API, the instrument list identifier was returned in the response.

    If it was created manually, and you know the instrument list name, it is possible to query the API to retrieve the instrument list identifier:

    URL:

    The instrument list name ('MyInstrumentList') is passed as a parameter inside the URL:

    https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/InstrumentListGetByName(ListName='MyInstrumentList')

    Method:          GET

    Headers:

    Prefer: respond-async
    Authorization: Token F0ABE9A3FFF2E02E10AE2765ED872C59B8CC3B40EBB61B30E295E71DE31C254B8648DB9434C2DF9299FDC668AA123501F322D99D45C8B93438063C912BC936C7B87062B0CF812138863F5D836A7B31A32DCA67EF07B3B50B2FC4978DF6F76784FDF35FCB523A8430DA93613BC5730CDC310D4D241718F9FC3F2E55465A24957CC287BDEC79046B31AD642606275AEAD76318CB221BD843348E1483670DA13968D8A242AAFCF9E13E23240C905AE46DED9EDCA9BB316B4C5C767B18DB2EA7ADD100817ADF059D01394BC6375BECAF6138C25DBA57577F0061

    Response body:

    {
        "@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#InstrumentLists/$entity",
        "ListId": "0x0563b417673b5841",
        "Name": "MyInstrumentList",
        "Count": 3,
        "Created": "2016-08-26T16:08:53.946Z",
        "Modified": "2016-08-26T16:10:06.946Z"
    }

     

    The ID can also be found in the DSS web GUI. When displaying the Instrument Lists, left click on the instrument list you want, and look at the URL in the browser header. The identifier is the last part of the URL, after the # character:

     

    On Demand HTTP request: using a pre-existing instrument list identifier

    This is how we refer to a pre-existing instrument list, saved on the DSS server, by referring to its ID:

    Body:

    Note the data type is now InstrumentListIdentifierList and contains InstrumentListId

    {
      "ExtractionRequest": {
        ...
        "IdentifierList": {
          "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentListIdentifierList",
            "InstrumentListId":"0x0563b417673b5841"
        }
        ...
      }
    }

    The other parts of the On Demand request do not change compared to what was shown in the previous tutorials.

    Caution: do not modify or delete the instrument list until all extractions referencing it are complete !

    Tutorial Group: 
    REST API Tutorials