RTH - Historical Criteria Search for continuation RICs

We have Continuation RICs for Futures such as CLc1 and TYcvoi1 and GCcm1 however these are not retrieved by the below Historical criteria search regex code. We would like to know what change needs to be made to the API code to extract the continuation RICs which have these lowercase letters.
The first contract month currently is ADG2 which is the Feb 22 contract and ADc1 will represent the first contract month.
We send a combination of RIC pattern, exchange code and Instrument type. Below are the ones that are currently being used, it looks like we would have to update the Regex at least to pick up the lower case symbols but I’m not sure if any changes are needed to exchange code and instrument type.
Example instrument search template:
{
"Request":
{ "RicPattern": "^[A-Z]{2,4}[FGHJKMNQUVXZ][0-9]$",
"BondTypeCodes": null,
"ContributorIds": null,
"CountryCodes": null,
"CurrencyCodes": null,
"ExchangeCodes": ["759"],
"FutureMonthCodes": null,
"InstrumentTypeCodes": ["18"],
"OptionMonthCodes": null,
"OptionTypeCodes": null,
"CouponRate": null,
"StrikePrice": null,
"ExpiryDate": null,
"MaturityDate": null,
"Range": {
"Start": "2022-01-31T00:00:00.000Z",
"End": "2022-01-31T23:59:59.999Z"
}
}
}
$ head api_futures_config.txt
^[A-Z]{2,4}[FGHJKMNQUVXZ][0-9]$|IUS|FUT
^[A-Z]{2,4}[FGHJKMNQUVXZ][0-9]$|CME|FUT
^[A-Z]{2,4}[FGHJKMNQUVXZ][0-9]$|CBT|FUT
^[A-Z]{2,4}[FGHJKMNQUVXZ][0-9]$|NYM|FUT
^[A-Z]{2,4}[FGHJKMNQUVXZ][0-9]$|IOM|FUT
^[A-Z]{2,4}[FGHJKMNQUVXZ][0-9]$|IMM|FUT
^[A-Z]{2,4}[FGHJKMNQUVXZ][0-9]$|CMX|FUT
$ cat instrument_types.txt
domain,instype,desc
FUT,18,Cross Market
FUT,114,Equities and Index
FUT,98,Equity-Linked
FUT,210,FX
FUT,34,Treasury Debt
FUT,50,Sovereign Debt
FUT,82,Corporate Debt
FUT,66,Mortgage-backed Debt
FUT,242,Money Market
FUT,130,Energy
FUT,146,Commodities - Softs
FUT,162,Commodities - Base Metals
FUT,178,Commodities - Coins and Precious Metals
FUT,194,Commodities - Grains and Oilseeds
$ cat exchangeCodes.txt
exchange,exchangeCode
CBT,23
IUS,759
CME,20
MEX,168
NYM,31
SAO,165
IOM,22
IMM,21
CMX,28
Best Answer
-
Hello @mohamed.hisham ,
Agree with you the regex fiter will have to be tuned a little. From my testing the following Regex helps identify RICs CLc1 and GCcm1:
{ "Request": "RicPattern": "^[A-Z]{2}[c-z]{2}[0-9]$", "BondTypeCodes": null, "ContributorIds": null, "CountryCodes": null, "CurrencyCodes": null, "ExchangeCodes": null, "FutureMonthCodes": null, "InstrumentTypeCodes": null, "OptionMonthCodes": null, "OptionTypeCodes": null, "CouponRate": null, "StrikePrice": null, "ExpiryDate": null, "MaturityDate": null, "Range": { "Start": "2022-01-31T00:00:00.000Z", "End": "2022-01-31T23:59:59.999Z" }
} }For RIC TYcvoi1 you may wish to go with a separate search:
{ "Request": { "RicPattern": "^[A-Z]{2}[c-z]{4}[0-9]$", "BondTypeCodes": null, "ContributorIds": null, "CountryCodes": null, "CurrencyCodes": null, "ExchangeCodes": null, "FutureMonthCodes": null, "InstrumentTypeCodes": null, "OptionMonthCodes": null, "OptionTypeCodes": null, "CouponRate": null, "StrikePrice": null, "ExpiryDate": null, "MaturityDate": null, "Range": { "Start": "2022-01-31T00:00:00.000Z", "End": "2022-01-31T23:59:59.999Z" }
} }On ExchangeCodes and InstrumentTypeCodes filtering- not so straightforward, in my opinion.
I have run a quick verification against the first instrument CLc1 as RicPattern, with the same filters:
{{protocol}}{{host}}{{api}}Search/HistoricalCriteriaSearch
{ "Request": { "RicPattern": "^CLc1$", "BondTypeCodes": null, "ContributorIds": null, "CountryCodes": null, "CurrencyCodes": null, "ExchangeCodes": ["759"], "FutureMonthCodes": null, "InstrumentTypeCodes": ["18"], "OptionMonthCodes": null, "OptionTypeCodes": null, "CouponRate": null, "StrikePrice": null, "ExpiryDate": null, "MaturityDate": null, "Range": { "Start": "2022-01-31T00:00:00.000Z", "End": "2022-01-31T23:59:59.999Z" }
} }It did not result in any hits:
@{ "@odata.context": "https://selectapi.datascope.refinitiv.com/RestApi/v1/$metadata#Collection(DataScope.Select.Api.Search.HistoricalSearchResult)", "value": [] }
However, if I remove ExchangeCodes and InstrumentTypeCodes filter:
{ "Request": { "RicPattern": "^CLc1$", "BondTypeCodes": null, "ContributorIds": null, "CountryCodes": null, "CurrencyCodes": null,
"ExchangeCodes": null,
"FutureMonthCodes": null,
"InstrumentTypeCodes": null,
"OptionMonthCodes": null, "OptionTypeCodes": null, "CouponRate": null, "StrikePrice": null, "ExpiryDate": null, "MaturityDate": null, "Range": { "Start": "2022-01-31T00:00:00.000Z", "End": "2022-01-31T23:59:59.999Z" }
} }The result on the exact RIC search is as expected:
@{ "@odata.context": "https://selectapi.datascope.refinitiv.com/RestApi/v1/$metadata#Collection(DataScope.Select.Api.Search.HistoricalSearchResult)", "value": [ { "Identifier": "CLc1", "IdentifierType": "Ric", "Source": "", "Key": "VjF8MHgzMDAwMDAwMDAwMDAwMDAwfDB4MzAwMDAwMDAwMDAwMDAwMHx8fHx8fHxDTGMxfA", "Description": "Historical Instrument", "InstrumentType": "Unknown", "Status": "Valid", "DomainCode": "6", "FirstDate": "1996-01-03T00:00:00.000Z", "LastDate": "2022-02-03T00:00:00.000Z", "History": [] } ] }
This, to me, this suggests that this type of instruments, ExchangeCode and InstrumentTypeCode may be undefined or differ from the requested.
I am going to try to try to find out more about ExchangeCodes filtering for this type of instrument (for example, I can filter "IBM.N" on ExchangeCodes as expected), internally, and get back with any relevant information.
Hope this information is of help
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
- 687 Datastream
- 1.4K DSS
- 622 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
- 255 ETA
- 557 WebSocket API
- 38 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
- 276 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
- 680 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
- 105 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 91 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛