Unable to download data via DSS REST API

sumit
sumit Explorer

I am using the DSS UI and have successfully able to download the data as showndss-2.jpg


However, when I try to get this data via the REST API, I get the errordss-3.jpg

I have generated my token successfully as shown below.


Please can you help?

Regards

Sumit

Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @sumit

    The request structure is invalid.

    1711363351580.png

    The correct one should be:

    {
        "ExtractionRequest": {
            "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.PriceHistoryExtractionRequest",
            "ContentFieldNames": [
                "RIC",
                "Modified Duration",
                "Duration",
                "Trade Date"
            ],
            "IdentifierList": {
                "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
                "InstrumentIdentifiers": [
                    {
                        "Identifier": "TYc1=CTD",
                        "IdentifierType": "Ric"
                    }
                ],
                "ValidationOptions": {
                    "AllowOpenAccessInstruments": true
                }
            },
            "Condition": {
                "QueryStartDate": "2023-05-24T00:00:00.000Z",
                "QueryEndDate": "2024-01-31T00:00:00.000Z"
            }
        }
    }

    The "Conversion Factor" field is not in the PriceHistoryExtractionRequest report template.

Answers