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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
1 1 0 0

How to filter various asset type based on the most primary market

Hi,


I am using Refinitiv Data Scope Select API for in my project and want to filter out various asset types based on data received from Refinitiv.

<add key="ReutersWSRequestAllListings" value="true"/>

I have been using the above filter, for Refinitiv to send only One Silver copy for the instrument requested based on the fact that is traded on the most Primary Market .


No I need to disable this key and apply the filter manually . Can someone please help me determine the filter the is applied on the API when this key is set to "true".


Here is what I have for Bonds and Equities , would really appreciate if I can get this for various other asset types

if (Sources.Count(s => s.DataKind == ReutersRestWs_ReutersWsDataKind.Instrument && s.Composite != null && !string.IsNullOrEmpty(s.Composite.RIC) && s.Composite.RIC.Contains("=RRPS")) > 0)
{
 return Sources.Where(s => s.DataKind == ReutersRestWs_ReutersWsDataKind.Instrument && s.Composite != null && !string.IsNullOrEmpty(s.Composite.RIC) && s.Composite.RIC.Contains("=RRPS")).FirstOrDefault().AsEnumerable();
}
// Filter for Bonds to avoid filter Silver copy task
if (Sources.Count(s => s.DataKind == ReutersRestWs_ReutersWsDataKind.Instrument && s.Composite != null && !string.IsNullOrEmpty(s.Composite.RIC) && s.Composite.RIC.Contains("=FINR")) > 0)
{
 return Sources.Where(s => s.DataKind == ReutersRestWs_ReutersWsDataKind.Instrument && s.Composite != null && !string.IsNullOrEmpty(s.Composite.RIC) && s.Composite.RIC.Contains("=FINR")).FirstOrDefault().AsEnumerable();
}
// Filter for Equities to avoid filter Silver copy task
if (Sources.Count(s => s.DataKind == ReutersRestWs_ReutersWsDataKind.Instrument && s.Composite != null && !string.IsNullOrEmpty(s.Composite.RIC) && !string.IsNullOrEmpty(s.Composite.PrimaryTradingRIC) && (s.Composite.RIC == s.Composite.PrimaryTradingRIC)) > 0)
{
 return Sources.Where(s => s.DataKind == ReutersRestWs_ReutersWsDataKind.Instrument && s.Composite != null && !string.IsNullOrEmpty(s.Composite.RIC) && !string.IsNullOrEmpty(s.Composite.PrimaryTradingRIC) && (s.Composite.RIC == s.Composite.PrimaryTradingRIC)).FirstOrDefault().AsEnumerable();
}


Regards

Irshad


dss-rest-apidatascope-selectdssrest-apifilter
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.

Hello @mhir,

This looks to be your custom code, written around HTTP REST request to DSS WS, or with DSS .Net SDK that facilitates an HTTP REST request?

I think it would help us to better help you, to know which request you are issuing, underneath the custom code, if you could include the request, can be easier for us together to see what filtering capabilities are available, for that specific request.

Including the link to DSS Rest API Reference Tree just in case, the reference of all the available DSS requests, and once we know what request is in use, we can better understand the available fields and available value sets, at least from developer's perspective.

Alternatively, Refinitiv Content Helpdesk Online may be able to better advise you on content, especially if you can point which analogous request on DSS GUI yeilds the same result set, the DSS content experts can help to identify the available filters the best.

Hello @mhir

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?


If so please can you click the 'Accept' text next to the appropriate reply. This will guide all community members who have a similar question.

Thanks,


AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

1 Answer

· Write an Answer
Upvotes
Accepted
32.2k 40 11 20

Hello @mhir,

From a developer's perspective, as I asked what request you were running, here is what I had in mind, depending on what you are doing with the request, in terms of approach, it may be worthwhile to proceed via Instrument search, and determine the instrument types of your instruments. For example:

{
                {protocol}}{
                {host}}{
                {api}}Search/InstrumentSearch 
{
  "SearchRequest": {
    "InstrumentTypeGroups": [
      "CollatetizedMortgageObligations",
      "Commodities",
      "Equities",
      "FuturesAndOptions",
      "GovCorp",
      "MortgageBackedSecurities",
      "Money",
      "Municipals",
      "Funds"
    ],
    "IdentifierType": "Ric",
    "Identifier": "US10YT=RRPS,JPY=,IBM.N, INVALID.RIC",
    "PreferredIdentifierType": "Ric"
  }
}

and the result will reflect the type of the valid:

"@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#Collection(ThomsonReuters.Dss.Api.Content.ValidatedInstrument)",
    "value": [
        {
            "Identifier": "IBM.N",
            "IdentifierType": "Ric",
            "Source": "NYS",
            "Key": "VjF8MHgwMDAzZGQwMDEzNzlkNDYwfDB4MDAwM2RjMDA0YTAyNGZkOHxOWVN8RVFRVXxFUVRZfE9EU0h8RXx8SUJNLk58MDA3Nw",
            "Description": "INTERNATIONAL BUSINESS MACHINES ORD",
            "InstrumentType": "EquityQuote",
            "Status": "Valid"
        },
        {
            "Identifier": "JPY=",
            "IdentifierType": "Ric",
            "Source": "RCT",
            "Key": "VjF8MHgwMDEwMGIwMDAzMGE5MDEyfDB4MDAwM2RjMDAzNDcyZjc2ZXxSQ1R8TU5RVXxNT05ZfE1PTll8WXx8SlBZPXwwMTQz",
            "Description": "US Dollar/Japanese Yen FX Spot Rate",
            "InstrumentType": "MoneyMarketQuote",
            "Status": "Valid"
        },
        {
            "Identifier": "US10YT=RRPS",
            "IdentifierType": "Ric",
            "Source": "EJV",
            "Key": "VjF8MHgwMDEwMmNlZTdlNmEyNWUzfDB4MDAxMDJjNjAzNDkxMjVkY3xFSlZ8R0NCRHxHT1ZUfEdCTkR8R3xOfFVTMTBZVD1SUlBTfEdPUlA",
            "Description": "UST    0.875 11/15/30 When Iss",
            "InstrumentType": "GovCorpBond",
            "Status": "Valid"
        }
    ]
}

Search is not subject to extraction quota.

However, if you would like to determine the instrument type the way you discuss, from RIC name, we on the developers forum will not likely be of help, as the majority of this forum's members are Refinitiv API developers, the moderators are Refinitiv API experts.

For a customer with content-specific question, the best approach is to directly post them with Refinitiv Content Helpdesk Online they may be able to better advise you on content, especially if you can point which analogous request on DSS GUI yields the same result set, the DSS content experts can help to identify the available filters, if that approach is effective.

I hope this helps


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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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