Using Local Exchange Timezone to query TRTH
Hi,
I am doing Range query through C# api. I want to request data between two times expressed in the timezone of the exchange. Same as Datascope with this option :
Do you know how I can set this option ?
I know that C# has `DateRangeTimeZone` option but that doesn't allow me to have the local exchange timezone
Thanks
Best Answer
-
In a nutshell, use this condition:
DateRangeTimeZone = "Local Exchange Time Zone",
Let me add a bit more detail:
I made an On Demand query for 1 hour Intraday summaries (bars), for RICs on Hong Kong, Germany and New York. The conditions included the following; I varied the value of DateRangeTimeZone based on what can be seen in the GUI:
Then I looked at the time stamps of the results:
MessageTimeStampIn = TickHistoryTimeOptions.GmtUtc,
DateRangeTimeZone = "UTC+01:00",
QueryStartDate = new DateTimeOffset(2016, 09, 29, 0, 0, 0, TimeSpan.FromHours(0)),
QueryEndDate = new DateTimeOffset(2016, 09, 30, 0, 0, 0, TimeSpan.FromHours(0)),
ReportDateRangeType = ReportDateRangeType.Range,Test 1:
DateRangeTimeZone = "UTC+01:00"
Result: timestamps range from 22:00 to 21:00, i.e. range is UTC+1
Test 2:
DateRangeTimeZone = "UTC+02:00"
Result: timestamps range from 21:00 to 20:00, i.e. range is UTC+2
Test 3:
DateRangeTimeZone = "Athens, Bucharest"
Result: timestamps range from 21:00 to 20:00, i.e. range is UTC+2
Test 4:
Not setting parameter DateRangeTimeZone
Result: timestamps range from 22:00 to 21:00, range is UTC+1 (i.e. the default is my own TimeZone).
0
Answers
-
Thanks a lot for your help. What happens in your test if you set "Local Exchange Time Zone" ? Personnaly, on my side I still have weird results.
For instance, I ask BAC.N (US stock) from 2011-08-11 00:00:00.000 to 2011-08-11 23:59:59.999 with the option `DateRangeTimeZone = "Local Exchange Time Zone"`
I should get only data on 2011-08-11 utc-4. but no I get that :
`BAC.N,Market Price,2011-08-10T16:00:00.178635000-04,Raw,UPDATE,UNSPECIFIED,,,,62,,24848,,10"`
Did I make a mistake somewhere ?
EDIT :
It looks like I don't have the same behavior between C# API and DataScope Select.
It works as expected in Datascope. Not in C#
Thanks
0 -
I found. it was because I set QueryStartDate with a `DateTime` instead of `DateTimeOffset`, so somewhere a local machine time zone conversion was done in .Net
0 -
webmastertux1, glad you found it !
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
- 60 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛