How to perform on-demand Terms and Conditions extract using IdentifierType.Ticker

Is it possible to use IdentifierType.Ticker when performing an on-demand extraction? I'm using the following code:

var ExtractionsContext = new ExtractionsContext(new Uri("https://hosted.datascopeapi.reuters.com/RestApi/v1/"), "<your user id>", "<your password>");
//Create new report template with conditions
var extractionRequest = new TermsAndConditionsExtractionRequest {
IdentifierList = InstrumentIdentifierList.Create(
new[] { new InstrumentIdentifier { Identifier = "MSFT", IdentifierType = IdentifierType.Ticker } }, null, false),
ContentFieldNames = new[]
{
"Ticker",
"Asset Type Description",
"Security Description",
"Issue Date",
"RIC",
"Asset Status Description",
"Asset SubType Description",
"Currency Code Description",},
};
//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())
Debug.WriteLine("No rows returned");
else {
foreach (var row in extractedRows)
Debug.WriteLine(
row.Identifier + " (" + row.IdentifierType + ") " +
String.Join(", ", row.DynamicProperties.Select(dp => dp.Key + "=" + dp.Value)));
}
//Output Notes
Debug.WriteLine("NOTES:");
foreach (var note in extractionResult.Notes)
Debug.WriteLine(note);

The results come back with the following message: MSFT (Ticker) NOTES: All identifiers were invalid. No extraction performed.

Is it not possible? If not, any alternate approach would be most welcome.

Best Answer

  • I have used Search/InstrumentSearch with Postman and it works fine with Ticker.

    {
    "SearchRequest": {
    "InstrumentTypeGroups": [
    "CollatetizedMortgageObligations",
    "Commodities",
    "Equities",
    "FuturesAndOptions",
    "GovCorp",
    "MortgageBackedSecurities",
    "Money",
    "Municipals",
    "Funds"
    ],
    "IdentifierType": "Ticker",
    "Identifier": "MSFT",
    "PreferredIdentifierType": "Ric"
    }
    }

    The response is:

      {
    "Identifier": "MSFT.MW",
    "IdentifierType": "Ric",
    "Source": "GSM",
    "Key": "VjF8MHgwMDAzZGQwMDEzNWZiNzI1fDB4MDAwM2RjMDAzNDdiYjgyOHxHU018RVFRVXxFUVRZfE9EU0h8RXx8TVNGVC5NV3wxMTcw",
    "Description": "MICROSOFT ORD",
    "InstrumentType": "EquityQuote",
    "Status": "Valid"
    },
    {
    "Identifier": "MSFT.OQ",
    "IdentifierType": "Ric",
    "Source": "NSM",
    "Key": "VjF8MHgwMDAzZGQwMDEzNWZiNzI1fDB4MDAwM2RjMDAzOGRlMmIxMnxOU018RVFRVXxFUVRZfE9EU0h8RXx8TVNGVC5PUXwxMzAz",
    "Description": "MICROSOFT ORD",
    "InstrumentType": "EquityQuote",
    "Status": "Valid"
    },
    ...

    Please share your code for search.

Answers