Introduction
ChartMatch is a REST API that finds historically similar chart patterns across 500+ instruments spanning crypto, forex, commodities, indices, and stocks. For each match, it returns what happened next — with confidence scores, multi-timeframe outcomes, directional consensus, and volatility context.
Base URL:
https://chartmatch.ioAll responses are JSON. All timestamps are UTC. Prices use the source's native precision.
Authentication
Every request requires an API key sent via the X-API-Key header. Get your key from the dashboard after signing up.
Each account can have up to 5 API keys. Usage is aggregated across all keys — if your plan allows 2,000 calls/month, that's shared across all your keys.
Rate Limits
Rate limits are per account, not per key. Limits reset on the 1st of each month (UTC).
| Plan | Calls / month | Price |
|---|---|---|
| Free | 5 | $0 |
| Pro | 2,000 | $19.99/mo |
| Builder | 30,000 | $49.99/mo |
When you exceed your limit, the API returns 429 Too Many Requests. Check remaining calls with GET /v1/usage.
Errors
The API uses standard HTTP status codes. Error responses include a JSON body with detail.
| Code | Meaning | |
|---|---|---|
| 400 | Bad request — invalid parameters | |
| 401 | Missing or invalid API key | |
| 403 | Feature not available on your plan (e.g., cross-asset on Free) | |
| 429 | Rate limit exceeded | |
| 500 | Server error | |
POST /v1/similar-patterns
Find historically similar chart patterns for a given symbol. Returns matches ranked by similarity with outcome data, confidence scores, and relevance classification.
Parameters
| Name | Type | Description |
|---|---|---|
| symbol required | string | Symbol to query. Examples: "BTCUSDT", "GC=F", "AAPL" |
| lookback optional | int | Number of recent candles to use as the query pattern. Default: 30. Range: 10–200. |
| top_n optional | int | Number of matches to return. Default: 10. Range: 1–50. |
| outcome_candles optional | int | Forward candles for outcome computation. Default: 30. Range: 1–200. |
| relevance_filter optional | string | Filter by relevance tier. Default: none (pure top-N).
|
| categories optional | string[] | Filter by asset class. Values: "crypto", "forex", "commodity", "index", "stock". Free tier: crypto only. |
| min_volatility optional | float | Minimum annualized volatility of matched window. Example: 0.3 = 30%. |
| max_volatility optional | float | Maximum annualized volatility. Example: 1.0 = 100%. |
| normalize optional | string | Normalization method. "returns" (default) or "zscore". Zscore adjusts for cross-asset volatility differences. |
| interval optional | string | Candle interval. Default: "1d". Options: "1d", "1w", "1M". |
Response Fields — Match Object
| symbol | Matched instrument symbol |
| name | Human-readable name (e.g., "BTC", "Coffee Futures") |
| category | Asset class: crypto, forex, commodity, index, stock |
| relevance | "same_pair" (same asset), "same_asset_class" (same category), "cross_asset" (cross-asset) |
| similarity | DTW similarity score (0–1, higher = more similar) |
| confidence | Percentile rank — "top 0.003%" means this match beat 99.997% of all windows |
| volatility | Annualized volatility of the matched window |
| volatility_ratio | Window vol ÷ asset's historical avg vol. 1.0 = normal, 2.0+ = extreme |
| volatility_context | "calm" (<0.7x), "typical" (0.7–1.3x), "elevated" (1.3–2.0x), "extreme" (>2.0x) |
| period | Date range of the matched pattern |
| outcome.return | Total return over outcome_candles period |
| outcome.max_gain | Best point reached during outcome period |
| outcome.max_drawdown | Worst point reached during outcome period |
| outcome.timeframes | Returns at 7d, 14d, 30d (when available) |
| rank | Position in results (1 = best match) |
Response Fields — Outcome Summary
| direction | "bullish", "bearish", or "neutral" — majority vote across all matches |
| consensus | Human-readable: "7 of 10 bullish (70%)" |
| bullish_percentage | Percentage of matches with positive returns |
| avg_return | Mean return across all matches |
| by_relevance | Stats broken down by relevance tier (high/medium/low) |
| by_timeframe | Win rate and avg return at 7d, 14d, 30d |
| by_category | Stats per asset class with avg gain, drawdown, best/worst |
GET /v1/candles
Retrieve OHLCV candle data for any instrument. Useful for charting or building your own analysis on top of ChartMatch data.
Query Parameters
| Name | Type | Description |
|---|---|---|
| symbol required | string | Symbol to query. Examples: "BTCUSDT", "AAPL", "GC=F" |
| interval optional | string | Candle interval. Default: "1d". Options: "1d", "1w", "1M". |
| limit optional | int | Number of candles to return. Default: 200. Max: 500. |
| start optional | int | Start timestamp in milliseconds. When omitted, returns the most recent candles. |
| end optional | int | End timestamp in milliseconds. |
Response Fields
| symbol | Queried symbol |
| interval | Candle interval |
| count | Number of candles returned |
| candles[].t | Open time (ms timestamp) |
| candles[].o | Open price |
| candles[].h | High price |
| candles[].l | Low price |
| candles[].c | Close price |
| candles[].v | Volume |
GET /v1/patterns
Detect classical chart patterns (double top/bottom, head & shoulders, triangles, flags, wedges, channels) on any symbol.
Query Parameters
| Name | Type | Description |
|---|---|---|
| symbol required | string | Symbol to scan. |
| interval optional | string | Candle interval. Default: "1d". |
| lookback optional | int | Number of candles to scan. Default: 100. |
Response Fields
| patterns_found | Number of patterns detected |
| patterns[].name | Pattern name (e.g., "Double Bottom", "Rising Wedge") |
| patterns[].direction | "bullish" or "bearish" |
| patterns[].confidence | Confidence score (0–1) |
| patterns[].status | "forming" or "completed" |
| patterns[].candle_span | Number of candles the pattern spans |
| patterns[].key_levels | Important price levels (support, resistance, neckline, etc.) |
| patterns[].description | Human-readable description of the pattern |
POST /v1/analyze
AI-powered analysis of a pattern match result. Generates a written interpretation of similarity data, outcome context, and what the match means for the queried symbol.
Parameters
| Name | Type | Description |
|---|---|---|
| query_symbol required | string | The symbol that was queried (e.g., "BTCUSDT") |
| match required | object | A single match object from the /v1/similar-patterns response |
| outcome_summary optional | object | The outcome_summary from the similar-patterns response, for broader context |
Response
| analysis | AI-generated text analysis of the match |
| provider | Which AI provider was used |
GET /v1/symbols
List all available instruments. Free tier users see crypto only.
Query Parameters
| Name | Type | Description |
|---|---|---|
| category optional | string | Filter by asset class: "crypto", "forex", "commodity", "index", "stock" |
GET /v1/usage
Check your current API usage for the billing period.
Response
| tier | Your current plan (free, pro, builder) |
| calls_this_month | Total calls made this billing period |
| calls_limit | Maximum calls allowed |
| remaining | Calls remaining before rate limit |
GET /health
Status check. No authentication required. Returns symbol and candle counts to verify the database is populated.
GET /v1/billing/plans
List all available subscription plans with pricing and features. No authentication required.
Relevance Tiers
Every match is classified into one of three relevance tiers based on the relationship between the query symbol and the matched symbol:
| Tier | Meaning | |
|---|---|---|
| same_pair | Same asset — BTC vs BTC history. Same market dynamics, same trader psychology. Strongest relevance for prediction. | |
| same_asset_class | Same category — BTC vs ETH (both crypto), Gold vs Silver (both commodities). Assets that tend to move together for fundamental reasons. | |
| cross_asset | Cross-asset — BTC vs S&P 500, ETH vs Oil. Statistical shape match only. Useful for research and discovery, not prediction. | |
Use the relevance_filter parameter to search only a specific tier, or use "balanced" to get a guaranteed mix of all three.
Volatility Context
Each match includes a volatility_ratio — the matched window's annualized volatility divided by the asset's historical average volatility.
BTC moving 10% in a month → volatility_ratio: 1.0 (normal for BTC).
S&P 500 moving 10% in a month → volatility_ratio: 3.0 (once-in-a-decade event).
The volatility_context field provides a human-readable label:
| Label | Ratio | Meaning |
|---|---|---|
| calm | < 0.7x | Unusually quiet period for this asset |
| typical | 0.7x – 1.3x | Typical volatility |
| elevated | 1.3x – 2.0x | Higher than usual |
| extreme | > 2.0x | Rare, crisis-level volatility for this asset |
Use min_volatility / max_volatility to filter matches by absolute volatility level.
Multi-Timeframe Outcomes
Each match's outcome includes sub-timeframes at 7, 14, and 30 candles (when data is available). This reveals whether a pattern is bullish short-term but bearish long-term, or vice versa.
The by_timeframe section in the outcome summary shows aggregate win rates and average returns at each horizon across all matches.
Confidence Score
The confidence field shows the match's percentile rank. "top 0.003%" means this match was #1 out of ~300,000 windows compared — it beat 99.997% of all possible patterns in the database.
This gives context to the raw similarity score. A similarity of 0.93 is meaningless without knowing the distribution — is that top 1% or top 40%?
Directional Consensus
The outcome summary includes a majority-vote direction field: how many matches went up vs down after the pattern ended.
"7 of 10 bullish (70%)" means 70% of the historically similar patterns led to positive returns. Combined with by_relevance, you can see whether the bullish consensus holds across same-asset and cross-asset matches or only in one tier.
Asset Coverage
The database covers 500+ instruments across 6 asset classes, synced daily.
| Category | Count | Source |
|---|---|---|
| crypto | 370+ pairs | Binance (USDT pairs by volume) |
| forex | 25 pairs | Yahoo Finance (EUR, GBP, JPY, CHF, AUD…) |
| commodity | 26 futures | Yahoo Finance (Gold, Oil, Coffee, Corn…) |
| index | 24 indices | Yahoo Finance (S&P 500, NASDAQ, DAX, Nikkei…) |
| etf | 30 funds | Yahoo Finance (SPY, QQQ, GLD, XLF…) |
| stock | 150+ equities | Yahoo Finance (AAPL, NVDA, TSLA, AMZN…) |
Total: ~10,000,000+ candles at daily resolution, with weekly and monthly also available.