Hi,
I have read the documentation but still looking for answers.
I need to limit the result, by example for below POST request it takes 439680 ms to a size of 9.86 MB.
POST /RestApi/v1/Search/HistoricalCriteriaSearch HTTP/1.1
Host: select.datascopeapi.extranet.reuters.biz
Content-Type: application/json
Authorization: Basic OTAxODEwMDpMYWgzNjcwIWY4RDU=
cache-control: no-cache
Postman-Token: 0532c3cc-e48d-4244-a8bd-f033b4ced528
{
"Request": {
"RicPattern": "SEK",
"Range": {
"Start": "2018-11-20T00:00:00.000Z",
"End": "2018-11-21T00:00:00.000Z" } }}
Results as:
"Identifier": "#####T#SEKAB6SFM"
And a lot more noise.
I wish to specify additional parameters in the request such as: "Status" and "IdentifierType". Or similar in order to narrow the result to less noise.
Also I don't understand what "Start" in "Range" is expected to provide? My above request returns by example:
"FirstDate": "2011-06-10T00:00:00.000Z",
"LastDate": "2018-11-27T00:00:00.000Z",
Even if I specified 2018-11-20 to 2018-11-21?
Kind regards,
Johan
Your request
It specifies only 2 criteria:
RicPattern - Return all RIC names that contain the string "SEK".
Range - Return all instruments that were active during that time period.
So your query returns all instruments that were active on 20th November 2018, where the RIC contains "SEK". That will deliver many results, hence the long extraction time you observe.
The returned FirstDate / LastDate are the first / last dates where each instrument was active.
Filtering results
You cannot define:
That said, there is a whole set of criteria you can use to limit results:
RicPattern, BondTypeCodes, ContributorIds, CountryCodes, CurrencyCodes, DomainCodes, ExchangeCodes, FutureMonthCodes, InstrumentTypeCodes, OptionMonthCodes, OptionTypeCodes, CouponRate, StrikePrice, ExpiryDate, MaturityDate.
A few comments on these filters:
Note on the RicPattern regular expression
As per this thread, historical criteria search currently supports only the following regular expression patterns:
You can escape special characters using a double slash, i.e. "\\"
Example: If you want to use a "." as a literal dot (and not as "any character"), then you need to escape it with , like in "\\.N$" to select any RIC that ends with ".N".
Example query
Retrieve Energy Market Statistics instruments containing "RED" in the RIC, in Danish or Swedish krona:
{ "Request": { "RicPattern": "RED", "BondTypeCodes": null, "ContributorIds": null, "CountryCodes": null, "CurrencyCodes": [ "208", "752" ], "DomainCodes": null, "ExchangeCodes": null, "FutureMonthCodes": null, "InstrumentTypeCodes": [ "133" ], "OptionMonthCodes": null, "OptionTypeCodes": null, "CouponRate": null, "StrikePrice": null, "ExpiryDate": null, "MaturityDate": null, "Range": { "Start": "2018-11-20T00:00:00.000Z", "End": "2018-11-21T00:00:00.000Z" } } }
For more information
The TRTH REST API Tutorial 14 and the REST API Reference tree provide information you might find useful.
Hope this helps.
Thank you Christiaan for the extensive answer,
I will try write a logic using regular expressions and share result in case of success, for my specific use case. Which is big lists of trades with none- to limited static data in first instance. Where we want to avoid develop too much logic towards internal golden source copies.
Kind regards,
Johan