Extract OnDemand in C# example always end up with no data

Hi,
We are currently migrating our old SOAP API solution to the REST API. I'm
trying to extract data with the C# example provided here (report template is
Terms and Condition), but for some reason, it seems that the instrument
provided (Ric:IBM.N) always return 0 rows in output. I tried with several
instruments then, I always end up with an empty extraction. When I try to
extract those same instruments with the SOAP API, I get results.
Could someone give me some explanation about this behaviour? I precise that
I changed nothing in the sample, I used the same credentials as our SOAP API
script.
Many thanks!
The concerned method:
[Example("Create: Terms and Conditions")]
public void TermsAndConditions()
{
Status.Notify(ExtractionsContext, "ReportTemplateType", "GetContentFieldTypes");
//Retrieve the list of available fields. You can skip this step if you already know the list of fields to extract.
//The list of fields contains the code, name, format. Either the code or name can be used as the fieldName when
//adding content fields
var availableFields = ExtractionsContext.GetValidContentFieldTypes(ReportTemplateTypes.TermsAndConditions);
Status.EndNotify(ExtractionsContext);
Status.Notify(ExtractionsContext, null, "ExtractWithNotes", MethodType.Operation, Publish.Secondary);
//Create new report template with conditions
var extractionRequest = new TermsAndConditionsExtractionRequest
{
IdentifierList = InstrumentIdentifierList.Create(
new[] { new InstrumentIdentifier { Identifier = "IBM.N", IdentifierType = IdentifierType.Ric } }, null, false),
ContentFieldNames = new[] {
"Conversion Terms End Date", "Index Principal Flag", "Conversion Terms Start Date", "RIC", "Round Lot Size",
"Redemption Value", "Original Issue Amount", "Issue Price", "First Coupon Date", "Issue Date", "Par Value",
"Accrual Date", "Base Index", "Factor", "Original Issue Discount Flag", "End Of Month Payment Flag", "ISIN",
"Index Linked Bond Base Index", "Coupon Frequency Description", "Total Amount Outstanding", "Maturity Date",
"Total Amount Issued", "Capitilization Flag", "Currency Code", "Trading Status"},
Condition = new TermsAndConditionsCondition
{
IssuerAssetClassType = IssuerAssetClassType.AllSupportedAssets,
ExcludeWarrants = false,
DaysAgo = 3, //Use either DaysAgo or StartDate
//StartDate = new DateTimeOffset(new DateTime(2015, 1, 1)),
FixedIncomeRatingSources = FixedIncomeRatingSource.StandardAndPoors,
}
};
//Extract - NOTE: If the extraction request takes more than 30 seconds the async mechansim will be used. See Key Mechanisms
var extractionResult = ExtractionsContext.ExtractWithNotes(extractionRequest);
var extractedRows = extractionResult.Contents;
//Output
if (!extractedRows.Any())
Status.WriteLine("No rows returned");
else
{
foreach (var row in extractedRows)
Status.WriteLine(
row.Identifier + " (" + row.IdentifierType + ") " +
String.Join(", ", row.DynamicProperties.Select(dp => dp.Key + "=" + dp.Value)));
}
//Output Notes
Status.WriteLine("NOTES:");
foreach (var note in extractionResult.Notes)
Status.WriteLine(note);
Status.EndNotify(ExtractionsContext);
}
Best Answer
-
I have tried your code and found the same result. The extraction note also provides more information why there is no result returned.
Report Template (31 fields): _OnD_0x05b03fe60d5b2f96 (ID = 0x05b03fe60f4b2f96) Created: 04/21/2017 16:50:28 Last Modified: 04/21/2017 16:50:28
1 Instrument suppressed due to rating date not on or after 04/18/2017.
Processing completed successfully at 04/21/2017 16:50:36, taking 0.240 Secs.
Extraction finished at 04/21/2017 09:50:36 UTC, with servers: x11n01, DSHA02 (0.0 secs), QSHA02 (0.0 secs), QSHC08 (0.0 secs)
No usage to report -- 1 Instrument in the input list had no reported data.Once I remove the code that defines the TermsAndConditionsCondition, application can retreive some data in fields. It seems like the issue is related to the content of data or the attributes of the request.
0
Answers
-
Where did you get this sample from ? It might be an old one, I do not recognize it.
The current samples for the DSS REST API are available under the downloads tab of the DSS REST API. Among them is a working C# example for an On Demand Terms and Conditions extraction, it is explained in detail under Tutorial 8. It contains several instruments including IBM.N, and delivers data, I just retested it right now.
Later addition to this answer:
After further tests trying to understand why the current sample returns data and yours does not, I found that the presence of the conditions DaysAgo and FixedIncomeRatingSources will result in no data being returned. Without those 2 conditions, the request should return data.
0 -
I have also tried the Schedule extraction in GUI and found similar behavior. There will be no result, if the Delta Extraction is selected.
0 -
Thanks very much, for now I don't really need the conditions so your solution do the trick. I'll try to investigate further when I have some time.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 37 Alpha
- 167 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 705 Datastream
- 1.5K DSS
- 633 Eikon COM
- 5.2K Eikon Data APIs
- 14 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 6 Trading API
- 3K Elektron
- 1.5K EMA
- 259 ETA
- 569 WebSocket API
- 40 FX Venues
- 16 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 25 Messenger Bot
- 4 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 284 Open PermID
- 47 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 24 RDMS
- 2.2K Refinitiv Data Platform
- 879 Refinitiv Data Platform Libraries
- 5 LSEG Due Diligence
- 1 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
- 27 DACS Station
- 123 Open DACS
- 1.1K RFA
- 108 UPA
- 196 TREP Infrastructure
- 232 TRKD
- 919 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 103 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛