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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
1 3 4 6

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 5.0 MiB each and 10.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

Upvotes
Accepted
38.1k 69 35 53

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 5.0 MiB each and 10.0 MiB total.

that's ok, and thank u very much

Click below to post an Idea Post Idea