question

Upvotes
Accepted
65 1 2 1

Differences in TRTH API and GUI

I am trying to pull down Elektron Timeseries content for Equity Options by:

1. Expanding a chain RIC such as <0#AAPL*.U> using GET /Extractions/GetValidContentFieldTypes...

2. Submitting the returned list to TRTH.

The returning volumes are correct, save for missing weeklies instruments.

Narrowing the problem down to the options causing an issue, it seems that the REST API is return back "Not Found" for these RICs. Confusing the issue further, the GUI does return back data. The json body used is below:


{'ExtractionRequest': {'@odata.type': '#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.ElektronTimeseriesExtractionRequest',  'ContentFieldNames': ['Trade Date', 'Volume'],  'IdentifierList': {'@odata.type': '#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList',   'InstrumentIdentifiers': [{'Identifier': 'AAPLA102020500.U',     'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102021000.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102021500.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102022000.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102022500.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102022750.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102023000.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102023250.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102023500.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102023750.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102024000.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102024250.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102024500.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102024750.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102025000.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102025250.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102025500.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102025750.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102026000.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102026000.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102026500.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102026750.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102027000.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102027250.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102027500.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102027750.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102028000.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102028250.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102028500.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102028750.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102029000.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102029250.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102029500.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102029750.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102030000.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102030250.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102030500.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102030750.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102031000.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102031000.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102031500.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102031750.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102032000.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102032250.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102032500.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102032750.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102033000.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102033500.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102034000.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102034500.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102035000.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102035500.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102036000.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102036500.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102037000.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102037500.U', 'IdentifierType': 'Ric'},    {'Identifier': 'AAPLA102038000.U', 'IdentifierType': 'Ric'}]},  'Condition': {'ReportDateRangeType': 'Range',   'QueryStartDate': '2020-01-06',   'QueryEndDate': '2020-01-16'}}}
tick-history-rest-apiderivatives
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.

Upvote
Accepted
13.7k 26 8 12

@Josh.Kalina ,

Following up on the answer by Jirapongse, to add an explanation, note that by default, On Demand API requests do not deliver data for expired instruments, because On Demand extractions do not take the User Preferences set in the GUI into consideration.

For an On Demand extraction to deliver data for historical instruments (expired contracts are historical instruments), this must be specified in the request, using the instrument validation options. There is an explanation here in the Tutorials introduction, where you will also find links to several examples.

Please also note that there are cases where setting AllowHistoricalInstruments to true might not suffice. There are 2 other settings you might need to set to true: AllowInactiveInstruments and AllowOpenAccessInstruments.

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.

Upvote
82.5k 278 53 77

@Josh.Kalina

Please add the ValidateOptions with AllowHistoricalInstruments: True in the request.

....
 { 
               "Identifier":"AAPLA102037500.U",
               "IdentifierType":"Ric"
            },
            { 
               "Identifier":"AAPLA102038000.U",
               "IdentifierType":"Ric"
            }
         ]   ,
         "ValidationOptions": {
            "AllowHistoricalInstruments": true
        },
        "UseUserPreferencesForValidationOptions": false

      },
      "Condition":{ 
         "ReportDateRangeType":"Range",
         "QueryStartDate":"2020-01-06",
         "QueryEndDate":"2020-01-16"
      }
   }

request.txt


request.txt (7.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.

Upvotes
65 1 2 1

That answered the question, thanks everyone!

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.