Hi,
I've noticed when using the following payload and headers:
payload = json.dumps({
"SearchRequest": {
"ExchangeCodes": [
"CMX"
],
"IdentifierType": "RICRoot",
"Identifier": "GC",
"AssetStatus": "Active",
"FuturesAndOptionsType": "FuturesOnOptions"
}
})
headers = {
'Prefer': 'respond-async;odata.maxpagesize=100000',
'Content-Type': 'application/json'
}
url = "https://selectapi.datascope.refinitiv.com/RestApi/v1/Search/FuturesAndOptionsSearch"
requests.request("POST", url, headers=headers, data = payload, auth=HTTPBasicAuth(username, password))
The request times out with the following error:
raise ProxyError(e, request=request)
requests.exceptions.ProxyError: HTTPSConnectionPool(host='selectapi.datascope.refinitiv.com', port=443): Max retries exceeded with url: /RestApi/v1/Search/FuturesAndOptionsSearch (Caused by ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response')))
The request works after removing 'odata.maxpagesize=100000' from the 'Prefer' header, but this truncates the results for RIC roots with many underlying RICs.
Also, when changing the "FuturesAndOptionsType" to "Futures" for the same RIC root the request is completed successfully, even with 'odata.maxpagesize=100000' included in the header.
How do we get the full results for the payload above?