Skip to main content

Downloading very large datasets

For large time series datasets, if you experience network instability, chunk large queries into smaller time segments rather than attempting single monolithic downloads.

Core strategy

The recommended approach divides large queries into smaller, manageable time-based chunks (typically 30-minute segments). This methodology:
  • Reduces network timeout and data corruption likelihood
  • Automatically retries failed chunks without losing progress
  • Continues downloading even when individual chunks fail
  • Provides clear feedback on download progress

Complete Python implementation

Usage examples

Single day, multiple symbols

Custom time range

Multi-day download

Sample output

For multi-day downloads, increase chunk_minutes to reduce the number of API calls. A value of 120 (2 hours) works well for longer date ranges.
The chunking approach is designed for network resilience. If you are on a stable connection and downloading moderately sized datasets, a single query may be simpler and faster.