Incorrect date decoded for TS1 data
I am getting incorrect snap time when query for the intraday summary from TRTH. I am making use of the sample "TRTH_OnDemand_IntradayBars.py" and using the dash framework to prompt for the start_time and end_time input.
app = dash.Dash(__name__, external_stylesheets=external_stylesheets)
app.layout = html.Div([
.............
html.Details([
html.Summary('Time (Default Time:00:00:00)'),
html.H6("Start Date Time:"),
dcc.Slider(
id="my-starttime-slider",
min=0,
max=23,
step=1,
marks= {i: "" for i in range(23)},
value=0),
dcc.Slider(
id="my-endtime-slider",
min=0,
max=23,
step=1,
marks= {i: "" for i in range(23)},
value=0),
html.P(id="start_time"),
html.P(id="end_time")
@app.callback(
[Output("start_time", "children")],
[Input("my-starttime-slider", "value")]
)
def show_start_time(time):
start_time = "{}:00:00".format(time)
return ["Start Date Time: {}".format(start_time)]
@app.callback(
[Output("end_time", "children")],
[Input("my-endtime-slider", "value")]
)
def show_end_time(time):
endtime = "{}:00:00".format(time)
return ["End Date Time: {}".format(endtime)]
Below is the capture compare using my script (top) and from DS (bottom). From my script the start time of the result capture starts at Nov 25 @22:00 which is incorrect vs the DS report at 0900
Stock - 0005.HK
Summary Interval - OneHour
Query Date - Nov 25
Start time - 0900
End time - 1600
Message time stamp - LocalExchangeTime
I also write the requestBody out to an output file below and the query string looks correct.
@{'ExtractionRequest': {'@odata.type': '#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.TickHistoryIntradaySummariesExtractionRequest', 'ContentFieldNames': ['Close Ask', 'Close Bid', 'High Ask', 'High Bid', 'Low Ask', 'Low Bid', 'High', 'Last', 'Low', 'Open', 'Open Ask', 'Open Bid', 'Volume', 'No. Trades', 'No. Asks', 'No. Bids'], 'IdentifierList': {'@odata.type': '#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList', 'InstrumentIdentifiers': [{'Identifier': '0005.HK', 'IdentifierType': 'Ric'}], 'UseUserPreferencesForValidationOptions': 'false'}, 'Condition': {'MessageTimeStampIn': 'LocalExchangeTime', 'ReportDateRangeType': 'Range', 'QueryStartDate': '2019-11-25T09:00:00.000Z', 'QueryEndDate': '2019-11-25T16:00:00.000Z', 'SummaryInterval': 'OneHour', 'TimebarPersistence': 'true', 'DisplaySourceRIC': 'true'}}}
Best Answer
-
Hi @KAKIT.LAI,
It seems that the issue is related to timezone of the query range. If you want to specify the timezone of the QueryStartDate and QueryEndDate, you can add "DateRangeTimeZone": "Local Exchange Time Zone" in the Condition of the request body. Below is the sample.
"Condition":
{
"MessageTimeStampIn": "LocalExchangeTime",
"ReportDateRangeType": "Range",
"QueryStartDate": "2019-11-25T09:00:00.000Z",
"QueryEndDate": "2019-11-25T16:00:00.000Z",
"DateRangeTimeZone": "Local Exchange Time Zone",
"SummaryInterval": "OneHour",
"TimebarPersistence": "true",
"DisplaySourceRIC": "true"
}If the issue still persists, please provide the entire requestBody generated by your script.
1
Answers
-
Thanks I am missing the "DateRangeTimeZone" in the condition. Add this back and it fixed the issue. What is the value I should use for GMT under "DateRangeTimeZone"?
0 -
You can use "GMT Standard Time" for GMT. For other timezone, please refer to the following questions.
1 -
I noticed another issue. I tried to generate the following
Stock - 0005.HK
Date - Nov 25, 2019
DateRangeTimeZone: Local Exchange Time
MessageTimeStampIn: Local Exchange Time
Summary Interval - OneMinute
Start time - 09:00:00
End time - 11:59:00From DS the following is the output I extraced between 0900 - 09:38
The following is from my script
I noticed between 09:20 to 0930 there was no quote updated so my script just print out the duplicate line between 09:20 - 09:29. How can I fix this?
0 -
I noticed a few "extra' update observed between 09:02 - 09:17 as well. Here's are all the extra updated highlighed.
From DS
From my script
0 -
Hi @KAKIT.LAI,
I would suggest you submit a new question for another issue so that the question is visible for other users.
Anyway, the different result you found is related to the "TimebarPersistence" condition in the request. Please set "TimebarPersistence" to false to generate the same result as DS.
1 -
Thanks Veerapath this is fixed after I set "TimebarPersistence" to false. I will raise another ticket if I have any further question.
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 中文论坛