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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
5 1 0 3

How to get more decimals

Hi,

I’m using the DSS .Net SDK to make an IntradayPricingExtractionRequest for these 2 chain rics: "0#WNDCND0-TERN","0#WNDCND1-TERN". I compared it with some data we already have and there were cases for example when we had 9.996 but your api returned 10. Is it possible to get some values like “Primary Activity” with more than 2 decimals?

Here is the code:

var instrumentIdentifiers = new List<string>{"0#WNDCND0-TERN","0#WNDCND1-TERN"}.Select(r => SubjectIdentifier.CreateInstrumentIdentifier(r, IdentifierType.ChainRIC, null, null, null));

var extractionRequest = new IntradayPricingExtractionRequest
{
IdentifierList = SubjectIdentifierList.CreateInstrumentIdentifierList(new DssCollection<InstrumentIdentifier>(instrumentIdentifiers), null, false),
ContentFieldNames = _extractionsContext.GetValidExtractionFieldNames(ReportTemplateTypes.IntradayPricing).ToArray(),
};

var extraction = _extractionsContext.ExtractWithNotes(extractionRequest);

return extraction;

Thanks,

Denis

dss-rest-apidssdatascope-selecthistorical.net
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
84 2 0 0

Hello Denis (@datateam2017),

Our OnDemand extractions do not have the ability to override fields' decimal precision at this moment. Right now, it is required to create a Report Template if you need to specify the number of decimal places for a specific field. This can be done in the GUI or the REST API.

In the GUI, you can modify the field settings by creating or editing a Report Template, selecting the fields tab, and then clicking on the Edit button on the right of an added field. This will open up the Edit Field menu where you can specify decimal precision.

On the REST API, you can specify the format as follows within an Intraday Report Template Creation request (Endpoint: /Extractions/IntradayPricingReportTemplates):

{
"FieldName": "Primary Activity",
     "Format": {
       "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ReportTemplates.ContentFieldNumberFormat",
       "DecimalPlaces": 6
     }
  }

Note that you will need to create an Instrument List and Schedule as well to perform these extractions with a customized Report Template.

Let me know if you have further questions.

Michael

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
11.3k 25 8 14

Hi @datateam2017,

As mentioned by Michael, number of decimal place cannot be changed for OnDemand extraction at this moment. However, the default number of decimal place should be more than 2 as I can get 4 decimal places from other RIC such as "SAREUR=R".

I understand that the price is provided by real time feed. It is possible that the decimal place is limited by the feed. You may need to contact data content support via the case:06210159 to confirm this assumption.

{
    "IdentifierType": "Ric",
    "Identifier": "SAREUR=R",
    "RIC": "SAREUR=R",
    "Primary Activity": 0.2163
}
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
61 2 0 0

This will be addressed in the April DSS 12.0 release by increasing the default decimal places for Primary Activity to N/18.14

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.