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 spot · 1m → 1d · candlestick + chart patterns

Try free — no signup Read the docs

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 $0.05 starter credit (~5 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_…" }
    }
  }
}

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.

Related

Chart pattern detection API · Support/resistance levels API · Technical indicators API · Docs · Try it free