Free Forex Historical Data API
Pull historical forex bars for majors and crosses from M1 through W1. Use one endpoint for currency backtests, spread research and data-quality checks.
Updated 2026-11-02 ? Data refreshed from the AlgoSpecial catalog.
Currency pairs and coverage
The forex group contains 202 datasets across 30 symbols, including EURUSD, GBPUSD, USDJPY, AUDUSD, USDCAD, USDCHF, NZDUSD and the main euro, pound, yen, aussie and New Zealand crosses. Coverage varies by pair: some histories reach back to 2003, while newer broker exports start later.
| Group | Examples | Notes |
|---|---|---|
| USD majors | EURUSD, GBPUSD, AUDUSD, NZDUSD, USDCAD, USDCHF, USDJPY | Most liquid forex datasets |
| EUR crosses | EURAUD, EURCAD, EURCHF, EURGBP, EURJPY, EURNZD | Useful for relative-strength work |
| GBP / JPY / AUD crosses | GBPJPY, GBPCHF, AUDJPY, CADJPY, CHFJPY | Higher volatility and wider spreads |
Forex datasets use the broker-style M suffix in the API symbol. Use the exact symbol returned by the dataset catalog rather than guessing the suffix.
Forex OHLC request
The request format is the same for every pair. The example below pulls EURUSD M15 for January 2026. The response contains one record per bar with broker-server timestamps.
0 rather than invented values. Check the individual quality report before using volume-based logic.Forex timeframes are M1, M5, M15, M30, H1, H4, D1 and W1. The forex group does not include an MN1 series.
Forex data quality and broker differences
Every forex dataset has an A-F quality report. The audit flags duplicate timestamps, invalid OHLC, non-positive prices, gaps, flat bars, zero spread and zero volume. A low score is a signal to inspect the file, not a claim that the prices are unusable.
- Legacy exports often lack volume and spread; price-only backtests may still be valid.
- Weekend and holiday gaps are normal in forex and are reported separately from unexpected gaps.
- Broker server time affects daily boundaries and session filters; convert explicitly when needed.
Forex API use cases
EA backtesting
Load EURUSD or GBPUSD bars into MT5, Python or another backtester.
Spread research
Study how spread and volatility change across sessions and pairs.
Cross-pair models
Build correlation, relative-strength and currency-index features.
Forex API limits
The free tier allows 60 requests per minute, 1,000 requests per day and up to 50,000 rows per request. A request can span at most 366 days. For long M1 histories, request one year at a time and store the results locally.
Request examples
cURL - EURUSD M15 JSON
curl "https://www.algospecial.com/api/ohlc.php?symbol=EURUSD&tf=M15&from=2026-01-01&to=2026-01-31&format=json"
Python - EURUSD DataFrame
import pandas as pd
import requests
params = {
"symbol": "EURUSD",
"tf": "H1",
"from": "2025-01-01",
"to": "2025-12-31",
}
r = requests.get("https://www.algospecial.com/api/ohlc.php", params=params, timeout=30)
r.raise_for_status()
df = pd.DataFrame(r.json()["data"])
df["Timestamp"] = pd.to_datetime(df["Timestamp"])
df["return"] = df["Close"].pct_change()
print(df.describe())
cURL - GBPUSD CSV
curl "https://www.algospecial.com/api/ohlc.php?symbol=GBPUSD&tf=H4&from=2025-01-01&to=2025-12-31&format=csv" -o GBPUSD_H4.csv
All timestamps are broker server time. Some legacy forex exports return 0 for TickVolume and Spread because those fields were not present in the source feed.
Forex API FAQ
Which forex pairs are available?
The forex group covers 30 symbols, including EURUSD, GBPUSD, USDJPY, AUDUSD, USDCAD, USDCHF, NZDUSD and major crosses. Use the dataset builder or catalog for the exact list.
Is the forex API free?
Yes. The free tier is limited to 60 requests per minute and 1,000 requests per day per IP.
Why is volume zero for some pairs?
Some legacy broker exports do not contain tick volume or spread history. The API returns 0 instead of fabricating values. Price-only strategies can still use those datasets.
Does forex include monthly bars?
No. Forex datasets support M1, M5, M15, M30, H1, H4, D1 and W1. Monthly bars are available for metals, crypto, indices and energy where present in the catalog.
What timezone are forex timestamps in?
Timestamps are broker server time. Convert to UTC or your session timezone before building daily or session features.
Choose the next useful step
Most visitors arrive with one question: build, test, price, or trust. These shortcuts keep the path practical.
Go deeper before you build, download or automate
Hand-picked engineering articles, indicator breakdowns and trading-system tools so visitors keep exploring instead of leaving after one page.
Pine Script to MT4/MT5 Conversion Planner
Analyze Pine strategies, repainting risk, TradingView alert bridges, MTF synchronization and the correct MQL4/MQL5 build path before paying for conversion.
Open planner
3-in-1 MT5 Indicator Bundle
12H Bias Engine, Smart Money Institutional Flow Dashboard and D1/H1 pending-signal logic with MQ5 + EX5 source included via Etsy.
MT5 Bank Orders Institutional Flow Dashboard
Supply/demand zones, BOS/CHoCH, liquidity levels, FVG, equal highs/lows and confirmed trade-plan logic explained with EX5 download.
MT5 Asia London NY Liquidity Engine
Asia range, London raid and New York continuation/reversal planning with internal session backtest stats and entry/SL/TP dashboard.
Interactive Brokers RSI Pair Trader
Tkinter desktop trading workflow, TWS API connection handling, RSI pair logic, risk controls and custom IBKR development positioning.
XAUUSD M30 CSV Data For Backtesting
Use clean MT5 historical data for Python backtests, strategy validation, spread checks and realistic gold EA research workflows.