Retrieve tick history of different instruments for different time range
Hi there,
I am trying to retrieve tick history data with TRTH for multiple instruments for diffrent time range. Is there a way I can retrieve the data in one request? i.e. specify different QueryStartDate/QueryEndDate for each instrument in one request instead of sending one request for each instrument? Thank you!
requestBody={
"ExtractionRequest": {
"@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.TickHistoryTimeAndSalesExtractionRequest",
"ContentFieldNames": [
"Trade - Price",
"Trade - Volume",
"Trade - Bid Price",
"Trade - Ask Price",
"Trade - Sequence Number",
"Trade - Qualifiers",
"Trade - Exchange Time",
"Trade - Date",
"Quote - Bid Price",
"Quote - Bid Size",
"Quote - Ask Price",
"Quote - Ask Size",
"Quote - Exchange Time",
"Quote - Date"
],
"IdentifierList": {
"@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
"InstrumentIdentifiers": [{
"Identifier": "ONON.K",
"IdentifierType": "Ric"
},{
"Identifier": "AAPL.OQ",
"IdentifierType": "Ric"
}],
"UseUserPreferencesForValidationOptions":"false"
},
"Condition": {
"MessageTimeStampIn": "LocalExchangeTime",
#"GmtUtc",
"ReportDateRangeType": "Range",
"QueryStartDate": "2021-10-26T12:52:50.000Z",
"QueryEndDate": "2021-10-26T12:53:00.000Z",
"TimeRangeMode": "Inclusive",
"DisplaySourceRIC": "True"
}
}
}
Best Answer
-
Hello @Liang Ge and @ankur.tyagi ,
An on-demand request allows one InstrumentList specification and one Condition specitication, so the Condition, including dates, applies to the entire list.
A scheduled request includes instrument list request and report template.
However, from design perspective, it may make sense to look at your requirement, and see how to best address it.
To venture a guess, is there a concern on simultaneous request limits, they are described in Best Practices & Fair Usage Policy for DataScope Select and Tick History Guide and are fairly large.
Are you looking for a single consolidated way to review the results of this request? In this case you may either aggregate the results from the discrete on-demand requests in your custom code, or you may be interested in deploying scheduled requests, see REST API Tutorial 12: GUI control calls: immediate extract on how to do it programmatically. In this case, all results of your requests will be visible via DSS GUI as well as can be consolidated programmatically when they have been completed.
If the data required is recent and from the same venue, another approach to consider may be Venue By Day files. REST API Tutorial 2: Retrieving VBD files for integration details. If your required instruments are from the same venue (exchange) this will allow you to request all instruments for specific venue for specific date in one request. Next you would select your required data from all of the returned data. The number of days available for request is limited, believe it is last 30 days. This is a separate capability that is not included by default, so if exploring this approach is of interest, please discuss the requirement in detail with your Refinitiv account manager.
Hope that some of this information is helpful to you.
0
Categories
- All Categories
- 6 AHS
- 37 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 中文论坛