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!
Best Answer
-
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.
0
Answers
-
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?
0 -
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."
]
}0 -
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
0 -
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!
0 -
Hello @cabissi,
Is the question still relevant?
Thanks to my colleague @Jirapongse, 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.
0 -
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 existHope this information is of help
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 684 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 249 ETA
- 554 WebSocket API
- 37 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 643 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 192 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛