Free OHLC Preview & Data Quality API
Query historical forex, gold, index, energy and crypto data by symbol, timeframe and date range. JSON or CSV, no key required, with clear rate limits and quality reports.
Updated 2026-11-02 ? 617 datasets ? 22.1M OHLC rows
Need full history? The API is a free preview. Complete CSV, ZIP and Parquet datasets are available as paid downloads. View data pricing.
Base URL
https://www.algospecial.com
API guides by market
Use the focused guides for supported symbols, timeframe coverage, request examples and market-specific data notes.
XAUUSD gold API
Gold M1 to MN1 history, 1.8M rows and a 97 A quality score.
Forex API
202 forex-group datasets across majors and crosses.
Crypto API
BTC, ETH, SOL and 30+ altcoin symbols with 24/7 bars.
Indices API
US500, USTEC, US30, UK100, STOXX50, JP225 and AUS200.
Energy API
WTI, Brent and natural gas OHLC history.
Quality API
A-F scores, gaps, duplicates and OHLC integrity checks.
Python guide
Requests, pandas, chunking and 429 retry examples.
CSV and JSON
Field definitions and the best format for your workflow.
Rate limits
Headers, status codes and safe retry behaviour.
OHLC Endpoint
GET /api/ohlc.php
| Parameter | Required | Description |
|---|---|---|
| symbol | Yes | Example: XAUUSD, EURUSD, BTCUSDT, USTEC |
| tf | Yes | M1, M5, M15, M30, H1, H4, D1, W1, MN1 |
| from | Yes | YYYY-MM-DD |
| to | Yes | YYYY-MM-DD |
| format | No | json (default) or csv |
Example
curl "https://www.algospecial.com/api/ohlc.php?symbol=XAUUSD&tf=M15&from=2026-01-01&to=2026-01-31&format=json"
Python
import requests
r = requests.get("https://www.algospecial.com/api/ohlc.php", params={
"symbol": "XAUUSD",
"tf": "M15",
"from": "2026-01-01",
"to": "2026-01-31",
"format": "json"
}, timeout=30)
data = r.json()["data"]
Data Quality Endpoint
GET /api/data-quality.php
Returns the A–F quality report for a dataset: score, grade, coverage, duplicates, gaps, OHLC violations, outliers, volume/spread checks and issue list.
curl "https://www.algospecial.com/api/data-quality.php?symbol=XAUUSD&tf=M15"
Rate Limits & Errors
Anonymous
60 requests/minute
1,000 requests/day
per IP address
Response headers
X-RateLimit-LimitX-RateLimit-RemainingX-RateLimit-Reset
Status codes
200 OK · 400 invalid input · 404 not found · 413 too many rows · 429 rate limited · 500 server error
On 429, wait for the number of seconds in Retry-After. CORS is enabled for browser requests.
Usage & Attribution
The API is free for research, backtesting and commercial applications. Do not resell or redistribute it as a standalone data service. Attribution to AlgoSpecial is appreciated. Data is provided as-is without warranty; verify it against your broker before trading.
API FAQ
Is the OHLC API free?
Yes. The API is free with a per-IP rate limit of 60 requests per minute and 1,000 requests per day.
What formats does the OHLC API return?
JSON by default, or CSV with format=csv. Parquet is available through the download builder, not the API.
How many rows can I request?
The free preview API is limited to 2,000 rows and a maximum date range of 31 days. Full-history datasets are available as paid downloads.
What timezone are timestamps in?
Timestamps are broker server time. Convert to UTC or New York time for session-based strategies.
Related
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.