REST API Tutorial 8: On Demand composite extraction
Last update Jan 2026
Environment Any
Language Any HTTP is supported
Compilers None
Prerequisites DSS login, internet access
Source code Below

Tutorial purpose

This tutorial explains how to:

  • Retrieve the available field list from the DSS server.
  • Retrieve composite data from the DSS server, using an on demand request. Composite data includes pricing data, as well as T&C (terms and conditions) data. In this example we retrieve a few composite fields related to annualized dividends and the balance sheet (these particular ones are not available from a T&C extraction). We also cross reference instrument codes, i.e. retrieve several instrument codes (RIC; Cusip, ISIN, Sedol, etc), for a list of instruments (with different instrument codes). For each input instrument code, only 1 RIC is returned (the primary RIC).

 

Table of contents

Get available field list for composite data - HTTP request

If you do not know what field lists are available, you can request a list of those available.

The report template type must be specified in the path. As we want composite data we set a value of Composite. The preceding On Demand request tutorials show other possibilities.

Note: for all requests we need a user token. This was retrieved in Tutorial 1.

URL:               

    	
            
https://selectapi.datascope.lseg.com/RestApi/v1/Extractions/GetValidContentFieldTypes(ReportTemplateType=DataScope.Select.Api.Extractions.ReportTemplates.ReportTemplateTypes'Composite')

Method:          GET

Headers:

    	
            

Prefer: respond-async

Authorization: Token F0ABE9A3FFF2E02E10AE2765ED872C59B8CC3B40EBB61B30E295E71DE31C254B8648DB9434C2DF9299FDC668AA123501F322D99D45C8B93438063C912BC936C7B87062B0CF812138863F5D836A7B31A32DCA67EF07B3B50B2FC4978DF6F76784FDF35FCB523A8430DA93613BC5730CDC310D4D241718F9FC3F2E55465A24957CC287BDEC79046B31AD642606275AEAD76318CB221BD843348E1483670DA13968D8A242AAFCF9E13E23240C905AE46DED9EDCA9BB316B4C5C767B18DB2EA7ADD100817ADF059D01394BC6375BECAF6138C25DBA57577F0061

Get available field list for composite data - HTTP response

If the token is valid, this is the response we get:

Status:                        200 OK

Relevant headers:

    	
            
Content-Type: application/json; charset=utf-8

Body:

There are more than 2000 values in the response. Here is the beginning of the response:

    	
            

{

  "@odata.context": "https://selectapi.datascope.lseg.com/RestApi/v1/$metadata#ContentFieldTypes",

  "value": [

    {

      "Code": "CMP.13F Securities Flag",

      "Name": "13F Securities Flag",

      "Description": "Y/Null flag indicating whether this relates to an institutional investment manager with over $100 million in qualifying assets that is required to file SEC Form 13F",

      "FormatType": "Text",

      "FieldGroup": "Premium Reference,Shareholding Disclosure"

    },

    {

      "Code": "CMP.144A Registered Flag",

      "Name": "144A Registered Flag",

      "Description": "Y/N flag indicating whether the issue is registered for the 144A rule",

      "FormatType": "Text",

      "FieldGroup": " "

    },

    {

      "Code": "CMP.20 to 60 Month Beta",

      "Name": "20 to 60 Month Beta",

      "Description": "Measure of a company's common stock price volatility relative to the market. A company with less than 20 months worth of data will have no beta calculated",

      "FormatType": "Number",

      "FieldGroup": " "

    },

    {

      "Code": "CMP.3 Month High",

      "Name": "3 Month High",

      "Description": "Instrument's highest price over the last 3 months",

      "FormatType": "Number",

      "FieldGroup": " "

    },

    {

      "Code": "CMP.3 Month Low",

      "Name": "3 Month Low",

      "Description": "Instrument's lowest price over the last 3 months",

      "FormatType": "Number",

      "FieldGroup": " "

    },

This goes on with all the other available fields. Here is the last part:

    	
            

    {

      "Code": "CMP.Yield Value",

      "Name": "Yield Value",

      "Description": "Value of the yield based on the income distributions in the past 12 months, as calculated by Lipper, or yield provided by the fund manager",

      "FormatType": "Number",

      "FieldGroup": " "

    },

    {

      "Code": "CMP.Z Spread",

      "Name": "Z Spread",

      "Description": "Constant spread in basis points that will make the price equal to the present value of the cash flows when added to each relevant point of the yield curve",

      "FormatType": "Number",

      "FieldGroup": " "

    },

    {

      "Code": "CMP.ZPage",

      "Name": "ZPage",

      "Description": "Unique system-assigned four-digit alphanumeric identifier for Eurobonds",

      "FormatType": "Text",

      "FieldGroup": " "

    }

  ]

}

The result contains the field code, name, a description, field type (number, text, date) and group.  Use this to choose the field names you want. In the next step we will make a request for data, using some data fields we chose.

Get composite data - HTTP request

This is similar to previous tutorials, as it is also an On Demand extraction request.

The body of the request must mention it is an extraction request. It contains several parts:

  • The type of extraction: as we want composite data we set a value of CompositeExtractionRequest.
    Preceding On Demand extraction tutorials show other possibilities.
  • The list of field names: these were determined in the first step of this tutorial.
  • The list of instrument identifiers, each one with its type.
    Below we define several instruments, using different identifier types.
  • For this request we do not set any conditions.

Note: for all requests we need to include a user token in the header of our request. This was retrieved in Tutorial 1.

​URL:   

    	
            
https://selectapi.datascope.lseg.com/RestApi/v1/Extractions/ExtractWithNotes

Method:          POST

Headers:

    	
            

Prefer: respond-async

Content-Type: application/json

Authorization: Token F0ABE9A3FFF2E02E10AE2765ED872C59B8CC3B40EBB61B30E295E71DE31C254B8648DB9434C2DF9299FDC668AA123501F322D99D45C8B93438063C912BC936C7B87062B0CF812138863F5D836A7B31A32DCA67EF07B3B50B2FC4978DF6F76784FDF35FCB523A8430DA93613BC5730CDC310D4D241718F9FC3F2E55465A24957CC287BDEC79046B31AD642606275AEAD76318CB221BD843348E1483670DA13968D8A242AAFCF9E13E23240C905AE46DED9EDCA9BB316B4C5C767B18DB2EA7ADD100817ADF059D01394BC6375BECAF6138C25DBA57577F0061

Body:

    	
            

{

    "ExtractionRequest": {

        "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.CompositeExtractionRequest",

        "ContentFieldNames": [

           "RIC", "CUSIP", "ISIN", "SEDOL", "Issuer OrgID", "Currency Code",

           "Annualized Dividend Period Start Date", "Annualized Dividend Adjusted Gross Amount",

           "Balance Sheet - Enterprise Value", "Balance Sheet - Market Value"

        ],

        "IdentifierList": {

            "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",

            "InstrumentIdentifiers": [

                { "Identifier": "00209tab1", "IdentifierType": "Cusip" },

                { "Identifier": "IBM.N", "IdentifierType": "Ric" },

                { "Identifier": "US4592001014", "IdentifierType": "Isin" },

                { "Identifier": "B1YW440", "IdentifierType": "Sedol" }

            ]

        }

    }

}

Get composite data - HTTP response

This is the response we get:

Status:                        200 OK

Relevant headers:

    	
            
Content-Type: application/json; charset=utf-8

Body:

    	
            

{

    "@odata.context": "https://selectapi.datascope.lseg.com/RestApi/v1/$metadata#DataScope.Select.Api.Extractions.ExtractionRequests.ExtractionResult",

    "Contents": [

        {

            "IdentifierType": "Cusip",

            "Identifier": "00209TAB1",

            "RIC": "00209TAB1=RRPS",

            "CUSIP": "00209TAB1",

            "ISIN": "US00209TAB17",

            "SEDOL": "B7SDDX3",

            "Issuer OrgID": "115149232",

            "Currency Code": "USD",

            "Annualized Dividend Period Start Date": null,

            "Annualized Dividend Adjusted Gross Amount": null,

            "Balance Sheet - Enterprise Value": null,

            "Balance Sheet - Market Value": null

        },

        {

            "IdentifierType": "Ric",

            "Identifier": "IBM.N",

            "RIC": "IBM.N",

            "CUSIP": "459200101",

            "ISIN": "US4592001014",

            "SEDOL": "2005973",

            "Issuer OrgID": "18228",

            "Currency Code": "USD",

            "Annualized Dividend Period Start Date": "2022-06-10",

            "Annualized Dividend Adjusted Gross Amount": 6.6,

            "Balance Sheet - Enterprise Value": 160471580826,

            "Balance Sheet - Market Value": 125264300000

        },

        {

            "IdentifierType": "Isin",

            "Identifier": "US4592001014",

            "RIC": "IBM.N",

            "CUSIP": "459200101",

            "ISIN": "US4592001014",

            "SEDOL": "2005973",

            "Issuer OrgID": "18228",

            "Currency Code": "USD",

            "Annualized Dividend Period Start Date": "2022-06-10",

            "Annualized Dividend Adjusted Gross Amount": 6.6,

            "Balance Sheet - Enterprise Value": 160471580826,

            "Balance Sheet - Market Value": 125264300000

        },

        {

            "IdentifierType": "Sedol",

            "Identifier": "B1YW440",

            "RIC": "LP71000002",

            "CUSIP": null,

            "ISIN": "GB00B1YW4409",

            "SEDOL": "B1YW440",

            "Issuer OrgID": "100691344",

            "Currency Code": "GBp",

            "Annualized Dividend Period Start Date": null,

            "Annualized Dividend Adjusted Gross Amount": null,

            "Balance Sheet - Enterprise Value": null,

            "Balance Sheet - Market Value": null

        }

    ],

    "Notes": [

        "Extraction Services Version 16.0.43633 (806c08a4ae8f), Built May  9 2022 17:21:13\r\nHoliday Rollover of Universal Close Price waived.\r\nProcessing started at 05/30/2022 08:54:55.\r\nUser ID: 9008895\r\nExtraction ID: 592936118\r\nCorrelation ID: CiD/9008895/AAAAAA.0808265c632df06c/RA/EXT.592936118\r\nSchedule: _OnD_0x0808265c633df06c (ID = 0x0808265c66fdf06c)\r\nInput List (4 items): _OnD_0x0808265c633df06c (ID = 0808265c636df06c) Created: 05/30/2022 08:54:47 Last Modified: 05/30/2022 08:54:47\r\nSchedule Time: 05/30/2022 08:54:47\r\nReport Template (16 fields): _OnD_0x0808265c633df06c (ID = 0x0808265c634df06c) Created: 05/30/2022 08:54:47 Last Modified: 05/30/2022 08:54:47\r\nProcessing completed successfully at 05/30/2022 08:54:56, taking 1.83 Secs.\r\nExtraction finished at 05/30/2022 07:54:56 UTC, with servers: x04A05, DSWS (1.1 secs), QSDHA1 (0.0 secs), QSHC12 (0.2 secs)\r\nUsage Summary for User 9008895, Client 65508, Template Type Composite\r\nBase Usage\r\n        Instrument                          Instrument                   Terms          Price\r\n  Count Type                                Subtype                      Source         Source\r\n------- ----------------------------------- ---------------------------- -------------- ----------------------------------------\r\n      1 Corporate                           Investment Grade             N/A            N/A\r\n      2 Equities                                                         N/A            N/A\r\n      1 Mutual Funds                                                     Lipper         N/A\r\n-------\r\n      4 Total instruments charged.\r\n      0 Instruments with no reported data.\r\n=======\r\n      4 Instruments in the input list.\r\nNo Evaluated Pricing Service complex usage to report -- 4 Instruments in the input list had no reported data.\r\nWriting RIC maintenance report.\r\n",

        "Identifier,IdentType,Source,RIC,RecordDate,MaintType,OldValue,NewValue,Factor,FactorType\r\n"

    ]

}

Depending on the type of instrument and available data, some fields might return null values, this is normal.