How best to filter invalid instruments in HistoricalSearch?
I am currently trying to query historical instruments on the Hong Kong exchange. I am using the following query:
Search/HistoricalCriteriaSearch
{
"Request": {
"RicPattern": ".HK$",
"Range": {
"Start": "2010-11-07T00:00:00.000Z",
"End": "2010-11-08T00:00:00.000Z"
}
}
}
This returns to me a bunch of duplicate values for each stock like
'0001.HK',
'0001.HK',
'0001.HK',
'0001os.HK',
'0001os.HK',
'0001stat.HK',
'0001ta.HK'
The duplicates contain no real data, only the first instrument is correct. How best can I filter these invalid results in HistoricalCriteriaSearch?
Thanks
Best Answer
-
I have used the request posted in the question to verify the data. The result is different.
I couldn't find the below RICs in the returned response.
'0001.HK',
'0001.HK',
'0001.HK',
'0001os.HK',
'0001os.HK',
'0001stat.HK',
'0001ta.HK'I found 10001.HK, 10001os.HK, and 10001ta.HK and there is no duplicated entry.
{
"Identifier": "10001.HK",
"IdentifierType": "Ric",
"Source": "",
"Key": "VjF8MHgzMDAwMDAwMDAwMDAwMDAwfDB4MzAwMDAwMDAwMDAwMDAwMHx8fHx8fHwxMDAwMS5IS3w",
"Description": "Historical Instrument",
"InstrumentType": "Unknown",
"Status": "Valid",
"DomainCode": "6",
"FirstDate": "2007-12-13T00:00:00.000Z",
"LastDate": "2011-03-20T00:00:00.000Z",
"History": []
},
{
"Identifier": "10001os.HK",
"IdentifierType": "Ric",
"Source": "",
"Key": "VjF8MHgzMDAwMDAwMDAwMDAwMDAwfDB4MzAwMDAwMDAwMDAwMDAwMHx8fHx8fHwxMDAwMW9zLkhLfA",
"Description": "Historical Instrument",
"InstrumentType": "Unknown",
"Status": "Valid",
"DomainCode": "6",
"FirstDate": "2007-12-13T00:00:00.000Z",
"LastDate": "2011-03-20T00:00:00.000Z",
"History": []
},
{
"Identifier": "10001ta.HK",
"IdentifierType": "Ric",
"Source": "",
"Key": "VjF8MHgzMDAwMDAwMDAwMDAwMDAwfDB4MzAwMDAwMDAwMDAwMDAwMHx8fHx8fHwxMDAwMXRhLkhLfA",
"Description": "Historical Instrument",
"InstrumentType": "Unknown",
"Status": "Valid",
"DomainCode": "6",
"FirstDate": "2010-09-13T00:00:00.000Z",
"LastDate": "2011-03-20T00:00:00.000Z",
"History": []
},Could you please share the full response and what do you mean by invalid instruments?
0
Answers
-
Hi,
I would like to ignore any instruments that are not real equities, ie '0001os.HK', '0001ta.HK'.
I just want to retrieve '0001.HK'. Is this possible?
0 -
I found that you have submitted the question to the TRTH V2 support team. Therefore, I have posted the response from the support team for references.
We can use the “Historical Criteria Search” to pull all RICs on a given exchange. In the criteria, we may use the exchange code (e.g. HKG, LSE, etc)
The steps involved are – Go to the Historical Search --> Criteria --> Exchanges --> HKG --> Search.0 -
You may use HistoricalReferenceExtractionRequest to filter those invalid RICs.
After getting all RICs from the criteria search, you can send those RICs to HistoricalReferenceExtractionRequest. Some content fields in HistoricalReferenceExtractionRequest may be used to filer those invalid RICs.
For example, for '0001os.HK', '0001ta.HK', and '0001.HK', you may use a "Trading Status" or "Asset Category" field.
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
- 25 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
- 716 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 中文论坛