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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
5 1 3 4

How to get decimal value with dots (100.10) instead of comma (100,10) in .Net SDK Solution?

Hi Team,

We are using the ‘.Net SDK Code based: On Demand: large instrument lists’ and we passed the below attributes list

Requested Field Names = { "RIC", "ISIN","CUSIP", "SEDOL" ," Bid Price”, Bid Clean Price”,” Bid Dirty Price”};

In the response file we have received value for “Bid Price” like “100,20” but we want decimal value with dots “100.20”.

Could you please suggest me how we can change the decimal value from comma to dots.

dss-rest-apidssdatascope-selectrequest
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
11.3k 25 8 14

Hi @mithun.ghosh,

For On Demand extraction you are using, DSS generally provides numeric data with "." decimal separator. There is no method to change the output data.

However, I have found that the decimal separator in DSS .Net SDK is affected by Windows setting. Could you verify the setting?

You can also verify the raw data sent from the DSS server in the rowValues variable.


1584443787429.png (64.4 KiB)
1584444089023.png (88.1 KiB)
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 @mithun.ghosh,

The tutorial uses the Schedule Extraction. You can change number format in the DSS GUI User Preference. If you still find the issue, please provide the snippet code used for creating report template.


1584416987057.png (23.2 KiB)
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
5 1 3 4

Hi @Veerapath,

Thanks for your prompt response.

I have changed number format in the DSS GUI User Preference, but still in the response file we have received value for “Bid Price” like “100,20”.



We have used the below code to get the data from DSS server. Could you please suggest us how we can change the decimal value from comma to dots through .net code.


public RawExtractionResult CreateAndRunEodPricingRawExtraction (

InstrumentIdentifier[] instrumentIdentifiers, string[] contentFieldNames)

{

//Create an on demand extraction, of type EndOfDayPricingExtractionRequest:

EndOfDayPricingExtractionRequest extractionEod = new EndOfDayPricingExtractionRequest

{

IdentifierList = InstrumentIdentifierList.Create(instrumentIdentifiers),

ContentFieldNames = contentFieldNames

};

//Run the extraction.

//This call is blocking, it returns when the extraction is completed:

return extractionsContext.ExtractRaw(extractionEod);

}


Thanks,

Mithun


1584438302278.png (67.0 KiB)
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.