For a deeper look into our DataScope Select REST API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
69 10 19 19

Response fields in search requests

Running this of your postman examples:Tuto-11a: Search by RIC

Is is possible to add additional fields to the response like getting RIC, ISIN, Currency code, etc. in the response? At the moment we are just getting a fixed amount of response fields like these:

"Identifier": "VOD.L",
"IdentifierType": "Ric",
"Source": "LSE",
"Key": "VjF8MHgwMDAzZGQwMDE0OGU3NDMwfDB4MDAwM2RjMDAzNDdjOTEwNnxMU0V8RVFRVXxFUVRZfHxFfHxWT0QuTHwwNjkx",
"Description": "VODAFONE GROUP ORD",
"InstrumentType": "EquityQuote",
"Status": "Valid"

Of course the Identifier field can be changed by defining a prefered identifer type, but is is possible to generally add additional response fields?

Thx in advance!

dss-rest-apidssdatascope-select
icon clock
10 |1500

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

Upvotes
Accepted
13.7k 26 8 12

@Philipp

The output field set of a Search (as wll as EquitySearch and FuturesAndOptionsSearch) is not configurable. But as filter criteria of those 2 search calls you can use multiple exchange codes, and/or a single currency code. Here is the body of an equity search based on Tutorial 12, modified for your use case:

{
    "SearchRequest": {
        "AssetStatus": "Active",
        "AssetCategoryCodes": null,
        "SubTypeCodes": null,
        "CurrencyCodes": ["GBp"],
        "CompanyName": null,
        "Description": null,
        "DomicileCodes": null,
        "ExchangeCodes": [
            "CHI", "GER", "LSE", "OTC", "PAR", "STO"
        ],
        "FairValueIndicator": null,
        "FileCodes": null,
        "GicsCodes": null,
        "OrgId": null,
        "Ticker": null,
        "Identifier": "GB00BH4HKS39",
        "IdentifierType": "Isin",
        "PreferredIdentifierType": "Ric"
    }
}

Would that be of any help ?

icon clock
10 |1500

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

Thanks for your help!

That will work for us, we will then have to make multiple requests, each with only one currency code (e.g. first for GBP and then for GBp).

Thx!

Last question then: Would it be possible to extend the EquitySearch and FuturesAndOptionsSearch result by currency code?

@Philipp

You would like us to add the currency code to the results ? Considering you can make a search using a (single) currency code, what advantage would this bring ?

I could then send a list of currency codes in the request (e.g. GBP and GBp) and for example get only one result. I can then extract the RIC and know with currency this RIC is using. We even have the situation, were we are searching RICs with longer lists of currency codes. It is for us very important to have the RIC exactly in the currency the customers is trading in.

As you described we can make this with multiple requests too. The currency in the response would just avoid, multiple requests. I see benefits in less server load, performance and development efforts on our side.

Show more comments
Upvotes
13.7k 26 8 12

@Philipp, as far as I know, the set of fields returned by a search is not configurable.

That said, for the specific use case you mention (i.e. getting other instrument codes or the currency), you can use a Terms and Conditions extraction to retrieve them. See the REST API Tutorial 7. Note that this is one of several possibilities, as there are several extraction types that can deliver multiple instrument codes.

icon clock
10 |1500

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

Thanks a lot, that was really helpful.

Still we have a problem with this extraction type. When we for example request for ISIN GB00BH4HKS39 we only get one result, but this ISIN is linked to a lot of RICs at different exchanges and in different currencies. So this extraction type if fine to check the currency for a single or multiple RICs, but still we need to make two separate calls to search a RIC for a known ISIN.

@Philipp

The T&C extraction call (illustrated in REST API Tutorial 7) call can return many fields, including the Exchange Code and Currency Code, but it returns only the primary RIC for each ISIN (VOD.L for this particular case). An instrument search (illustrated in REST API Tutorial 11) will return all RICs for a given ISIN, but the output field set is not configurable.

Thx for your help. So, there is no combination of both features at the moment? In that case we will implement two calls of the REST API, that will work but be a bit slower / cause more overhead.

Do you think it would be possible to extend the existing instrument search by one more field (currency code) in the near future?

Show more comments

I just tried to use this request with an option RIC. It was not delivering a result, maybe you can help/explain this?
POST [...] /Extractions/Extract
Body: "@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#Collection(ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.ExtractionRow)",

[..]

"ContentFieldNames": [ "RIC", "Currency Code", "Exchange Code", "Exchange Code List"

[..]

"Identifier": "DTEGn150bX6.EX", "IdentifierType": "Ric"

[..]

Other RICs are working fine, but this option RIC is returning:

"Identifier": "DTEGn150bX6.EX", "Error": "Not found",

I see the same issue. I can manage to get result with the following steps. However, the other fields except "RIC" return null. It's likely because the RIC is inactive. The extraction note also states "WARNING: Instrument 'DTEGn150bX6.EX' is only valid for Intraday extractions"

1) Selected the "Allow Import of..." in the User Preferences of DSS Web UI.

2) Once the request is created, please add the UseUserPreferencesForValidationOptions: true in the "IdentifierList".

"IdentifierList": {...,
    "UseUserPreferencesForValidationOptions": true
userpreferences.jpg (68.7 KiB)
Upvotes
69 10 19 19

What we do is we have a long list of ISINs (+Exchange Code/Currency Code) each day, lets say 700. And we want to find the related RICs. So best for us would be to have a search extraction type with at least these three search fields (that is already available) and that is giving us a list with RICs and all the fields that where in our search request (exchange code and currency in this case). In some special situations like with currencies GBP and GBp we then can determinate with currency is related to the RIC without performing an additional extraction. It there an existing way to acive this? Is it possible to extend the "Search/EquitySearch" extraction to show all the fields we passed in a parameters as well in the response?

Thanks a lot in advance!

icon clock
10 |1500

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