Stock chart patterns · API + MCP

Chart patterns on stocks & ETFs — with how often the shape actually worked.

One POST /v1/brief with a stock or ETF ticker and a timeframe detects the multi-bar formations — double top, double bottom, head & shoulders — geometrically. Every detection ships a backtested base rate and a 95% confidence interval, measured on a US-stocks/ETF corpus. Most pattern APIs hand your model a confident label and stop. patternfetch hands it the evidence — including when a textbook shape is really a coin flip.

StocksETFs1m → 1wYahoo · adjustedmulti-bar geometry
Signal vs. noise · US equities

Three textbook chart patterns. Three honest base rates.

Each shape scored a near-perfect geometric fit. Here is how often it actually resolved in its own direction, historically, over the next 10 bars on US stocks & ETFs — and how far that lands from a coin flip.

the 50% line = a coin flip
distance from it = the honest edge
SPY · 1d
double bottom · bullish
shape 0.75–1.00
57.1%±1.2%n=6700
Slight edge
QQQ · 1d
double top · bearish
shape 0.75–1.00
43.1%±1.1%n=7508
Below 50
NVDA · 1d
head & shoulders · bearish
shape 0.75–1.00
41.7%±1.8%n=2802
Below 50

Directional hit rate over the next 10 bars, 95% CI, measured with no lookahead on a US-stocks/ETF corpus — the same evidence block your model receives in the payload. The bullish double bottom carries a slim, real edge; the two bearish formations sit below a coin flip, because equities drift up and a bearish call fights that drift. A competitor hands your model the shape score and stops. patternfetch hands it the number that says whether the shape ever meant anything.

TL;DR

One POST /v1/brief (or the MCP tool patternfetch_brief) with { ticker, timeframe } detects multi-bar chart patterns on stocks & ETFs — double_top, double_bottom, head_and_shoulders — plus 1–2 bar candlestick patterns, all in analysis.patterns. Each directional pattern carries a geometric confidence (0..1), the candle index at, the span, and an evidence block: the backtested base rate + 95% CI for that pattern, timeframe and confidence band on a US-equities corpus. No charting, no image recognition — it reads the adjusted numeric series.

Two classes, one array

Chart patterns vs candlestick patterns

Both shapes come back in the same analysis.patterns array. Chart patterns describe a formation over many bars; candlesticks are local 1–2 bar signals.

ClassBars coveredExamples (on stocks & ETFs)
Chart patternsmany (a formation)double_top · double_bottom · head_and_shoulders
Candlestick patterns1–2 barsbullish_engulfing · bearish_engulfing · hammer · doji

Each chart pattern reports a span — the number of candles the formation covers. Want the local 1–2 bar signals instead? See the stock candlestick patterns API.

The one call

Request in, patterns + base rate out.

A real /v1/brief shape for an S&P 500 ETF on the daily. The evidence block is the part every other API is missing.

Request
POST https://patternfetch.com/v1/brief
Authorization: Bearer pf_…
Content-Type: application/json

{ "ticker": "SPY",
  "timeframe": "1d" }
Response — analysis.patterns[0]
{ "name": "double_bottom",
  "confidence": 0.83, "at": 176, "span": 22,
  "evidence": {
    "scope": "US stocks & ETFs",
    "tf": "1d", "band": "0.75-1.00",
    "horizon": 10, "n": 6700,
    "hitRate": 0.571, "ci95": 0.012,
    "dist": { "winRate": 0.571, "median": 0.006 }
  } }

Read it as: a clean double bottom completing at candle 176 over 22 bars — and historically, that exact pattern on the daily resolved up 57.1% of the time (±1.2%, n=6,700) over the next 10 bars on US equities. A slim edge, stated honestly. The same call also returns support/resistance levels, the regime (trend + volatility), interpreted indicators (RSI/EMA state), and a one-line nl summary — a few hundred tokens, not a candle wall. See it live →

The nl line even carries the number so the summary can never sound more certain than the data: "SPY: uptrend (moderate), +0.42% last 1d, RSI 57.90 (neutral), double_bottom (conf 0.83, n=22, hist 57% over 10b)."

The honesty layer

Every stock pattern ships its base rate — from a stocks corpus.

A crypto-derived base rate is a lie on a stock, and vice-versa. patternfetch keeps two corpora and routes by asset class: stocks & ETFs (Yahoo, adjusted) score against a US-equities table; crypto scores against a crypto-pairs table. Below: the real daily, high-confidence base rates for the three chart patterns on US stocks & ETFs.

Chart patternDirectionBase rate (10-bar)95% CISampleRead
double_bottombullish57.1%±1.2%6,700slight edge
double_topbearish43.1%±1.1%7,508below 50
head_and_shouldersbearish41.7%±1.8%2,802below 50

US stocks & ETFs · timeframe 1d · confidence band 0.75–1.00 · horizon 10 bars · gross-directional, no lookahead. Base rates vary by timeframe and confidence band; these are the high-confidence daily buckets. The live number is whatever the corpus says at call time.

Why bearish formations sit below a coin flip

Equities carry a structural upward drift. Over any random 10-bar window, price is a little more likely to be up than down — so a bearish pattern, which only "wins" if price falls, gets pulled below 50%, while a bullish pattern gets pushed above it. That is exactly what the table shows: double bottom ~57%, double top / head-and-shoulders ~41–43%. It is not that the shapes are broken — it is that the honest base rate has to account for the drift, and most APIs quietly don't. See the methodology →

Same shape, different corpus

A high-confidence double_bottom resolves up 57.1% on US equities — but only ~50.5% (a coin flip, ±4.3%) on major crypto pairs over the same 10-bar horizon, because crypto has no comparable drift. One schema, two honest corpora. That is the whole point: your agent gets a base rate that belongs to the asset it is actually looking at. Compare on the crypto chart pattern API.

Data & access

Adjusted equity data, free to start.

  • Stocks & ETFs come from Yahoo, split & dividend adjusted (delayed / EOD) — so a 2:1 split doesn't fake a double top. Crypto comes from Binance in real time. One schema across all of them.
  • Timeframes 1m, 5m, 15m, 30m, 1h, 4h, 1d, 1w. Examples: AAPL, SPY, NVDA, QQQ, MSFT, TSLA.
  • Chart patterns become knowable two pivot-confirming bars after the low/high prints — the base-rate window starts there, no lookahead. Counting from the pivot itself would inflate the rate by ~10 points; we removed that trap.
Free to start:

No-signup demoPOST /v1/demo returns a real brief with detected patterns and evidence, no key. ② Free key with $0.05 starter credit (~5 briefs) from one call, no card. A brief is $0.01. Pay with x402 (USDC on Base, no account) or Stripe. Credits never expire. Pricing →

For AI agents · MCP

Connect over MCP. Read analysis.patterns.

Streamable HTTP at /mcp. Discovery (tools/list) is free — no key; a tools/call is billed like the REST route. Five tools, one schema across stocks, ETFs and crypto.

patternfetch_brief patternfetch_multi patternfetch_delta patternfetch_analogs patternfetch_capabilities
A) OAuth — one-click, nothing to paste
# Claude.ai → Settings → Connectors → Add
# custom connector, then Authorize once —
# a free-tier key is minted for you.
https://patternfetch.com/mcp

# or one line:
claude mcp add --transport http \
  patternfetch https://patternfetch.com/mcp
B) Bearer key (config)
{ "mcpServers": {
    "patternfetch": {
      "url": "https://patternfetch.com/mcp",
      "headers": {
        "Authorization": "Bearer pf_…"
      } } } }

Or let the agent pay as it goes: x402 settles ~$0.01 per call in USDC on Base — no account, no card, no key — discoverable at /.well-known/x402.json.

FAQ

Questions.

Which chart patterns does it detect on stocks?
Multi-bar chart patterns: double_top, double_bottom and head_and_shoulders, detected geometrically from the adjusted price series. The same response also returns 1–2 bar candlestick patterns (bullish_engulfing, bearish_engulfing, hammer, doji) in analysis.patterns. See the candlestick patterns API for those.
What is the base rate, and how is it different from confidence?
confidence is a geometric shape score (0..1) — how cleanly the series matches the pattern. The base rate (evidence.hitRate) is separate: how often that exact pattern, timeframe and confidence band historically resolved in its own direction over the next 10 bars, with a 95% CI (ci95) and sample size (n), measured with no lookahead. Confidence says "this is a clean shape"; the base rate says "here's how often the clean shape mattered."
Why are the stock base rates different from crypto?
Because the corpora are different. Stocks & ETFs (Yahoo, adjusted) score against a US-equities table; crypto scores against a crypto-pairs table. A high-confidence double bottom is ~57% on US equities but ~50% (a coin flip) on crypto — a crypto base rate on a stock would be misleading, so patternfetch routes by asset class automatically.
Which timeframes and tickers are supported?
US stocks and ETFs (e.g. AAPL, SPY, NVDA, QQQ) plus crypto spot pairs (e.g. BTC/USDT). Timeframes 1m, 5m, 15m, 30m, 1h, 4h, 1d, 1w. Pass ticker and timeframe to POST /v1/brief.
Is this investment advice?
No. It's impersonal market data and algorithmic signals, for informational purposes only — not investment, financial, legal or tax advice, not personalized, non-executing. See the disclaimer.
Related

Keep exploring.