question

Upvotes
Accepted
43 1 1 5

Active vs. Inactive for FuturesAndOptionsSearch

If I specify the following request, I get a list of 32 items...

requestUrl = "https://hosted.datascopeapi.reuters.com/RestApi/v1/Search/FuturesAndOptionsSearch"
requestHeaders={
    "Prefer":"respond-async",
    "Content-Type":"application/json", 
    "Authorization": "token " + token
}
requestBody={
  "SearchRequest": {
    "AssetStatus": "Active",
    "FileCodes": None,
    "CurrencyCodes": None,
    "ExchangeCodes": ["NYM"],
    "FuturesAndOptionsType": "FuturesOnOptions",
    "StrikePrice": {
      "@odata.type": "#ThomsonReuters.Dss.Api.Search.NumericRangeComparison",
      "From": 49.99,
      "To": 50.01
    },
    "ExpirationDate": {
      "@odata.type": "#ThomsonReuters.Dss.Api.Search.DateRangeComparison",
      "From": "2020-01-01T00:00:00.000Z",
      "To": "2020-01-30T00:00:00.000Z"      
    },
    "PutCall": None,
    "PreferredIdentifierType": "Ric"
  }
} 

if I change 2 things... Change the AssetStatus to "Inactive", and move the dates back one year, I get nothing back? How can that be?

requestUrl = "https://hosted.datascopeapi.reuters.com/RestApi/v1/Search/FuturesAndOptionsSearch"
requestHeaders={
    "Prefer":"respond-async",
    "Content-Type":"application/json", 
    "Authorization": "token " + token
}
requestBody={
  "SearchRequest": {
    "AssetStatus": "Inactive",
    "FileCodes": None,
    "CurrencyCodes": None,
    "ExchangeCodes": ["NYM"],
    "FuturesAndOptionsType": "FuturesOnOptions",
    "StrikePrice": {
      "@odata.type": "#ThomsonReuters.Dss.Api.Search.NumericRangeComparison",
      "From": 49.99,
      "To": 50.01
    },
    "ExpirationDate": {
      "@odata.type": "#ThomsonReuters.Dss.Api.Search.DateRangeComparison",
      "From": "2019-01-01T00:00:00.000Z",
      "To": "2019-01-30T00:00:00.000Z"      
    },
    "PutCall": None,
    "PreferredIdentifierType": "Ric"
  }
} 
pythontick-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.

Upvotes
Accepted
23k 22 9 14

Hello @jwaldron,

I believe you are searching for Futures and Options but instead of future, searching into past. I do not think "Inactive" will help you, as they are not just incative, they are historical.

Therefore, would make sense to search for Futures in the past using HistoricalCriteriaSearch, such as this example from API Reference Tree -Search :

{
    "Request": {
        "BondTypeCodes": null,
        "ContributorIds": null,
        "CountryCodes": null,
        "CurrencyCodes": null,
        "DomainCodes": null,
        "ExchangeCodes": null,
        "FutureMonthCodes": null,
        "InstrumentTypeCodes": null,
        "OptionMonthCodes": null,
        "OptionTypeCodes": null,
        "CouponRate": {
            "Min": 30
        },
        "StrikePrice": null,
        "ExpiryDate": null,
        "MaturityDate": {
            "Start": "2016-09-01T00:00:00.000Z",
            "End": "2016-09-30T23:59:59.000Z"
        },
        "Range": {
            "Start": "2015-09-30T00:00:00.000Z",
            "End": "2016-09-30T00:00:00.000Z"
        }
    }
}
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
43 1 1 5

You are correct, I am looking for historical instruments in order to get the correct references to supply to get historical prices... so are you saying FuturesAndOptions does not apply to historical queries? What does Active/Inactive indicate, if not historical? According to the RefTree, it means

"Code representing the status of the instrument."... I don't what that means...

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
13.7k 26 8 12

@jwaldron,

That is correct, the FuturesAndOptions search, like many other searches, does not apply to historical queries. That is why we have the HistoricalCriteriaSearch, which is tailored for historical data, i.e. instruments that are no longer quoted.

Active/Inactive indicates if there was any activity (quotes, trades, etc.) for a currently valid instrument. As an example, lack of activity could be due to an instrument not being liquid.

Hope this clarifies.

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