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 -
@Tux1, glad you found it !
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 中文论坛