Stock candlesticks · API + MCP

Candlestick patterns on stocks — and the honest news that bearish ones underperform.

One POST /v1/brief with a stock or ETF ticker detects the candlestick signals — bullish & bearish engulfing, hammer, doji — each with a geometric confidence and a backtested base rate + 95% CI from a US-equities corpus. And the corpus says something most candlestick guides won't: on stocks, a clean bearish pattern resolves its way less than half the time — because equities drift up. We put that number in the payload.

StocksETFs1m → 1wYahoo · adjustedengulfing · hammer · doji
Signal vs. noise · US equities

One bearish candle, two bullish. The drift shows up in the base rate.

Three textbook candlestick signals, all a clean geometric fit. Here is how often each actually resolved its own way over the next 10 bars on US stocks & ETFs.

the 50% line = a coin flip
distance from it = the honest edge
AAPL · 1d
bearish engulfing · bearish
shape 0.75–1.00
41.3%±0.9%n=12799
Below 50
SPY · 1d
bullish engulfing · bullish
shape 0.75–1.00
57.9%±0.9%n=11539
Slight edge
AAPL · 1d
hammer · bullish
shape 0.75–1.00
57.7%±1.3%n=5597
Slight edge

Directional hit rate over the next 10 bars, 95% CI, no lookahead, on a US-stocks/ETF corpus — the same evidence block your model receives. The bearish engulfing resolved down just 41.3% of the time: the stock actually rose 58.6% of the time after it. Bullish engulfing and hammer sit the mirror distance above 50. That asymmetry is the upward drift of equities, measured — and reported, not hidden.

TL;DR

One POST /v1/brief (or the MCP tool patternfetch_brief) with { ticker, timeframe } returns detected candlestick patterns on stocks & ETFs — bullish_engulfing, bearish_engulfing, hammer, doji — in analysis.patterns, alongside the multi-bar chart patterns. Each directional pattern carries a geometric confidence (0..1), the candle index at, a span, and an evidence block with the backtested base rate + 95% CI on a US-equities corpus. doji is directionless, so it ships a shape score but no base rate.

The finding

On equities, bearish candles fight the drift.

Candlestick lore treats a bearish engulfing as a reversal-down signal. On US equities, the honest base rate says otherwise: the stock is more likely to be up 10 bars later than down, whatever the candle did — because equities have a structural upward drift. So a bearish signal lands below a coin flip, and a bullish one lands a little above.

The mechanism
  • Equities drift up over the long run, so any 10-bar window has a slight upward prior.
  • A bearish candle only "hits" if price falls — it's betting against the prior, so its rate sits below 50.
  • A bullish candle "hits" if price rises — it rides the prior, so its rate sits above 50.
  • The gap between them is the drift, quantified. patternfetch reports it instead of laundering it.
What a competitor shows vs. what we show
# typical candlestick API
{ "pattern": "bearish_engulfing",
  "signal": "SELL" }        ← confident, blind

# patternfetch
{ "name": "bearish_engulfing",
  "evidence": { "hitRate": 0.413,
    "ci95": 0.009, "n": 12799 } }
← the signal resolved its way 41% of the time
The one call

Request in, candlesticks + base rate out.

A real /v1/brief shape for Apple on the daily. Note the two figures in evidence: hitRate (went the pattern's way) and dist.winRate (actually closed up).

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

{ "ticker": "AAPL",
  "timeframe": "1d" }
Response — a candlestick in analysis.patterns
{ "name": "bearish_engulfing",
  "confidence": 1, "at": 118, "span": 2,
  "evidence": {
    "scope": "US stocks & ETFs",
    "tf": "1d", "band": "0.75-1.00",
    "horizon": 10, "n": 12799,
    "hitRate": 0.413, "ci95": 0.009,
    "dist": { "winRate": 0.586, "median": 0.008 }
  } }

A picture-perfect bearish engulfing (shape 1.00) that historically resolved bearish only 41.3% of the time (±0.9%, n=12,799) — and where the stock actually rose 58.6% of the time (dist.winRate) over the next 10 bars. Below a coin flip: the bearish "signal" fades as equities drift up. The same call also returns chart patterns, support/resistance levels, regime, interpreted indicators and a one-line nl summary. See it live →

The base rates

Every stock candlestick, with the real number.

Daily, high-confidence base rates for the candlestick set on US stocks & ETFs. Bullish patterns carry a slim edge; the bearish pattern sits below a coin flip; doji is directionless and ships no base rate.

CandlestickDirectionBase rate (10-bar)95% CISampleRead
bullish_engulfingbullish57.9%±0.9%11,539slight edge
hammerbullish57.7%±1.3%5,597slight edge
bearish_engulfingbearish41.3%±0.9%12,799below 50
dojineutraldirectionless

US stocks & ETFs · timeframe 1d · confidence band 0.75–1.00 · horizon 10 bars · gross-directional, no lookahead. Base rates vary by timeframe and band — on shorter intraday timeframes the drift is weaker and every bucket clusters nearer 50. The live number is whatever the corpus says at call time. Methodology →

Same engulfing, different corpus

On crypto pairs, the same engulfing patterns sit near a coin flip in both directions (bullish ~48%, bearish ~49% at 4h) — there's no equities-style drift to push them apart. patternfetch routes stocks to a US-equities corpus and crypto to a crypto-pairs corpus automatically, because a base rate borrowed across asset classes would be a lie. Compare on the crypto candlestick API.

Access

Free to start. MCP-native for agents.

Streamable HTTP at /mcp — discovery is free, a tools/call is billed like REST. Five tools, one schema across stocks, ETFs and crypto.

patternfetch_brief patternfetch_multi patternfetch_delta patternfetch_analogs patternfetch_capabilities
Connect (OAuth or Bearer)
# one line — OAuth mints a free key,
# nothing to paste
claude mcp add --transport http \
  patternfetch https://patternfetch.com/mcp

# or Bearer in a config file
{ "mcpServers": { "patternfetch": {
  "url": "https://patternfetch.com/mcp" } } }
Free, then pay-per-call
Free to start:

No-signup demoPOST /v1/demo returns a real brief with 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 →

FAQ

Questions.

Which candlestick patterns does it detect on stocks?
bullish_engulfing, bearish_engulfing, hammer and doji. The same response also returns multi-bar chart patterns (double_top, double_bottom, head_and_shoulders) in analysis.patterns. Directional patterns carry an evidence base rate; doji is directionless and ships a shape score only. See the chart pattern API for the multi-bar formations.
Why do bearish stock candlesticks underperform?
US equities drift up, so any forward window has a slight upward prior. A bearish candlestick only resolves "its way" if price falls, so its directional hit rate lands below a coin flip — about 41% on the daily high-confidence bucket, meaning the stock rose ~59% of the time after the signal. Bullish candlesticks (bullish engulfing, hammer) sit a few points above 50 for the same reason. patternfetch reports the drift in the base rate rather than hiding it.
How is the base rate different from confidence?
confidence is a geometric shape score (0..1) — how cleanly the candle geometry matches the textbook body/wick ratios. The base rate (evidence.hitRate) is separate: how often that pattern, timeframe and confidence band historically resolved its way over the next 10 bars, with a 95% CI and sample size, no lookahead, on a US-equities corpus.
Which timeframes and tickers are supported?
US stocks and ETFs (e.g. AAPL, SPY, MSFT, 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.