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
- 6 AHS
- 39 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛