Retrieving ticks for expired contracts using DSS API

I am trying to pull ticks for expired contracts using DSS REST API.

Extraction URL:

https://selectapi.datascope.refinitiv.com/RestApi/v1/Extractions/ExtractRaw

Payload:

{"ExtractionRequest": {
"@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.TickHistoryTimeAndSalesExtractionRequest",
"ContentFieldNames": ["Trade - Bid Price",
"Trade - Bid Size",
"Trade - Ask Price",
"Trade - Ask Size",
"Trade - Price",
"Trade - Volume"],
"IdentifierList": {
"@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
"InstrumentIdentifiers": [{"Identifier": "CLK0^2", "IdentifierType": "Ric"}]
},
"Condition": {
"MessageTimeStampIn": "GmtUtc",
"ApplyCorrectionsAndCancellations": False,
"DisplaySourceRIC": True,
"ReportDateRangeType": "Range",
"TimeRangeMode": "Inclusive",
"DateRangeTimeZone": "UTC",
"QueryStartDate": "2020-04-20T00:00:00",
"QueryEndDate": "2020-04-22T00:00:00"
}
}
}


I get this response:

Instrument <RIC,CLK0^2> expanded to 0 RICS.


Which is not true, since there was a K contract at the time. I also tried ``CLK0``, which errored with "All identifiers were invalid" (expected behavior). This happens only when extracting expired contracts, and works fine for active contracts.


Is this an issue with ``TickHistoryTimeAndSales`` report template? Since I am able to retrieve end of day prices for ``CLK0^2`` fine using ``ElektronTimeseries`` template.


Jack

Best Answer

  • raksina.samasiri
    Answer ✓

    Hi @jacktan ,

    Can you put the below in the request to allow historical instruments

    "ValidationOptions": {
    "AllowHistoricalInstruments": true
    },
    "UseUserPreferencesForValidationOptions": false

    and use CLK0 as a RIC, I've tried the request below

    {
    "ExtractionRequest": {
    "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.TickHistoryTimeAndSalesExtractionRequest",
    "ContentFieldNames": [
    "Trade - Bid Price",
    "Trade - Bid Size",
    "Trade - Ask Price",
    "Trade - Ask Size",
    "Trade - Price",
    "Trade - Volume"
    ],
    "IdentifierList": {
    "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
    "InstrumentIdentifiers": [
    {
    "Identifier": "CLK0",
    "IdentifierType": "Ric"
    }
    ],
    "ValidationOptions": {
    "AllowHistoricalInstruments": true
    },
    "UseUserPreferencesForValidationOptions": false
    },
    "Condition": {
    "MessageTimeStampIn": "GmtUtc",
    "ApplyCorrectionsAndCancellations": false,
    "DisplaySourceRIC": true,
    "ReportDateRangeType": "Range",
    "TimeRangeMode": "Inclusive",
    "DateRangeTimeZone": "UTC",
    "QueryStartDate": "2020-04-20T00:00:00",
    "QueryEndDate": "2020-04-22T00:00:00"
    }
    }
    }

    And the report is processed successfully

    1696491346776.png

    1696491426266.png