Forex Data API

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.

202forex-group datasets
30forex-group symbols
1.9Mforex OHLC rows
2003earliest coverage

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.

GroupExamplesNotes
USD majorsEURUSD, GBPUSD, AUDUSD, NZDUSD, USDCAD, USDCHF, USDJPYMost liquid forex datasets
EUR crossesEURAUD, EURCAD, EURCHF, EURGBP, EURJPY, EURNZDUseful for relative-strength work
GBP / JPY / AUD crossesGBPJPY, GBPCHF, AUDJPY, CADJPY, CHFJPYHigher 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.

Legacy forex caveat: older exports may have no tick volume or spread history. Those fields return 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.

🚀 Invite friends — Earn $5 You both get $5 credit on Go Ad · opencode.ai AI-Powered Coding Agent — Try Free Build apps, fix bugs & ship faster with opencode. Get $5 free credit when you join. × Ad · quo.com QuoPhone — $20 Visa Gift Card Free Sign up to Quo, subscribe 3 months, get a $20 Visa gift card. Atif's referral gift for you. ×