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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
1 0 2 2

Is it possible to specify the number of decimal places in the result when calling the REST API ExtractWithNotes? For example, to get a Mid Price of exchange rates that is rounded to 2 decimal places?

dss-rest-apidatascope-selectdssrest-api
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.

@josef.pozny

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

If so please can you click the 'Accept' text next to the appropriate reply. This will guide all community members who have a similar question.

Thanks,


AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

1 Answer

· Write an Answer
Upvotes
Accepted
13.7k 26 8 12

@josef.pozny,

In a nutshell: no, it is not possible.

ExtractWithNotes is an OnDemand call. It is not possible to set the number of decimal places in an OnDemand call. It is possible to set it in a template used in a scheduled extraction, but that is a different workflow.

Consideringt the use case you mention, I guess the easiest would be for you to apply the rounding programmatically to the results you receive.

For more information see this thread.

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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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