Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • TREP APIs /
  • RFA /
avatar image
Question by jan.krivanek · May 11, 2016 at 12:44 PM · datadecodeusage

Prices in RFA.NET are of type double instead of decimal

When receiving and decoding MARKET_BY_PRICE updates in RFA.NET, I found out that price fields are presented as DataBufferType DataBuffer.DataBufferEnum.Real and example app is extracting prices as dataBuffer.Double

This can (and will) lead to loss of precision. Data type of choice for this type of data is System.Decimal.

Why wasn't the decimal used? Is that because the RFA.NET is only thin wrapper around the native library (and there is no .NET decimal equivalent in C++)?

What is the recommended usage in this case? Calling GetAsString() and converting to decimal manually?

People who like this

0 Show 0
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.

1 Reply

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by Steven McCoy · May 11, 2016 at 01:26 PM

Prices should report to type Real for which the RFA.NET API exposes properties MagnitudeType (exponent) and Value (mantissa) to get the raw data.

The "Consumer" example converts directly to a string for display purposes only.

Comment

People who like this

0 Show 1 · 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.

avatar image
jan.krivanek · May 11, 2016 at 02:19 PM 0
Share

Great thanks Steven - this works great!

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 >
4 People are following this question.

Related Questions

Why the news has a "replacement" character in output after RFA decoding?

Reentrant Decode OMMexception

RFA InvalidUsageException when deocode filedlist

Corresponding RIC for ENBRIDGE INC PREF SERIES 11 (TSE:ENB.PF.C) stock ?

What is the best way to decode the OMMMsgs received (e.g. to get prices) when subscribing to a RIC using RFA?

  • 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