Unable to download data via DSS REST API

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
    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

  • @sumit

    Thank you for reaching out to us.

    You may need to set the "AllowHistoricalInstruments" to true, as shown below.

    1711338475911.png


  • Thanks. That made it to work. How can I extract a historical end of day time-series data for the above Ric?


    Thanks,

  • Here's my query....

    {
    "ExtractionRequest": {
    "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.PriceHistoryExtractionRequest",
    "ContentFieldNames": [
    "RIC",
    "Modified Duration",
    "Duration",
    "Conversion Factor",
    "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"
    }
    }
    }
    }
    And the error I get: { "error": { "message": "Malformed request payload: For the property name \"QueryStartDate\" in the JSON request the value could not be parsed successfully. Please check the casing or spelling of the property." } }
  • Thanks. that works!!! However, I see all `nulls`.

    Also, just to confirm, is Modified duration for a futures Ctd the same as BPV that we get from , say Eikon or LSEG workspace?

     {
    "IdentifierType": "Ric",
    "Identifier": "TYc1=CTD",
    "RIC": "TYc1=CTD",
    "Modified Duration": null,
    "Duration": null,
    "Trade Date": "2024-01-03"
    },
    {
    "IdentifierType": "Ric",
    "Identifier": "TYc1=CTD",
    "RIC": "TYc1=CTD",
    "Modified Duration": null,
    "Duration": null,
    "Trade Date": "2024-01-04"
    },
  • @sumit

    For questions regarding the DSS content, please contact the Datascope Select support team directly via MyRefinitiv.