DSS API HTTP request sample of "Single Price History"

Can anyone advice me to find DSS API HTTP request sample of Single Price History?

Best Answer

  • Christiaan Meihsl
    Answer ✓

    @Zuka1,

    As an alternative method, you can use the REST API Reference Tree:

    In the left menu, go to Extractions - On Demand Extractions

    Select the type of extraction request you want (screenshot 1: red box 1).

    Select how you want to specify the Identifier list (screenshot 1: red box 2).

    Then set all the other parameters you want.

    image

    Finally, click on tab JSON Model to see the request body (screenshot 2).

    image

Answers

  • @Zuka1,

    You can easily find this using the C# example application, described in the DSS Quick Start.

    Run the example, open section "On Demand Extrractions" in the left menu, scroll down to "Create: Single Price History" and run it. Then click on step 1b and on "HTTP" in the bottom right window you will see the HTTP code, which includes the method and URI:

    POST https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/ExtractWithNotes

    The headers:

    Authorization: Token <your_auth_token_goes_here>
    Prefer: respond-async
    Content-Type: application/json; odata=minimalmetadata

    And the body:

    {
    "ExtractionRequest": {
    "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.SinglePriceHistoryExtractionRequest",
    "ContentFieldNames": [
    "Ask High",
    "Ask Low",
    "Bid High",
    "Bid Low",
    "Trade Date"
    ],
    "IdentifierList": {
    "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
    "InstrumentIdentifiers": [
    {
    "Identifier": "TRI.N",
    "IdentifierType": "Ric"
    }
    ],
    "ValidationOptions": null,
    "UseUserPreferencesForValidationOptions": false
    },
    "Condition": {
    "EndDate": "2019-08-28T09:26:04.439Z",
    "Lookback": "FourMonths",
    "AdjustedPrices": false,
    "LastEntityOnly": false
    }
    }
    }

    The response is further down.

    image