Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • DSS /
avatar image
Question by BTh · Nov 20, 2018 at 11:17 AM · rest apiextraction result

Detect securities unknown to Reuters

When requesting data for a security through its ISIN over the DSS REST API, I find out very late that actually that security is "not in the dictionary". This happens only through a bad error that I trap when trying to get the row.DynamicProperties.Item(<field name>). It suddenly tells me that the row object is not defined anymore !

But the real reason can be found by using the exception's InnerException.GetBaseException.Message, which says: "The given key was not present in the dictionary."

Isn't there a "faster" way for me to find out about that, right after getting the result of my request ? A kind of status of the request's result ?

People who like this

0 Show 1
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.

avatar image
REFINITIV
Christiaan Meihsl ♦♦ · Nov 20, 2018 at 12:25 PM 0
Share

@bernard.thouin, could you please post the data request you made, with the incriminated ISIN ? That will help the community to investigate.

4 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by Christiaan Meihsl · Nov 21, 2018 at 04:05 AM

@bernard.thouin, this is why I like Postman, it delivers the result of a call without any treatment, ideal for an investigation. Running a Ratings Extraction request for ISIN GB00BDXG0P01 delivers the following response body, which explains the issue:

 {
    "@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.ExtractionResult",
    "Contents": [
        {
            "IdentifierType": "Isin",
            "Identifier": "GB00BDXG0P01",
            "Error": "Not found"
        }
    ],
    "Notes": [
        "All identifiers were invalid.  No extraction performed."
    ]
}
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 BTh · Nov 21, 2018 at 03:08 AM

Hi Christiaan

Here my request:

extractionRequest = New RatingsExtractionRequest With {.IdentifierList = instrumentList, .ContentFieldNames = fieldNames,

.Condition = New RatingsCondition With {

.RatingLevel = New RatingLevel With {.IsIssue = True, .IsIssuer = False},

.DaysAgo = 7,

.ReportDateRangeType = ReportDateRangeType.Last,

.IncludeInstrumentsWithNoRatings = True,

.RatingSourcesCodes = ratingCodes}}

With:

  • Identifier list for security with ISIN GB00BDXG0P01, Ident. type Isin
  • Filed list starting with ISIN, then Asset ID. Actually irrelevant, as the error occurs on the first field, the ISIN

The code than triggers the error is this:

' Extract value

sValue = row.DynamicProperties.Item(extractionRequest.ContentFieldNames.Item(i))

which normally returns data, but for that ISIN, it trggers an error "row is not defined", but the catch section of the Try surrounding the whole processing of the request's result gets this:

Catch ex As Exception

ex.Message = "The given key was not present in the dictionary."

I have quite a bit of code before that, which "decodes" what's in the result rows, but I get no error until that point. The result shows me 1 row with 12 fields, which is what I requested, I can decode the row.Identifier and the row.IdentifierType, the first field name using

extractionRequest.ContentFieldNames.Item(0)

but then the whole thing bombs on the retrieval of the row.DynamicProperties of the first field.

HTH

Bernard

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
REFINITIV
Answer by veerapath.rungruengrayubkul · Nov 21, 2018 at 03:46 AM
@bernard.thouin

It seems that the ISIN GB00BDXG0P01 is not valid, so the result doesn't contain any data including the ISIN field. As result, the "ISIN" key is not available in the dictionary, and then cause the error when you try to access the field directly.

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 BTh · Nov 28, 2018 at 06:21 AM

Ah yes, seeing your "Error" label, I discovered I could test on row.Error for the value "Not found", and therefore trap theses non-existing ISINs as the first thing to do when processing each result row. That works fine :)

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.

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 >
10 People are following this question.

Related Questions

Some Instruments not returning correct data for Composite Extraction

Hi, is there any c# sample code available for Stored & scheduled extraction. I have created a instrument list and report tamplate on web GUI and i just want to download it.

EOD price at a specific stock exchange

How to use CorporateActions extractions

We are able to extract daily CDOR rates. But we need to extract CDOR rates for specific date ? is it possible to extract past CDOR rates from datascope using Rest API? Is there any sample code to retrieve old CDOR rates from datascope using 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
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • 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