question

Upvotes
Accepted
43 1 1 5

Cannot replicate Datascope output in TRTH API

I am trying to locate Comex Copper Option information (Ric root is HG). In Datascope, I get the following after searching broadly...

but when I try to follow the tutorial example, and submit the following request, it returns nothing..

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": None,
    "FuturesAndOptionsType": "Options",
    "IdentifierType": "Ric",
    "Identifier": "HG*",
    "PreferredIdentifierType": "Ric",
    "UnderlyingRic": "HG"
  }
}

I have also supplied the exact identifer per the Datascope output, but also nothing.. I'm at a loss...

Thanks for any help.

tick-history-rest-api
datascope.png (40.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
Accepted
11.3k 25 8 13

Hi @jwaldron,

The search function in the Web UI you provided should be similar to the InstrumentSearch in DSS REST API. I am able to get the same results with the following request.

POST https://hosted.datascopeapi.reuters.com/RestApi/v1/Search/InstrumentSearch
{
  "SearchRequest": {
    "InstrumentTypeGroups": [
      "FuturesAndOptions"
    ],
    "IdentifierType": "Ric",
    "Identifier": "HG100*",
    "PreferredIdentifierType": "Ric"
  }
}

For FuturesAndOptionsSearch in REST API should be similar to Futures & Options Search in the following Web UI.


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

Thank you very much, that is extremely helpful.. would you be able to show me as well how to achieve that via the FuturesAndOptionsSearch, as in many cases I may need to locate specific options, i.e. by Strike and/or ExpiryDate, and I don't want to have to go to the Web UI every time to lead me to the identifier.., and if I do "HG*" in the Identifier, it returns 250 items, which is probably the max, and may not include the one I actually want, so I need to be able to drill down a bit.

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
43 1 1 5

I figured it out.... the issue was the "FuturesAndOptionsType" is called "FuturesonOptions", which is somewhat strange, since it's actually the opposite, it's an Option on a Future... but whatever....

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