Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • TRTH /
avatar image
Question by ricardo.siguero · Aug 28, 2017 at 08:31 AM · trth rest apidss soap api

verifyRICS (SOAP) implementation on REST API (TRTHv2)

Hi,

We are migrating from SOAP API to REST API (TRTHv2) and we'd like to know how to get the same functionality of the verifyRICs method (SOAP) on the new REST API:

import com.thomsonreuters.tickhistory.webservice.TRTHApi;

...

private TRTHApi api;

...

VerifyRICsResult result =  api.verifyRICs(range, new ArrayOfInstrument(instrumentList), true);

Thanks in advance

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

4 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by Christiaan Meihsl · Aug 28, 2017 at 09:04 AM

@esrism, as far as I know there is no equivalent API call, but there are different possibilities for verifying RICs:

1) To verify the current validity of a RIC, you can search for it, using a POST to endpoint Search/InstrumentSearch.

Body:

{
  "SearchRequest": {
    "IdentifierType": "Ric",
    "Identifier": "CARR.PA",
    "PreferredIdentifierType": "Ric"
  }
}

If the instrument is currently valid you will receive something like:

{
    "@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#Collection(ThomsonReuters.Dss.Api.Content.ValidatedInstrument)",
    "value": [
        {
            "Identifier": "CARR.PA",
            "IdentifierType": "Ric",
            "Source": "PAR",
            "Key": "VjF8MHgwMDAzZGQwMDE0Yjg0ZTNjfDB4MDAwM2RjMDA0YzFjYWYyMHxQQVJ8RVFRVXxFUVRZfE9EU0h8RXx8Q0FSUi5QQXwwMDUy",
            "Description": "CARREFOUR ORD",
            "InstrumentType": "EquityQuote",
            "Status": "Valid"
        }
    ]
}

If it is invalid, the returned field value will be empty. More on this call in REST API Tutorial 16.

2) To verify the historical validity of a RIC, you can use endpoint Search/HistoricalSearch.

Body (contains the date range where you want to check validity):

{
  "Request": {
    "Identifier": "CARR.PA",
    "IdentifierType": "Ric",
    "Range": {
      "Start": "2017-01-01T00:00:00.000Z",
      "End": "2017-01-01T00:00:00.000Z"
    }
  }
}

More on historical search in REST API Tutorial 13.

3) If you append instruments to an instrument list, the response will tell you how many are valid, and deliver error messages for those that are not, like:

"Messages": [
    {
        "Severity": "Info",
        "Message": "RIC, @@@ (not found)"
    }
]

More on this in REST API Tutorial 12.

Edit: added possibility:

4) Perform a validation on a set of instruments, using endpoint Extractions/InstrumentListValidateIdentifiers.

Body (only the first instrument is valid in this example):

{
  "InputsForValidation": [
    {
      "Identifier": "191216100",
      "IdentifierType": "Cusip"
    },{
      "Identifier": "JUNK.RIC",
      "IdentifierType": "Ric"
    },{
      "Identifier": "INVALID",
      "IdentifierType": "Ric"
    }
  ],
  "KeepDuplicates": false
}

Result:

{
    "@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#ThomsonReuters.Dss.Api.Extractions.SubjectLists.InstrumentsValidateIdentifiersResult",
    "ValidatedInstruments": [
        {
            "Identifier": "191216100",
            "IdentifierType": "Cusip",
            "Source": "NYS",
            "Key": "VjF8MHgwMDAzZGQwMDE0ZjkxODJifDB4MDAwM2RjMDA0YTA0NjlmOHxOWVN8RVFRVXxFUVRZfE9EU0h8RXx8S08uTnwwMDc3",
            "Description": "COCA-COLA ORD",
            "InstrumentType": "EquityQuote",
            "Status": "Valid"
        }
    ],
    "ValidationResult": {
        "ValidInstrumentCount": 1,
        "OpenAccessSegments": [],
        "StandardSegments": [
            {
                "Code": "E",
                "Description": "Equity",
                "Count": 1
            }
        ],
        "ValidationDuplicates": [],
        "Messages": [
            {
                "Severity": "Info",
                "Message": "RIC, JUNK.RIC (not found)"
            },
            {
                "Severity": "Info",
                "Message": "RIC, INVALID (not found)"
            }
        ]
    }
}

Hope this helps

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
Answer by ricardo.siguero · Aug 30, 2017 at 02:21 AM

Thank you, @Christiaan Meihsl for the alternatives (REST-oriented) to verifyRICs (SOAP-oriented) provided to us.

Focusing on the first one, we identified some requirements that are not currently met. Let me share the most important one with all of you:

The most important requirement, and having in mind what api.veriyRICs does, the currency code of each instrument should be returned in the response, which does not correctly occurs:


{
    "@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": "SAN.MC",
            "IdentifierType": "Ric",
            "Source": "MCE",
            "Key": "VjF8MHgwMDAzZGQwMDEzNzlmZjRifDB4MDAwM2RjMDA0ODI5Mzk4N3xNQ0V8RVFRVXxFUVRZfE9EU0h8RXx8U0FOLk1DfDAxMDE",
            "Description": "BANCO SANTANDER 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": "VjF8MHgwMDEwMmMyNmZlYzUwZTJmfDB4MDAxMDJjZDdiY2U1MGViY3xFSlZ8R0NCRHxHT1ZUfEdCTkR8R3xOfFVTMTBZVD1SUlBTfEdPUlA",
            "Description": "UST    2.250 08/15/27",
            "InstrumentType": "GovCorpBond",
            "Status": "Valid"
        }
    ]
}

The shown above is the result of calling the /Search/InstrumentSearch resource with the following JSON body:

{
  "SearchRequest": {
    "InstrumentTypeGroups": [
      "CollatetizedMortgageObligations",
      "Commodities",
      "Equities",
      "FuturesAndOptions",
      "GovCorp",
      "MortgageBackedSecurities",
      "Money",
      "Municipals",
      "Funds"
    ],
    "IdentifierType": "Ric",
    "Identifier": "US10YT=RRPS,JPY=,IBM.N, INVALID.RIC, SAN.MC",
    "PreferredIdentifierType": "Ric"
  }
}<br>

The next screenshot shows, from the API reference tree, the complete structure of the response message, where a CurrencyCode field is present

Is there a way of getting the missing currency code?

Thanks, in advance, for your help.


reutersqaverifyrics01.png (85.1 KiB)
Comment

People who like this

0 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Christiaan Meihsl ♦♦ · Aug 31, 2017 at 08:39 AM 1
Share

@ricardo.siguero, I'm sorry, it is not possible, the returned field list is not configurable, and all those available are those you received. The API Reference Tree is incorrect.

avatar image
Answer by ricardo.siguero · Aug 30, 2017 at 05:07 AM

Hi,

As an addition to my previous post from today, just share with you that we also need to specify a date range to be used in the RICs validation.

For that reason, we took a look at the second alternative @Christiaan Meihsl provide us (the

Search/HistoricalSearch resource).

{
  "Request": {
    "Identifier": "AAPL.OQ",
    "IdentifierType": "Ric",
    "Range": {
      "Start": "2017-08-24T00:00:00.000Z",
      "End": "2017-08-24T23:59:59.000Z"
    }
  }
}

Unfortunately, the data returned by the response didn't contain the currency code for every instrument identifier:

{
    "@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#Collection(ThomsonReuters.Dss.Api.Search.HistoricalSearchResult)",
    "value": [
        {
            "Identifier": "AAPL.OQ",
            "IdentifierType": "Ric",
            "Source": "",
            "Key": "VjF8MHgzMDAwMDAwMDAwMDAwMDAwfDB4MzAwMDAwMDAwMDAwMDAwMHx8fHx8fHxBQVBMLk9RfA",
            "Description": "Historical Instrument",
            "InstrumentType": "Unknown",
            "Status": "Valid",
            "DomainCode": "6",
            "FirstDate": "2002-07-20T00:00:00.000Z",
            "LastDate": "2017-08-30T00:00:00.000Z",
            "History": []
        }
    ]
}

The HistoricalSearchResult data structure does not contain such attribute (as seen on it's related entry on the API's reference), so the only approach to be followed (unless a more efficient one was raised) would be:

  1. Using Search/HistoricalSearch forverifying the whole of instrument identifier, then
  2. Iterate over the valid identifiers' list and, for every id, invoke to a different API resource (that we don't know at the time of writing this post) that can provide us its related currency code at a given date.

Thanks, in advance, for all your feedback and help.

Comment

People who like this

0 Show 2 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Christiaan Meihsl ♦♦ · Aug 31, 2017 at 08:41 AM 1
Share

@ricardo.siguero, to retrieve the currency code at a given date, you can use a Historical Reference Extraction. This is described in REST API Tutorial 10.

avatar image
ricardo.siguero Christiaan Meihsl ♦♦ · Sep 01, 2017 at 02:53 AM 0
Share

Thank you, @Christiaan Meihsl , for your help.

avatar image
Answer by richard.sharrock · Oct 11, 2017 at 07:28 AM

We also need to specify a date range to be used in validating RICs, however we need to validate a large number of RICs (a few thousand) over a common date range in the most efficient way. What would be the proposed way we do this?

Method 2) above is the closest match to our requirement, however it would mean thousands of calls to Search/HistoricalSearch which doesn't feel very efficient.

Comment

People who like this

0 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Christiaan Meihsl ♦♦ · Oct 12, 2017 at 08:48 AM 0
Share

@richard.sharrock, a date range implies you want to do a historical search, i.e. use method 2) above, which is only possible 1 instrument at a time. The call returns a result fairly quickly (with Postman on my PC I observe a mean time slightly less than 1 sec/call). Depending on how much your instrument list and date range vary from day to day, you might want to investigate caching some results from day to day, to optimize performance.

Method 4) above can validate multiple RICs, but will not take a date range.

I do not see other possibilities.

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
11 People are following this question.

Related Questions

TRTH V2 TickHistoryTimeAndSalesExtractionRequest Trade Price Currency

TRTH Python API

is there anyway to validate large no of instruments in TRTH REST Api ?

Documentation for Extractions.ExtractionRequests.TickHistoryTimeAndSalesExtractionRequest

Retrieving TickHistoryRaw data for economic series via DSS REST API

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges