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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
3 0 1 2

Search with DSS REST API for instruments available from a specific source

I am looking for a way to resolve a security CUSIP/SEDOL/ISIN into a RIC published by a specific pricing source. From the DSS Java examples I see the /Extractions/InstrumentSearch request returns this information but provides a list of RICs with different sources. I am interested only in one specific source. From the DSS API reference I see that the Source field is available, but whenever I add it to my REST call I get back a "Bad request" response.

Any idea what I am doing wrong? The snippet below shows the REST call construction.

HttpPost httppost = new HttpPost(urlHost + "/Extractions/InstrumentSearch/");

httppost.addHeader("content-type", "application/json;odata.metadata=minimal"); httppost.addHeader("Authorization", "Token "+sessionToken);

JSONObject searchJSONObject = new JSONObject(); searchJSONObject.put("IdentifierType", "Cusip");

searchJSONObject.put("Identifier", "912803AK9");

searchJSONObject.put("Source", "TWB");

JSONArray jsonArray = new JSONArray();

jsonArray.put("GovCorp");

searchJSONObject.put("InstrumentTypeGroups", jsonArray);

searchJSONObject.put("PreferredIdentifierType", "Ric");

searchJSONObject.put("MaxSearchResult", 10);

Thanks.

dss-rest-apidatascope-selectdssrest-api
icon clock
10 |1500

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

Upvotes
Accepted
1.1k 4 3 5

I believe you may be mixing what is a valid parameter between different requests. There is no specification for InstrumentSearch to be passed a limiting Source:

https://hosted.datascopeapi.reuters.com/RestApi.Help/Context/Value?ctx=Search&opn=InstrumentSearch&vlu=AllInstrumentSearchRequest

icon clock
10 |1500

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

Thanks for the info. I was looking here https://hosted.datascopeapi.reuters.com/RestApi.Help/Context/Operation?ctx=Extractions&opn=InstrumentSearch

It looks like I confused the parameter and the response properties of the Identifier element.

So is there a way to filter by source using the API at all?

@Rick WeyrauchIs

Does the API support querying from a specific source, or is response filtering the only way?

Thanks.

"There is no specification for InstrumentSearch to be passed a limiting Source" was intended to mean that it does not exist; and it has not existed in any variation of the application GUI or API to date - it is not just a REST API limitation.

Response filtering is the only current option.

It is of course a valid product enhancement to request, but I am not sure if we have a good way to move forum topics over to product Management as a formal enhancement request. I also have no idea where it would fit on the priority list.

Thanks. I'll raise it with our account manager.

Upvotes
13.7k 26 8 12

It should not be hard to write a method to filter the results on the value of the Source field.

icon clock
10 |1500

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

Certainly I could filter the result, but I wanted to avoid the processing cost on the service side to process a larger result set, and also the additional processing on the client side to throw out results I know I am not going to use.

I agree totally, if you are making large numbers of queries, those are 2 valid points !

Click below to post an Idea Post Idea