AdxRtList CF_DATE format
CF_DATE comes as a number of days from Jan 1, 1901 in double (why?) type...
Is there a way to get it in string format?
Python API returns string.
And more general question about the COM API: why do API return the values of the same field in different format for different tickers?
Example 1: CF_DATE is an empty string when is not available, but otherwise - doube
Example 2: TR.VWAP (TR.Close, TR.HIGH) is a double value, but 'NULL' string value if not available for a ticker. Why not just 0?
Thanks,
Igor
Best Answer
-
@igorg CF_DATE is represented in the Excel (1900) date format:
> In the 1900 date system, dates are calculated by using January 1, 1900, as a starting point. When you enter a date, it is converted into a serial number that represents the number of days elapsed since January 1, 1900.
You can convert it to a date in code fairly easily depending on what environment you use.
COM API is an ease-of-use API that was designed with VBA and Variant type in mind. If you use C++ or .NET with this API, you can run into type casting issues like the one you are describing above.
Returning 0 values for numeric fields is confusing, if an instrument is quoted in points or is a very low interest rate, 0 can be a legitimate HIGH or CLOSE price.
0
Answers
-
Eikon COM APIs are targeted primarily for use in MS Office VBA and are meant to be most friendly for Excel users. This is why the dates are returned in OLE Automation date format, which is the date format Excel uses. The logic behind the dates returned as strings when not available is to force the type mismatch error rather than to allow zero to propagate into calculations that may return incorrect result to an unsuspecting user. In other words this logic was built with the view that in financial calculations error is better than incorrect result.
0 -
That's understandable. But in c++ it leads me to have expected field type in the memory and to make a comparison of every received value type with expected...
What will be a format of the fields that have datetime values?
0 -
I don't believe we have any datetime values on the datafeed. I believe date and time are always separated into different fields. But for your purposes it doesn't matter because AdfinX Real-Time COM library will return date, time and datetime values (if there are any) in the same OLE Automation date format.
0 -
Oh, I didn't know about ole date format. It answers my question about the date. Thank you.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 687 Datastream
- 1.4K DSS
- 623 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 557 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 276 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 682 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 105 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 91 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛