question

Upvotes
Accepted
1 2 1 4

how to find strike and maturity for all options in an options chain including all historic now defunct?

so I'm running the below code, but not able to find the fields to put inside ContentFieldNames such that I can reliably know what the strike and maturity of each option is (as well as the root stem of the option, eg weekly, monthly) how do I do this?


i tried doing a TermsAndConditionsExtractionRequest, but i only have the current options chain even though I specify historic and inactive instruments.


thanks


requestBody = {
    "ExtractionRequest": {
        "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.TickHistoryIntradaySummariesExtractionRequest",
        "ContentFieldNames": [
            "Open", "Open Ask", "Open Bid",
            "High", "High Ask", "High Bid",
            "Low", "Low Ask", "Low Bid",
            "Last", "Close Ask", "Close Bid",
            "No. Asks", "No. Bids", "No. Trades",
            "Volume"
        ],
        "IdentifierList": {
            "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
            "InstrumentIdentifiers": [
                {"Identifier": "0#SPX*.U", "IdentifierType": "ChainRIC"}
            ],
            "ValidationOptions": {"AllowHistoricalInstruments": "true"},
            "UseUserPreferencesForValidationOptions": "false"
        },
        "Condition": {
            "MessageTimeStampIn": "GmtUtc",
            "ReportDateRangeType": "Range",
            "QueryStartDate": "2020-09-03T09:30:00.000Z",
            "QueryEndDate": "2020-10-03T17:00:00.000Z",
            "SummaryInterval": "OneHour",    # "FifteenMinutes" # OneSecond # OneMinute
            "DisplaySourceRIC": "true"
        }
dss-rest-apidatascope-selectdsstick-history-rest-api
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
28.3k 30 11 15

Hello @opsp,

I would go with HistoricalReferenceExtractionRequest:

{
                {protocol}}{
                {host}}{
                {api}}Extractions/ExtractWithNotes 
{
    "ExtractionRequest": {
        "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.HistoricalReferenceExtractionRequest",
        "ContentFieldNames": [
           "RIC", "CUSIP", "ISIN", "SEDOL", "Issuer OrgID", "Exchange Code", "Currency Code", "Change Date",
           "Strike Price", "Expiration Date"
        ],
        "IdentifierList": {
            "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
            "InstrumentIdentifiers": [
                {
                    "Identifier": "0#SPX*.U",
                    "IdentifierType": "ChainRIC"
                }
            ],
            "ValidationOptions": {"AllowHistoricalInstruments": true},
            "UseUserPreferencesForValidationOptions": false
        },
        "Condition": {
            "StartDate": "2020-09-03T09:30:00.000Z",
            "EndDate": "2020-10-03T17:00:00.000Z"
        }
    }
}

This is a sizeable request, so I expect result to be Status = 202, accepted, next check status

{
                {protocol}}{
                {host}}{
                {api}}Extractions/ExtractRawResult(ExtractionId='{
                {jobId}}') 

Once Status = 200, completed, retrieve result:

{
                {protocol}}{
                {host}}{
                {api}}Extractions/RawExtractionResults('{
                {jobId}}')/$value 

For my request it looks like:

...
SPXx182026550.U,,,,,OPQ,USD,2020/09/03,2655,2020/12/18,,,,,,CHR|0#SPX*.U|
SPXu182031350.U,,,,,OPQ,USD,2020/09/03,3135,2020/09/18,,,,,,CHR|0#SPX*.U|
SPXu182031350.U^I20,,,,,OPQ,USD,2020/09/22,3135,2020/09/18,,,,,,CHR|0#SPX*.U|
SPXu182031350.U^I20,,,,,,,2020/09/26,,,,,,,,CHR|0#SPX*.U|
SPXu182031300.U,,,,,OPQ,USD,2020/09/03,3130,2020/09/18,,,,,,CHR|0#SPX*.U|
...

One can omit from the request any fields that are not required.

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
1 2 1 4

thanks for you response. I notice however even in your request response that you post, the strikes are sometimes missing. obviously an option must have a strike price. why is it missing? how can I retrieve all of the strikes for all of the options in a chain?

eg,

SPXu182031350.U^I20,,,,,,,2020/09/26,,,,,,,,CHR|0#SPX*.U|

Also, why and how are there more than one entry with different expiries for the same instrument identifier?

thanks.

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
28.3k 30 11 15

Hello @opsp,

HistoricalReferenceExtractionRequest is the most comprehensive request of it's kind and will give you the most complete information that is available on instrument's lifecycle in history. It allows to expand RIC chain into all historical instruments that were part of it overtime, valid and expired.

However, in majority of cases this request will not bring back all content that is required per use case, and additional requests may be required for that.

In terms of the approach to requirement, in many cases, it is a two-step:

  1. HistoricalReferenceExtractionRequest can be used to expand the chain as the first step
  2. Then another targeted request is required to obtain relevant content for the instrument as the second step.

I would like to suggest to contact Refinitiv content experts via Refinitiv Helpdesk Online -> Content -> RTH directly, to help you identify the required targeted request as well as for any explanation on the results/content available or not available, as well.

This forum is mostly comprised of developers using Refinitiv API and it will be of most help to you with Refinitiv API usage general questions.

Let us know if you are able to proceed, or would like a hand, we can help open a content case on your behalf?

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
1 2 1 4

Ok got it. Thanks. I’ll open a ticket for the content related issues. (Although it still might be an api issue)

I also wonder how can I find the content fields for the historicalReferenceExtractionRequest?

I need to add other static data like:


  • type (call / put)
  • frequency (monthly, weekly, etc...)
  • last trading day (different from expiration date)
  • tick size
  • multiplier
  • lot size (for futures)


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
28.3k 30 11 15

Hello @opsp,

Please refer to Data Dictionary - Refinitiv Tick History Custom Reporting, tab "Field Descriptions", search for "Historical reference".

Or you can also List All Available Fields, see:

REST API Tutorial 10: On Demand Histo Reference extraction

{
                {protocol}}{
                {host}}{
                {api}}Extractions/GetValidContentFieldTypes(ReportTemplateType=ThomsonReuters.Dss.Api.Extractions.ReportTemplates.ReportTemplateTypes'HistoricalReference') 

Absolutely, please keep us posted on the recommendation from content per your requirements, and next we can help with API usage, if needed?

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.