For a deeper look into our DataScope Select REST API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
1 4 4 8

how to use the FuturesAndOptionsSearchRequest in the python

now, the http code is 405. can u provide an example in the python

requestUrl='https://hosted.datascopeapi.reuters.com/RestApi/v1/Search'

requestHeaders={
  
"Prefer":"respond-async",
"Content-Type":"application/json",
"Authorization": "token " + token
}
requestBody={
"SearchRequest": {
"@odata.type": "#ThomsonReuters.Dss.Api.Search.FuturesAndOptionsSearchRequest",
"FuturesAndOptionsType": "Options",
"PutCall": "Call",
"FileCodes": [
"7130"],
"ExpirationDate": {
"@odata.type": "#ThomsonReuters.Dss.Api.Search.DateRangeComparison",
"From": "2018-05-08T00:00:00.000Z",
"To": "2018-08-08T00:00:00.000Z"},
"IdentifierType": "Ric",
"AssetStatus": "Active",
"UnderlyingRic": ".KS200"}
}
r2 = requests.post(requestUrl, json=requestBody,headers=requestHeaders,verify=False)
print (r2.status_code)
dss-rest-apidatascope-selectdss
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.

Hello @lei.cheng

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query? If so please can you click the 'Accept' text next to the appropriate reply. This will guide all community members who have a similar question.

Thanks,

AHS

1 Answer

· Write an Answer
Upvotes
Accepted
78.1k 246 52 72

The URL for FuturesAndOptionsSearchRequest is:

Therefore, the code must be:

requestUrl='https://hosted.datascopeapi.reuters.com/RestApi/v1/Search/FuturesAndOptionsSearch'

Please refer to the API Reference Tree for the URLs of other requests.


search.png (9.0 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.

that's ok, and thank u very much

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.