Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • DSS /
avatar image
Question by rishabh.nahata · Oct 29, 2020 at 05:14 PM · dss apidecimal

Question on decimal and integer setting on DSS API

Regarding the default data type for two fields that we are calling on the Datascope API. The Accumulated Volume Unscaled and Open Interest fields, we are currently configured to consume these are decimals. However, my understanding of these fields and the responses that we receive via the Datascope API requests, suggest that they should be integers. If we were to change this request so that we call just for integers, do you see there being any issues with this? What would happen if the fields were represented as a decimal, but we coded to only consume integers, would this return a null value, or would it truncate?

People who like this

0 Show 1
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
zoya.farberov ♦♦ · Oct 29, 2020 at 07:34 PM 0
Share

Hello @rishabh.nahata,

It would help to know, which request type you use.

Per specific request type, you can request all available content fields, with their type. For example, we request and examine fieldtypes for EndOfDayPricing:

{
                   {protocol}}{
                   {host}}{
                   {api}}Extractions/GetValidContentFieldTypes(ReportTemplateType=ThomsonReuters.Dss.Api.Extractions.ReportTemplates.ReportTemplateTypes'EndOfDayPricing'

You should process the field result according to the field type, if I understand your question correctly.

1 Reply

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by jirapongse.phuriphanvichai · Oct 30, 2020 at 08:40 AM

@rishabh.nahata

According to the DataScope Select Data Content Guide, the type of Accumulated Volume Unscaled and Open Interest fields are numeric with decimal points.

However, from their definitions, they look like to be integers. Therefore, you need to directly contact the DSS support team via MyRefinitiv to verify that the Accumulated Volume Unscaled and Open Interest fields can have decimal points.

For converting those fields to integers, the behavior should depend on the programming languages.

For example, if I use C# with the DSS .NET library to extract EndOfDayPricingExtractionRequest, the values are returned as objects.

foreach (KeyValuePair<string, object> item in row.DynamicProperties)
{
    if(item.Key == "Universal Close Price")
    {
        int temp = Convert.ToInt32(item.Value);
        Console.WriteLine(temp);
    }
}

Then, if I convert the object to an integer by using Convert.ToInt32(item.Value), the returned integer will be rounded. For example:

Object => Integer
108.91 => 109
46.25  => 46
103.5  => 104
null   => 0

1604046336592.png (45.2 KiB)
1604047183692.png (16.0 KiB)
Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
13 People are following this question.

Related Questions

DSS API for automation manual config

DSS and TRTH file Validating

Add Desciption to API data query

The DSS API is returning wrong values in ISINs Codes

Is DSS can be used for getting real time data fast as a stream ?

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges