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)
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
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.