I am trying to search for commodities by underlying product as documented here:
https://hosted.datascopeapi.reuters.com/RestApi.Help/Context/Operation?ctx=Search&opn=CommoditySearch&sce=Search - Commodities Search - AND 2 Fields.primary&stp=1&tab=2
Here is python code for a query that looks for Argus commodities without matching product type:
q = {
"SearchRequest": {
"IdentifierType": "Ric",
"PreferredIdentifierType": "Ric",
# "RcsUnderlyingProducts":["*CRUDE*"],
# "Description":"CRUDE",
"ExchangeCodes":["ARG"],
#"ExchangeCodesOperator":"Exclude"
}
}
q = json.dumps(q)
response_data = requests.post("https://hosted.datascopeapi.reuters.com/RestApi/v1/Search/CommoditySearch", headers = {"Prefer": "respond-async", "Content-Type": "application/json", "Authorization":"Token "+json.loads(response_credentials.text)["value"]},data = q)
This returns 250 results, which is the limit, I guess. Among them, there are many with RcsUnderlyingProduct 'CRUDE OIL.' For example:
{'AssetCategory': 'EFU',
'AssetStatus': 'Inactive',
'CommoditiesUnderlyingAsset': 'NATURAL GAS',
'ContractMonthAndYear': 'MAR2014',
'CurrencyCode': 'RUB',
'CurrencyCodeDescription': 'Russian New Ruble',
'Description': 'URALS SEABORNE M',
'ExchangeCode': 'ARG',
'ExchangeCodeDescription': 'ARGUS (ARG)',
'ExpirationDate': '2014-03-17T00:00:00.000Z',
'FileCode': '6295',
'FileCodeDescription': '(6295) DOBOL Daily',
'FrequencyOfUpdate': '',
'Identifier': 'URLSBRNBKH4^1',
'IdentifierType': 'Ric',
'InstrumentType': 'Commodity',
'Key': 'VjF8MHgwMDEwMGIwMDExYTQyM2QyfDB4MDAxMDBiMDAwZjE1YTAyZnxBUkd8Q09NUXxDT01NfENPTU18T3x8UklDOlVSTFNCUk5CS0g0XjF8NjI5NQ',
'LongDescription': 'DRNR ROOT MAR 2014',
'LotUnits': 'USD',
'PrimaryChainOrTile': '0#URLSBRNBK:',
'RcsUnderlyingProduct': 'CRUDE OIL',
'Source': 'ARG',
'SourceName': 'ARGUS MEDIA LTD',
'SourceType': 'SPLST',
'Status': 'Valid',
'TrClassificationScheme': 'FUT'}
If i perform a search adding a filter for 'RcsUnderlyingProducts' as follows:
q = {
"SearchRequest": {
"IdentifierType": "Ric",
"PreferredIdentifierType": "Ric",
"RcsUnderlyingProducts":['CRUDE OIL'],
"RcsUnderlyingProductsOperator":"Include",
"ExchangeCodes":["ARG"],
#"ExchangeCodesOperator":"Exclude"
}
}
q = json.dumps(q)
response_data = requests.post("https://hosted.datascopeapi.reuters.com/RestApi/v1/Search/CommoditySearch", headers = {"Prefer": "respond-async", "Content-Type": "application/json", "Authorization":"Token "+json.loads(response_credentials.text)["value"]},data = q)
i get an empty result. so the API request is accepted, so i assume it is well formed. but no response. even though clear what i typed was a verbatim match.
are there any worked examples of this functionality in HTTP?