How to get correct Factor of ABS by REST API

I used REST API to get ABS's Factor infomation. But it seems i did not get corrected number.

On gui the Factor decimal places is 8. But the decimal places of Factor which I get by REST API is 6. How can i get corrected Factor by REST API.

I attach my source code here, can you help me to fix it to get 8 decimal places Factor.

My source code is:

var ExtractionsContext = ReutersServiceConnect<ExtractionsContext>();

var identiferList = InstrumentIdentifierList.Create(new ThomsonReuters.Dss.Core.RestApi.DssCollection<InstrumentIdentifier>());
if (referenceType == ISINValue)
{
identiferList.InstrumentIdentifiers.Add(new InstrumentIdentifier { Identifier = referenceCode, IdentifierType = IdentifierType.Isin });
}
else if (referenceType == RICValue)
{
identiferList.InstrumentIdentifiers.Add(new InstrumentIdentifier { Identifier = referenceCode, IdentifierType = IdentifierType.Ric });
}
else if (referenceType == CUSIPValue)
{
identiferList.InstrumentIdentifiers.Add(new InstrumentIdentifier { Identifier = referenceCode, IdentifierType = IdentifierType.Cusip });
}

var extractionRequest = new TrancheFactorHistoryExtractionRequest
{
IdentifierList = identiferList,
ContentFieldNames = new[] { "Factor", "Factor Date" },
};

var extractionResult = ExtractionsContext.ExtractWithNotes(extractionRequest);
var extractedRowsResult = extractionResult.Contents;

Best Answer

  • Christiaan Meihsl
    Answer ✓

    @shigekawa.shuichi.rr4, see the answer to this other query, the number of decimals returned for an On Demand request cannot be customized.

    Edit: it can be done if you use a scheduled extraction. That requires creating an instrument list, report template and schedule on the server, the workflow is different from an On Demand request (which is what your code is doing).

Answers