Crypto candlestick pattern API

How does an AI agent detect crypto candlestick patterns from an API?

It makes one call. Send a ticker and a timeframe to POST /v1/brief (or call the MCP tool patternfetch_brief); the API does the detection and returns the patterns it found — each with a confidence score, where it is, and how wide it is. The agent never has to draw a chart, scrape an exchange, or reason over raw candles.

Crypto spot1m → 1dcandlestick + chart patterns

TL;DR — One POST /v1/brief — or the MCP tool patternfetch_brief — with { ticker, timeframe } returns the detected candlestick and chart patterns. Each detection carries a geometric confidence (0..1), the candle index it sits on (at), and how many candles it spans (span). The server does the geometry; your agent never has to chart anything or scrape an exchange.

Patterns detected

The same brief reports both single/few-candle candlestick patterns and multi-candle chart patterns:

bullish_engulfing bearish_engulfing hammer doji double_top double_bottom head_and_shoulders

Candlestick patterns (bullish_engulfing, bearish_engulfing, hammer, doji) describe the shape of one or two candles. Chart patterns (double_top, double_bottom, head_and_shoulders) describe a multi-candle formation. Both come back in the same analysis.patterns array, with the wider chart patterns carrying a larger span.

The one call

Request

curl -X POST https://patternfetch.com/v1/brief \
  -H "Authorization: Bearer pf_…" \
  -H "Content-Type: application/json" \
  -d '{ "ticker": "BTC/USDT",
        "timeframe": "4h" }'

Response — analysis.patterns

"patterns": [
  { "name": "double_bottom",
    "confidence": 0.86,
    "at": 158, "span": 14 },
  { "name": "bullish_engulfing",
    "confidence": 0.71,
    "at": 142, "span": 2 }
]

Each entry tells the agent what was detected (name), how cleanly the geometry matched (confidence, 0..1), where it sits in the series (at = candle index), and how wide it is (span = candles covered). So {"name":"double_bottom","confidence":0.86,"at":158,"span":14} means a high-quality double bottom spanning 14 candles ending around index 158.

That same brief — one call, one price — also returns support/resistance levels, the regime (trend / strength / volatility), interpreted indicators (RSI/EMA state, not just numbers), and a one-line nl summary the agent can act on. Patterns are just one field of the whole market-state brief, so the agent gets the full context in the same round trip.

Free + how to pay

Free to start — no wall for agents:

No-signup demoPOST /v1/demo returns a real brief (with patterns) and no key. ② Free key with $3.00 starter credit (300 briefs) from one call, no card. ③ Then pay-per-call: brief $0.01/call. Pay with x402 (USDC on Base, no account) or a Stripe card. Only actual calls are metered. Pricing →

For AI agents (MCP)

The MCP tool is patternfetch_brief — same input, same patterns array, no HTTP plumbing in your agent. Two ways to connect, both zero-friction:

A) OAuth — one click, no key handling

Add the server URL in Claude.ai, Cursor or Smithery and click Authorize once — patternfetch mints a free-tier key for you automatically, nothing to paste.

# Claude.ai → Settings → Connectors → Add custom connector
https://patternfetch.com/mcp
# click Authorize → free key minted

B) Bearer key

{
  "mcpServers": {
    "patternfetch": {
      "url": "https://patternfetch.com/mcp",
      "headers": { "Authorization": "Bearer pf_…" }
    }
  }
}

The honesty layer: every pattern ships its base rate

Most pattern and signal APIs hand a model a confident-looking "double_bottom", 0.86 and let it quote that blind. patternfetch attaches an evidence block to every detected pattern — the backtested historical hit-rate for that exact pattern, timeframe and confidence band, the pattern-free baseline for the same market and horizon, and a cluster-robust interval on the difference — measured with no lookahead (chart patterns are scored only from the bar they become knowable). A hit rate on its own cannot be read: a drifting market moves it away from 50% with no pattern involved. Measured against the baseline instead, three of the 105 buckets we tested clear an uncorrected cluster-robust 95% interval — and all three are crypto: bullish_engulfing 1h −1.76pp (±1.36, n=8,897), double_bottom 1d −12.25pp (±8.91, n=143), and double_top 1d +9.78pp (±8.42, n=149), the only bucket of the 105 that lands above its baseline. That is fewer than the ~5.3 chance alone would produce at this threshold, and none of the three survives a Bonferroni correction across 105 comparisons; on US stocks & ETFs it is 0 of 60. The evidence block reports exactly that, instead of laundering a shape score into a confident call. Impersonal market data, not advice. See the method →

FAQ

Which candlestick patterns does the API detect?
Candlestick patterns: bullish_engulfing, bearish_engulfing, hammer and doji. Chart patterns: double_top, double_bottom and head_and_shoulders. Each detection returns a confidence (0..1), the candle index at, and a span.
How is confidence computed?
It is a geometric quality score from 0 to 1 — how cleanly the candle geometry matches the textbook shape (body/wick ratios for candlesticks; peak/trough symmetry and neckline fit for chart patterns). It is a shape-match score, not a probability of profit or of any future price move.
Does it work for any crypto pair?
It works for crypto spot pairs on timeframes from 1m to 1d. Pass a pair like BTC/USDT or ETH/USDT and a timeframe such as 1m, 5m, 15m, 1h, 4h or 1d.
Is this investment advice?
No. It's impersonal market data and algorithmic pattern detections, for informational purposes only — not advice, not personalized, non-executing. See the disclaimer.