Correct use of RcsUnderlyingProducts
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?
Best Answer
-
Hi,
It seems that the RcsUnderlyingProducts is case sensitive. The CommoditySearch returns data once value of the RcsUnderlyingProducts is changed from "CRUDE OIL" to "Crude Oil". You can verify the value with the Commodity Search in DSS GUI.
With regard to the 250 rows limitation of result, this is expected behavior. The CommoditySearch uses the Server-Driven Paging mechanism to deliver data. It will return the first page of results (typically 250 rows) on the initial request. The initial server response will include a nextlink(URI) that, when called, will return the next 250 rows for that result set as well as another nextlink. If there are no more rows, the nextlink will not be returned.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 690 Datastream
- 1.4K DSS
- 629 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 559 WebSocket API
- 39 FX Venues
- 15 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 24 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 279 Open PermID
- 45 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 2K Refinitiv Data Platform
- 714 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 106 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 95 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛