Open Source

histdata

Download free Forex historical data from histdata.com and convert to Apache Parquet with zstd compression. 66 currency pairs, one command.

Python 3.10+Apache ParquetzstdMIT License66 Pairs
View on GitHub
Terminal
$ pip install git+https://github.com/StratCraftsAI/histdata.git
$ histdata --pairs EURUSD GBPUSD --year-start 2020 --year-end 2025
Downloading EURUSD 2020... OK
Downloading EURUSD 2021... OK
Downloading GBPUSD 2020... OK
...
✓ 12 Parquet files written to ./output/

Features

Everything you need to build a clean, local Forex dataset for quantitative research.

66 Currency Pairs

Forex majors, crosses, commodities (WTI, Brent), and indices (S&P 500, Nikkei, DAX, and more).

Apache Parquet Output

Parquet with zstd compression, ready for pandas, Polars, DuckDB, or any Arrow-compatible tool.

CLI Tool

Install once via pip, run from anywhere. One command to download years of data across multiple pairs.

Smart Year Handling

Past years download as single yearly ZIPs. Current year downloads month-by-month automatically.

Typed Schema

Clean OHLCV schema with timestamp[ms] and float64 columns. No manual parsing needed.

Zero Heavy Dependencies

Only requests, beautifulsoup4, and pyarrow. No heavy frameworks or complex setup required.

Pipeline

A simple four-step ETL process from raw web data to analysis-ready Parquet files.

1
Extract Token
2
Download ZIP
3
Parse CSV
4
Write Parquet
histdata.com → ZIP (CSV) → list[OHLCVRow] → Parquet (zstd)

Supported Pairs

66 instruments across Forex, commodities, and global indices.

Forex 23

Majors

EURUSDGBPUSDUSDJPYUSDCHFUSDCADAUDUSDNZDUSD

Crosses

EURAUDEURCADEURCHFEURGBPEURNZDGBPAUDGBPCADGBPCHFGBPNZDAUDNZD

JPY Crosses

AUDJPYCADJPYCHFJPYEURJPYGBPJPYNZDJPY

Commodities 2

BCOUSDBrent Crude Oil
WTIUSDWTI Crude Oil

Indices 9

AUXAUDASX 200
FRXEURCAC 40
GRXEURDAX 30
HKXHKDHang Seng
JPXJPYNikkei 225
NSXUSDNASDAQ 100
SPXUSDS&P 500
UDXUSDUS Dollar Index
UKXGBPFTSE 100

Output Schema

Typed Parquet columns ready for direct analysis. No post-processing required.

ColumnTypeDescription
timestamptimestamp[ms]Bar open time (EST)
openfloat64Open price
highfloat64High price
lowfloat64Low price
closefloat64Close price
volumefloat64Tick volume
Sourcehistdata.com — Free ASCII CSV, semicolon-delimited, no API key required
TimezoneEST (UTC-5, no DST adjustment)
FormatApache Parquet + zstd

Quick Start

Install from GitHub and start downloading data in seconds.

Installation
pip install git+https://github.com/StratCraftsAI/histdata.git
CLI Usage
# Download EURUSD 2020-2025 and convert to Parquet
histdata --pairs EURUSD --year-start 2020 --year-end 2025

# Multiple pairs
histdata --pairs EURUSD GBPUSD USDJPY --year-start 2015 --year-end 2025

# All 66 pairs
histdata --pairs all --year-start 2020 --year-end 2025
Read with pandas
import pandas as pd

df = pd.read_parquet("output/EURUSD_M1.parquet")
print(df.head())
#              timestamp     open     high      low    close  volume
# 0 2023-01-02 17:00:00  1.07045  1.07048  1.07045  1.07048     0.0

CLI Options

OptionDefaultDescription
--pairsMajor Forex (23)Currency pairs to download. Use "all" for all 66 pairs.
--year-start2020First year to download.
--year-end2025Last year to download.
--timeframeM1Timeframe: M1 (1-minute bars) or tick.
--output-dir./outputDirectory for Parquet output files.
--zip-dir./downloadsDirectory for downloaded ZIP files.
--skip-downloadoffSkip download, convert existing ZIPs only.
-v, --verboseoffEnable debug logging.

FAQ

Do I need an API key?

No. histdata.com provides free data without registration or API keys.

How long does a full download take?

Approximately 2 seconds per ZIP file (polite throttle). Downloading all 66 pairs for 5 years takes roughly 10-15 minutes.

Can I use this data with StratCraft?

Yes. The Parquet output follows the standard OHLCV schema and can be loaded directly into StratCraft as a data source.

What timezone are the timestamps in?

All timestamps are in EST (Eastern Standard Time, UTC-5). histdata.com does not apply DST adjustment.

Does it support tick data?

Yes. Pass --timeframe tick to download tick-level data instead of 1-minute bars.

Get Started

Free, open source, MIT licensed. One pip install away from clean Forex data.