For a deeper look into our DataScope Select REST API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
41 2 2 10

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

dss-rest-api#producttick-history-rest-apihistoricaltime-seriestick-dataexpired-contract
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Upvotes
Accepted
14.2k 30 5 10

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


1696491346776.png (73.3 KiB)
1696491426266.png (88.4 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.