TS1 data incorrect decoded date
When we requested TS1 data and decode the date of RIC EUR= using RFA C++ and TS1 decoder using below code.
time_t time = sample->getDate();
time_tm = gmtime(&time);
sprintf(time_str,”%4ld/%02ld/%02ld",(long int)(1900+time_tm->tm_year),(long int)(time_tm->tm_mon+1),(long int)time_tm->tm_mday);
The result is like:
DATE,BID,OPEN,HIGH,LOW,ASK,HIGH BID,LOW BID,OPEN ASK,HIGH ASK,LOW ASK
2018/06/27,No data available
2018/06/26,1.1552,1.1646,1.1672,1.1539,1.1555,1.1672,1.1539,1.165,1.1674,1.1541
2018/06/25,1.1645,1.1702,1.172,1.1633,1.1649,1.172,1.1633,1.1706,1.1722,1.1636
2018/06/24,1.1702,1.1657,1.1713,1.1625,1.1706,1.1713,1.1625,1.1658,1.1715,1.1629
2018/06/21,1.1655,1.1602,1.1675,1.1598,1.1659,1.1675,1.1598,1.1605,1.1677,1.16
2018/06/20,1.1601,1.157,1.1633,1.1507,1.1605,1.1633,1.1507,1.1573,1.1636,1.1509
When compared this output with other services like Datascope Select, it seems the DATE is inconsistent with DSS. See the DSS data here. For example data from TS1 on 25 June appears in DSS on 26 June. Is this TS1 data issue or decoding issue?
Best Answer
-
Hi @Wiwat,
It seems that the TS1 C++ API internally convert the date using machine's local time, so an application needs to use localtime() to correctly decode the date. Please use the localtime() instead, and then let us know the result.
0
Answers
-
@Wiwat
According to TS1_DevGuide.pdf from RFA C++ 8.1 package, getDate return the time, in seconds, since epoch (in GMT). So you might need to call method localtime(...) instead of gmtime. Our example StarterConsumer_TS1 also use method localtime when display the data in TS1Decoder::displayByDate(..).time_t time = sample->getDate();
time_tm = localtime(&time);0 -
Hi, we are not trying to get the localtime actually. The issue we have is with gmtime() where it decodes a DATE to be different from other Thomson Reuters services e.g., Datascope Select. You can try with "EUR=" where TS1's BID=1.1601 on 20/06/2018 where on DSS's BID=1.1601 on 21/06/2018.
If the decoding code part is correct, is it possible that TS1 database is incorrect?0 -
Hi, sample->getDate() return the time, in seconds, since epoch (in GMT).
We tried the time sample
returned from ‘sample->getDate()’ using ‘localtime’ as well as ‘gmtime’
functions and found that TS1 Application’s
date output is in sync with the DataSCopeSelect’s date output for the same bid
price.- The following is the output
when the time sample returned from ‘sample->getDate()’ is converted using
the ‘gmtime’ function. - The following is the output
when the time sample returned from ‘sample->getDate()’ is converted using
the ‘localtime’ function. We have run the application in Chicago Time Zone
whose GMT Time equivalent is GMT – 5 considering the daylight savings in to account
now.
0 - The following is the output
-
Do you run it on Windows or Linux?
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
- 684 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 249 ETA
- 554 WebSocket API
- 37 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
- 275 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
- 643 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
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 192 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛