question

Upvotes
Accepted
89 2 6 9

The history download is broken

in result of execution this code resultsize=null; What is problem?

Why such a problem?

dynamic lastDate = new DateTimeOffset(2021, 09, 10, 0, 0, 0, TimeSpan.Zero);
dynamic startDate = new DateTimeOffset(2021, 06, 07, 0, 0, 0, TimeSpan.Zero);
var extractionResult = ExtractionsContext.ExtractRaw(
new TickHistoryRawExtractionRequest
                      {
                          Condition = new TickHistoryRawCondition
                          {
                              ReportDateRangeType = ReportDateRangeType.Range,
                              QueryStartDate = startDate, 
                              QueryEndDate = lastDate, 
                              ExtractBy = TickHistoryExtractByMode.Ric,
                              MessageTimeStampIn = TickHistoryTimeOptions.LocalExchangeTime,
                              SortBy = TickHistorySort.SingleByRic,
                              DomainCode = TickHistoryRawDomain.MarketPrice,
                              DisplaySourceRIC = true
                          },
                          IdentifierList = new InstrumentIdentifierList
                          {
                              InstrumentIdentifiers = new[]
                                        {
                                            InstrumentIdentifier.Create(DataScope.Select.Api.Content.IdentifierType.Ric, "1UROU1")
                                        },
                              ValidationOptions = new InstrumentValidationOptions
                              {
                                  AllowHistoricalInstruments = true
                              },
                              UseUserPreferencesForValidationOptions = false
                          },   
                      });
                    string extractionID = getExtractionID(extractionResult.Notes[0]);
                        var resultsize = ExtractionsContext.ReportExtractionOperations.Get(extractionID);


The code works fine with RIC ESU1 (e-mini SP500) but breaks on 1UROU1 (EURO)

tick-history-rest-api
icon clock
10 |1500

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

Upvote
Accepted
23k 22 9 14

Hello @s61670 ,

I have tested the request as you have advised:

{
                {protocol}}{
                {host}}{
                {api}}Extractions/ExtractRaw
{
  "ExtractionRequest": {
    "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.TickHistoryRawExtractionRequest",
    "IdentifierList": {
      "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",  
        "ValidationOptions": {
"AllowHistoricalInstruments": true
},
"UseUserPreferencesForValidationOptions": false,
      "InstrumentIdentifiers": [{
        "Identifier": "1UROU1",
        "IdentifierType": "Ric"
      }]
    },
    "Condition": {
      "MessageTimeStampIn": "GmtUtc",
      "ReportDateRangeType": "Range",
      "QueryStartDate": "2021-05-01T12:00:00.000Z",
      "QueryEndDate": "2021-06-14T12:10:00.000Z",
      "ExtractBy": "Ric",
      "SortBy": "SingleByRic",
      "DomainCode": "MarketPrice",
      "DisplaySourceRIC": true
    }
  }
}

My result was:

{
    "@odata.context": "https://selectapi.datascope.refinitiv.com/RestApi/v1/$metadata#RawExtractionResults/$entity",
    "JobId": "0x07be8f667eed375f",
    "Notes": [
        "Extraction Services Version 15.1.42731 (f7cbe1c1fadf), Built Sep 24 2021 18:03:53\nUser ID: 19945\nExtraction ID: 2000000315634164\nCorrelation ID: CiD/19945/AAAAAA.07be8f667edd375f/RA\nSchedule: 0x07be8f667eed375f (ID = 0x0000000000000000)\nInput List (1 items):  (ID = 0x07be8f667eed375f) Created: 10/12/2021 22:06:33 Last Modified: 10/12/2021 22:06:33\nReport Template: _OnD_0x07be8f667eed375f (ID = 0x07be8f667efd375f) Created: 10/12/2021 22:06:32 Last Modified: 10/12/2021 22:06:32\nSchedule dispatched via message queue (0x07be8f667eed375f)\nSchedule Time: 10/12/2021 22:06:33\nProcessing started at 10/12/2021 22:06:33\nProcessing completed successfully at 10/12/2021 22:06:34\nExtraction finished at 10/12/2021 22:06:34 UTC, with servers: x02q13\nHistorical Instrument <RIC,1UROU1> expanded to 0 RICS.\n\nReport suppressed because there are no instruments\n"
    ]
}

This is a valid result that is empty. However, an application should be coded to handle an empty result set, otherwise it may result in a crush.

Next, I run HistoricSearch, to find out more:

{
                {protocol}}{
                {host}}{
                {api}}Search/HistoricalSearch
{
  "Request": {
    "Identifier": "1UROU1",
    "IdentifierType": "Ric",
    "Range": {
      "Start": "2000-01-01T00:00:00.000Z",
      "End": "2021-10-11T00:00:00.000Z"
    }
  }
}

The result was:

"@odata.context": "https://selectapi.datascope.refinitiv.com/RestApi/v1/$metadata#Collection(DataScope.Select.Api.Search.HistoricalSearchResult)",
    "value": [
        {
            "Identifier": "1UROU1",
            "IdentifierType": "Ric",
            "Source": "",
            "Key": "VjF8MHgzMDAwMDAwMDAwMDAwMDAwfDB4MzAwMDAwMDAwMDAwMDAwMHx8fHx8fHwxVVJPVTF8",
            "Description": "Historical Instrument",
            "InstrumentType": "Unknown",
            "Status": "Valid",
            "DomainCode": "6",
            "FirstDate": "2000-03-14T00:00:00.000Z",
            "LastDate": "2021-03-27T00:00:00.000Z",
            "History": []
        },
        {
            "Identifier": "1UROU1",
            "IdentifierType": "Ric",
            "Source": "",
            "Key": "VjF8MHgzMDAwMDAwMDAwMDAwMDAwfDB4MzAwMDAwMDAwMDAwMDAwMHx8fHx8fHwxVVJPVTF8",
            "Description": "Historical Instrument",
            "InstrumentType": "Unknown",
            "Status": "Valid",
            "DomainCode": "8",
            "FirstDate": "2016-09-06T00:00:00.000Z",
            "LastDate": "2021-05-01T00:00:00.000Z",
            "History": []
        }
    ]
}

DomainCode 6 = MarketPrice, this data was available

"FirstDate": "2000-03-14T00:00:00.000Z",- "LastDate": "2021-03-27T00:00:00.000Z",

(it was not available 01.05.2021 - 14.06.2021, you should have an empty result)

DomainCode 8 = MarketByPrice.

To see the complete list of domains if you need it is EmaRdm.h in RTSDK on GitHub

Does this information help?

---

I am sorry you are sometimes being referred by Help Desk experts to dev portal unnecessarily, I am guessing this happens if you describe your question as RTH API question. In order to avoid this, when your question is on content, try to clearly indicate that your question is on content. I hope approach will help.



icon clock
10 |1500

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

Upvotes
23k 22 9 14

Hello @s61670 ,

RIC "1UROU1" does not appear to be valid. To help you find the RIC that you require, the best approach for a customer is consult with Refinitiv content experts directly via Refinitiv Helpdesk Online -> Content -> RTH.

On my side, I have run the query:

{
                {protocol}}{
                {host}}{
                {api}}Extractions/ExtractRaw
{
  "ExtractionRequest": {
    "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.TickHistoryRawExtractionRequest",
    "IdentifierList": {
      "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",  
      
      "InstrumentIdentifiers": [{
        "Identifier": "1UROU1",
        "IdentifierType": "Ric"
      }]
    },
    "Condition": {
      "MessageTimeStampIn": "GmtUtc",
      "ReportDateRangeType": "Range",
      "QueryStartDate": "2021-06-07T12:00:00.000Z",
      "QueryEndDate": "2021-09-10T12:10:00.000Z",
      "ExtractBy": "Ric",
      "SortBy": "SingleByRic",
      "DomainCode": "MarketPrice",
      "DisplaySourceRIC": true
    }
  }
}

The response was:

{
    "@odata.context": "https://selectapi.datascope.refinitiv.com/RestApi/v1/$metadata#RawExtractionResults/$entity",
    "JobId": "0x07bbe5ca131d3163",
    "Notes": [
        "All identifiers were invalid.  No extraction performed."
    ],
    "IdentifierValidationErrors": [
        {
            "Identifier": {
                "@odata.type": "#DataScope.Select.Api.Content.InstrumentIdentifier",
                "Identifier": "1UROU1",
                "IdentifierType": "Ric",
                "Source": ""
            },
            "Message": "Not found"
        }
    ]
}

To be sure that the instrument is not historic (was valid at any point during the specified period) I have also tested:

{
  "ExtractionRequest": {
    "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.TickHistoryRawExtractionRequest",
    "IdentifierList": {
      "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",  
        "ValidationOptions": {
"AllowHistoricalInstruments": true
},
"UseUserPreferencesForValidationOptions": false,
      "InstrumentIdentifiers": [{
        "Identifier": "1UROU1",
        "IdentifierType": "Ric"
      }]
    },
    "Condition": {
      "MessageTimeStampIn": "GmtUtc",
      "ReportDateRangeType": "Range",
      "QueryStartDate": "2021-06-07T12:00:00.000Z",
      "QueryEndDate": "2021-09-10T12:10:00.000Z",
      "ExtractBy": "Ric",
      "SortBy": "SingleByRic",
      "DomainCode": "MarketPrice",
      "DisplaySourceRIC": true
    }
  }
}

Resulting in

Historical Instrument <RIC,1UROU1> expanded to 0 RICS.  Report suppressed because there are no instruments


Hope this information helps


icon clock
10 |1500

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

Upvotes
89 2 6 9

How is there no RIC? What is in DataScope then?

35.png



35.png (89.7 KiB)
icon clock
10 |1500

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

Upvotes
89 2 6 9

code works fine for ESU1; ESZ1 but for 1UROU1 does not work, although the code used to work and downloaded a lot of history on the Euro symbol (1URO)



icon clock
10 |1500

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

Upvotes
23k 22 9 14

Hello @s61670 ,

I see what you mean. And I can think of two ways to approach it, I would pursue both.

As a developer, facing this result I would run:

{
  "ExtractionRequest": {
    "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.TickHistoryRawExtractionRequest",
    "IdentifierList": {
      "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",  
        "ValidationOptions": {
"AllowHistoricalInstruments": true
},
"UseUserPreferencesForValidationOptions": false,
      "InstrumentIdentifiers": [{
        "Identifier": "1UROU1",
        "IdentifierType": "Ric"
      }]
    },
    "Condition": {
      "MessageTimeStampIn": "GmtUtc",
      "ReportDateRangeType": "Range",
      "QueryStartDate": "2015-06-07T12:00:00.000Z",
      "QueryEndDate": "2021-09-10T12:10:00.000Z",
      "ExtractBy": "Ric",
      "SortBy": "SingleByRic",
      "DomainCode": "MarketPrice",
      "DisplaySourceRIC": true
    }
  }
}

To find what raw content is available for this instrument, allowing for historical changes. Please note the result of this is large.

However, this forum can be of most help to you with general questions on API usage, and for in-depth queries on content, such as why specific content is or is not available, how to identify and request specific content, a much better approach is to contact Refinitiv content experts via Refinitiv Helpdesk Online -> Content -> RTH.

icon clock
10 |1500

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

Upvotes
89 2 6 9

I have a question, why does 1UROM1 when 01.01.2021 - 14.06.2021 downloads well, but when 01.05.2021 - 14.06.2021 crashes? Nothing is downloading.

The code is in the first message.



icon clock
10 |1500

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

Upvotes
89 2 6 9

456.png

Datascope shows that 1UROZ1 is in the database, but I cannot download it, just like I cannot download 1UROU1.

Some specific problem, but the code works.

I have a request, can you contact support and find out what the problem is? Most likely they will check datascope and will answer that there is no problem, advise to go to forum.


456.png (88.4 KiB)
icon clock
10 |1500

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

Click below to post an Idea Post Idea