How to get RICS for expired spreads? Specifically those that have a change in year digits

When trying to get historical WTI spreads I cannot find appropriate RIC to use. In 2023 for some reason the RICS changed from 1 digit year to 2 digit years. When attempting to get history for a 2023-2024 spread pair all logic seems to breakdown.
I used the refinitiv search:
import os
import requests
resp = requests.post('https://selectapi.datascope.refinitiv.com/RestApi/v1/Authentication/RequestToken',
json={'Credentials': {'Username': os.environ['REFINITIV_API_USER'],
'Password': os.environ['REFINITIV_API_PASS']}},
headers={'Content-Type': 'application/json'})
token = resp.json()['value']
headers = {'Authorization': 'Token ' + token, 'Content-Type': 'application/json', 'Prefer': 'respond-async'}
i = requests.post('https://selectapi.datascope.refinitiv.com/RestApi/v1/Search/FuturesAndOptionsSearch', headers=headers,
json={
"SearchRequest": {
"FuturesAndOptionsType": "Futures",
"AssetStatus": "Inactive",
"IdentifierType": "Ric",
"Identifier": "CLZ3-F24*",
"PreferredIdentifierType": "Ric"
}
})
i.json()
This tells me the RIC format is "CLZ3-F24^2" for a CLZ23-F24 spread - whoever when run through the get_history() function this does not work. Sample call below:
rd.get_history('CLZ3-Z24^2:', ['OPEN_PRC', 'HIGH_1', 'LOW_1', 'SETTLE'], 'daily', '2023-09-07', '2023-10-10')
Error Code:(TS.Interday.UserRequestError.70005, The universe is not found)
What is the best way to identify all the nuances with these RICS codes? It is a bit mad…
Thanks!
Additional Note: When using the python library search it (sample below) it says I am missing a scope? Please advise.
rd.discovery.search(
view = rd.discovery.Views.SEARCH_ALL,
filter = "PrimaryChainRIC eq '0#CL-:'",
select = "DocumentTitle,RIC,PrimaryChainRIC,ExpiryDate",
top = 1000)
Error Code: Missing scopes: {'trapi.search.read'}
Answers
-
Hello @a.santiago,
- The RIC that is returned by the DSS is not the one that you are using in the get_history API call - there is a typo in your call. I can get data for that correct expired RIC:
2. Missing scope in RDP means that your account does not have the permission to invoke that API call. You can speak to your LSEG account manager to get those products added to your account.
1 -
ah thanks! Are you able to use chain rics with refintiv data platform? That would probably solve all of my headaches with finding the correct RICS
0 -
Yes, the Refinitiv Data Library support chain RICs. There is a chain exmple on GitHub.
0 -
Perfect! When running the example on CL (WTI OIL) for example I only get current RICS. How would I go about expired?
fchi = Chain('0#CL-:') print(fchi.constituents)
0 -
If you mean chain RICs that contain expired RICs, please contact the helpdesk team directly via MyAccount. The helpdesk team can check if those chain RICs are available.
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
- 684 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 251 ETA
- 555 WebSocket API
- 37 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 645 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
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 916 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛