Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • TRTH /
avatar image
REFINITIV
Question by mohamed.hisham · Apr 11 at 11:44 AM · trth-rest-api

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

}}

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Reply

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by zoya faberov · Apr 11 at 04:15 PM

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
}
}
Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
9 People are following this question.

Related Questions

Historic data fields for a product

RTH - Historical Criteria Search for continuation RICs

Timestamp in Tick History Historical Search API

Why does this RIC not follow RIC rules?

Python code to pull the TimeAndSales RIC data

  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • FX Venues
    • FX Trading – RFQ Maker
  • Intelligent Tagging
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open Calais
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • RDMS
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • Workspace SDK
    • Element Framework
    • Grid
  • World-Check Data File
  • Yield Book Analytics
  • 中文论坛
  • Explore
  • Tags
  • Questions
  • Badges