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 /

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

avatar image
Question by cabissi · Jan 28, 2021 at 06:19 PM · dss-rest-apidssdatascope-select

DSS REST API extraction automatically flips the last character of my CUSIP code

I am trying to extract an instrument via REST API using the following request body:

{
    "ExtractionRequest": {
        "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.CompositeExtractionRequest",
        "ContentFieldNames": [
            "Instrument ID Type",
            "Instrument ID",
            "CUSIP",
            "CIN Code",
            "SEDOL",
            "OCC Code",
            "ISIN",
            "Ticker",
            "RIC",
            "Security Description",
            "Currency Code Scaled",
            "Country of Issuance",
            "Domicile",
            "Asset Type",
            "Asset Type Description",
            "Asset SubType",
            "Asset SubType Description",
            "Organizational SubType Code",
            "Organizational SubType Description",
            "Refinitiv Classification Scheme",
            "Refinitiv Classification Scheme Description",
            "Structured Security Flag",
            "Market Capitalization",
            "Issue Date",
            "Maturity Date",
            "Coupon Rate",
            "Next Pay Date",
            "Coupon Frequency",
            "Coupon Frequency Description",
            "Callable Flag",
            "Next Call Date",
            "Next Call Price",
            "Accrual Date",
            "Annualized Dividend Adjusted Gross Amount",
            "Day Count Code Description",
            "Underlying CUSIP",
            "Dividend 1 Ex Date",
            "Dividend 1 Record Date",
            "Exchange Description",
            "Exchange Code",
            "Put Call Flag",
            "Dividend Yield",
            "Trading Status"
        ],
        "IdentifierList": {
            "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
            "InstrumentIdentifiers": [
                {
                    "Identifier": "99QAUBI8I",
                    "IdentifierType": "Cusip"
                }
            ],
            "ValidationOptions": null,
            "UseUserPreferencesForValidationOptions": true
        }
    }
}

However the response shows me a different CUSIP code:

{
"@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.ExtractionResult",
    "Contents": [
        {
            "IdentifierType": "Cusip",
            "Identifier": "99QAUBI89",
            "Error": "Not found"
        }
    ],
    "Notes": [
        "All identifiers were invalid.  No extraction performed."
    ]
}

The last character in my original CUSIP is "I" but the CUSIP in the response is "9". Any idea why this happens? Thanks!

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.

7 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by Jirapongse · Jan 29, 2021 at 02:13 AM

@cabissi

It may relate to settings in the DSS User Preferences.

If I check only Allow Import of Unsupported Instruments into Instrument Lists,it returns:

{
    "@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.ExtractionResult",
    "Contents": [
        {
            "IdentifierType": "Cusip",
            "Identifier": "99QAUBI89",
            "Error": "Not found"
        }
    ],
    "Notes": [
        "All identifiers were invalid.  No extraction performed."
    ]
}

If I check both Allow Import of Unsupported Instruments into Instrument Lists and Allow Import of Historical Instruments,it returns:

{
    "@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.ExtractionResult",
    "Contents": [
        {
            "IdentifierType": "Cusip",
            "Identifier": "99QAUBI8I",
            "Error": "Not found"
        }
    ],
    "Notes": [
        "All identifiers were invalid.  No extraction performed."
    ]
}

Please verify your User Preferences in DSS.


1611886240500.png (146.7 KiB)
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 zoya faberov · Jan 28, 2021 at 08:09 PM

Hello @cabissi,

Does not sound right.

Just tried running the same request, the result for me was:

{
    "@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.ExtractionResult",
    "Contents": [
        {
            "IdentifierType": "Cusip",
            "Identifier": "99QAUBI8I",
            "Error": "Not found"
        }
    ],
    "Notes": [
        "All identifiers were invalid.  No extraction performed."
    ]
}

Could you please re-run the request on your side (would it make sense to submit the "naked" request with Postman, to avoid any inadvertent modification in code, subsequent to the request definition), to try to confirm if this result is consistent?

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 cabissi · Jan 28, 2021 at 08:33 PM

Hello,

Just tried again but still getting the same output with the last character of Cusip identifier changed to "9".

I also made up a C# function to test this out, just so taking Postman out of the picture.

public static async Task<bool> ExtractInstrumentData()
        {
            string token = await GetToken();

            try
            {
                // Create list of instrument identifiers
                var instrumentIdentifiers = new List<InstrumentIdentifier>
                {
                    new InstrumentIdentifier { Identifier = "99QAUBI8I", IdentifierType = "Cusip" }
                };

                // Extract instrument data
                var start = DateTime.Now;
                using (var request = new HttpRequestMessage(HttpMethod.Post, baseURL + "Extractions/ExtractWithNotes"))
                {
                    // Identifier list
                    var identifierList = new JObject
                    {
                        {"@odata.type", "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList" },
                        {"InstrumentIdentifiers", JArray.FromObject(instrumentIdentifiers) },
                        {"UseUserPreferencesForValidationOptions", "true"}
                    };

                    // Content fields
                    var fields = new List<string>
                    {
                        "Instrument ID Type",
                        "Instrument ID",
                        "CUSIP",
                        "CIN Code",
                        "SEDOL",
                        "OCC Code",
                        "ISIN",
                        "Ticker",
                        "RIC",
                        "Security Description",
                        "Trading Status"
                    };

                    // Extraction request
                    var extractionRequest = new JObject
                    {
                        {"@odata.type", "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.CompositeExtractionRequest" },
                        {"ContentFieldNames", JArray.FromObject(fields) },
                        {"IdentifierList", identifierList }
                    };

                    var requestBody = new JObject
                    {
                        {"ExtractionRequest", extractionRequest}
                    };

                    request.Content = new StringContent(JsonConvert.SerializeObject(requestBody), Encoding.UTF8, "application/json");

                    using (var client = new HttpClient(new HttpClientHandler() { UseCookies = false }))
                    {
                        client.Timeout = new TimeSpan(0, 10, 0);
                        client.DefaultRequestHeaders.Add("Authorization", "Token" + token);

                        using (var response = await client.SendAsync(request))
                        {
                            if (response.IsSuccessStatusCode)
                            {
                                Console.WriteLine($"Time spent on extraction: {(DateTime.Now - start).TotalMilliseconds} Milliseconds");
                                File.WriteAllText(@"C:\Temp\output\extraction_result.json", JObject.Parse(response.Content.ReadAsStringAsync().Result).ToString());
                            }
                            else
                            {
                                Console.WriteLine($"Error loading Refinitiv instrument: {response.Content.ReadAsStringAsync().Result}");
                                return false;
                            }
                        }
                    }
                }

                return true;
            }
            catch (Exception ex)
            {
                Console.WriteLine($"Error loading Refinitiv instrument: {ex.Message}");
                return false;
            }
        }

However the output is still the same:

{
  "@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.ExtractionResult",
  "Contents": [
    {
      "IdentifierType": "Cusip",
      "Identifier": "99QAUBI89",
      "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
REFINITIV
Answer by zoya faberov · Jan 28, 2021 at 11:41 PM

Hello @cabissi,

I am able to reproduce the issue using .Net RESTAPIExample application.

The modification does not happen when a raw request is submitted, such as Postman, it's being introduced by .Net SDK tier.

I have opened investigation case #09575187 on your behalf, you should hear back, from Tick History support, via email, shortly.

In the meantime, as a workaround, in my understanding, you have the option to submit the request as RIC identifier via .Net SDK, or submit it as CUSIP, without the use of .Net SDK.

I 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 cabissi · Jan 29, 2021 at 01:52 AM

Thanks for the update. However the modification does happen to me within Postman. Could you please clarify how I submit the "naked" request with Postman as you suggested above? Thanks!

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 zoya faberov · Feb 01, 2021 at 02:39 PM

Hello @cabissi,

Is the question still relevant?

Thanks to my colleague @jirapongse.phuriphanvichai, we have a good idea what is happening here.

In addition to verifying DSS preferences per id, as described above, please also make sure, in DSS example app request c# code, to modify the request to absorb user preferences, for example (seen in bold):

 var extractionRequest = new CompositeExtractionRequest
            {                     
            IdentifierList = InstrumentIdentifierList.Create(
                    new[] { new InstrumentIdentifier /* { Identifier = "IBM.N", IdentifierType = IdentifierType.Ric } */            
            { Identifier = "99QAUBI8I", IdentifierType = IdentifierType.Cusip } }, null, true ), //false),
                ContentFieldNames = new[] {
                    "Daily Beta - 180 Days", "Volatility - 30 days", "Market Capitalization", "Average Volume - 30 Days",
                    "Volume", "Total Shares - Listed"}
            };

In my test, if the preferences are correct, and are absorbed by ,Net request, then .Net request results in the same expected RIC result as Postman request.



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 zoya faberov · Feb 03 at 10:13 PM

Hello @cabissi and all,

In addition to the answer from @Jirapongse, please find the reference from our DSS product expert:

In Refinitiv DataScope Select GUI User Guide, section "Instrument Validation Methodology", the following relevant explanation, pertaining to the behavior in this case is included:

Check-Digit Conversions:
• Automatic conversions are done for CUSIPs, ISINs, and SEDOLs when the last digit of the identifier is missing or incorrect. In this case, DataScope Select will identify the correct identifier and replace it in the instrument list.
• No updates will be made when importing a valid identifier. In this case, the identifier you specify in your input list will always be imported, regardless of whether other identifier exist

Hope this information is of help

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

Related Questions

Get available field list for End of Day - HTTP response

Using Python, how can I save the content of “response_text” into a csv file?

In EOD Pricing based on data availability, why there are two extractions after a holiday?

On demand extraction via HTTP requests with list and template ids?

PriceHistoryExtractionRequest Response

  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • 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
  • Intelligent Tagging
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open Calais
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • RDMS
  • 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
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • Workspace SDK
    • Element Framework
    • Grid
  • World-Check Data File
  • 中文论坛
  • Explore
  • Tags
  • Questions
  • Badges