While using HistoricalCriteriaSearch or FuturesAndOptionsSearch API in TRTH

While using HistoricalCriteriaSearch or FuturesAndOptionsSearch API in TRTH, I was wondering if it is possible to specify a regex style identification in the 'Identifier' key,
e.g. If i want the results for HSI*D2.HF and HSI*P2.HF in the same search request, how would I specify it? Example RIC expected in output HSI14600D2.HF
What changes do I need to make to the below code:
https://selectapi.datascope.refinitiv.com/RestApi/v1/Search/HistoricalCriteriaSearch
{"Request":
{"Range":
{"End":"2022-12-10T23:59:59.999",
"Start":"2022-04-01T00:00:00.000"},
"RicPattern":"^HSI[ABCDEFGHIJKLMNOPQRSTUVWXYZ][D2.HF]$",
"ExpiryDate":null,
"OptionMonthCodes":null,
"OptionTypeCodes":null,
"CouponRate":null,
"StrikePrice":null,
"MaturityDate":null,
"BondTypeCodes":null,
"ContributorIds":null,
"CountryCodes":null,
"CurrencyCodes":null,
"ExchangeCodes":null,
"FutureMonthCodes":null,
"InstrumentTypeCodes":null
}}
Best Answer
-
Hello @mohamed.hisham ,
You could specify it with HistoricalCriteriaSearch :
{{protocol}}{{host}}{{api}}Search/HistoricalCriteriaSearch
{"Request":
{"Range":
{"End":"2022-12-10T23:59:59.999",
"Start":"2022-04-01T00:00:00.000"},
"RicPattern":"^HSI[0-9]{5}[D,P]2.HF$",
"ExpiryDate":null,
"OptionMonthCodes":null,
"OptionTypeCodes":null,
"CouponRate":null,
"StrikePrice":null,
"MaturityDate":null,
"BondTypeCodes":null,
"ContributorIds":null,
"CountryCodes":null,
"CurrencyCodes":null,
"ExchangeCodes":null,
"FutureMonthCodes":null,
"InstrumentTypeCodes":null
}}If you are looking to use FuturesAndOptionsSearch- it is more aligned with the nature of the instrument- Option.
Letters D and P denote expiration months. I.e. April, May, etc. and you would be looking for a specific range of expiration months. So to look up the expiration date range that you require, rather then a discrete list of months, could be simple:
{{protocol}}{{host}}{{api}}Search/FuturesAndOptionsSearch
"SearchRequest": {
"FileCodes": null,
"CurrencyCodes": null,
"ExchangeCodes": null,
"AssetStatus": "Active",
"StrikePrice": null,
"ExpirationDate": {
"@odata.type": "#DataScope.Select.Api.Search.DateRangeComparison",
"From": "2022-04-01T00:00:00.000Z",
"To": "2022-06-30T00:00:00.000Z"
},
"IdentifierType": "RICRoot",
"Identifier": "HSI*",
"FuturesAndOptionsType": "Option
}
}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
- 693 Datastream
- 1.5K DSS
- 629 Eikon COM
- 5.2K Eikon Data APIs
- 13 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 5 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 561 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
- 25 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 281 Open PermID
- 46 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 2K Refinitiv Data Platform
- 732 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
- 96 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛