For a deeper look into our DataScope Select REST API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
1 0 0 0

Re Tick History: more than one query start/end date

Hello,

Apologies if this has been asked already. I'm using the REST API via Python in order to pull 1 minute intraday summary data. Goal of my analysis is to study a set of (~400) historical events going back to 1996. Specifically, I want to construct intraday surprises in a narrow window around these events, for a variety of RICs.

Instead of one big query of intraday data going back to 1996, I though it would be more efficient if instead I download only data for the dates I'm interested in.

As a beginner, I see two ways of doing so:

1) I use Python to loop over each date where I have an event, effectively sending 400 different on-demand extraction requests

2) There is some clever way to provide multiple QueryStartDate/QueryEndDate in the JSON file of the

on demand extraction request:

"Condition": {

"MessageTimeStampIn": "GmtUtc",

"ReportDateRangeType": "Range",

"QueryStartDate": QueryStartDate ,

"QueryEndDate": QueryEndDate ,

"SummaryInterval": "OneMinute",

"DisplaySourceRIC":"true"

}

Could anyone advice me if 2) is possible. If not, would 1) go against the best practice? Yet an alternative way might be to use Google Cloud integration of Tick History, altough not sure I need it.

Thanks for any help,

Robin

pythontick-history-rest-apirest-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvote
Accepted
28.3k 30 11 15

Hello @robin.braun,

Any time you are designing multiple Tick History requests, first I would suggest to verify Best Practices & Fair Usage Policy for DataScope Select and Tick History concurrent request limit and concurrent request processing limits for your request template type.

You may also wish to review article Tick History Request - Parametrize and Parallelize for helpful tips and included downloadable companion code.

Hope that this information is of help

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvote
28.3k 30 11 15

Hello @robin.braun ,

Additionally, please see Google Big Query Tutorials to gain better understanding of this approach.

Google Big Query approach allows to process very large quantities of data, very fast, and to only download the result of the query, however- you are using GCP console to drive the workflow and not HTTP REST request, so you should see if this approach aligns with your organization's integration requirements.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.