patternfetch
patternfetch is a market-data API for AI agents covering US stocks, ETFs and crypto spot. One
call with a ticker and a timeframe returns a token-compact market-state report: compact candles,
detected chart and candlestick patterns, support and resistance levels, market regime, and
interpreted indicators (RSI, EMA). Every detected pattern carries its backtested historical hit rate
and its lift against the pattern-free baseline of the same market, so an agent can tell a
pattern that carries information from one that does not. Six tools — brief, multi, delta,
analogs, scan, capabilities — reachable over REST and MCP, with one-click OAuth, credit
billing via Stripe or x402 USDC on Base, a keyless demo endpoint, and $3 starter credit on signup.
Impersonal market data, not investment advice.
[npm]
[patternfetch MCP server]
[license]
Why it's smaller: for BTC/USDT 4h (120 candles), a raw OHLCV dump is ~3,260 tokens of just numbers the model still has to analyze; patternfetch's interpreted analysis is ~1,323 tokens, already decided. Reproduce it (no account needed).
- Coverage: US stocks and ETFs (split- and dividend-adjusted, delayed/EOD, via Yahoo), crypto
spot (realtime, via Binance).
- Timeframes:
1m, 5m, 15m, 30m, 1h, 4h, 1d, 1w.
- Access: REST at
patternfetch.com/v1/*, MCP at patternfetch.com/mcp (Streamable HTTP),
plus a local stdio bridge (patternfetch-mcp).
Why base rates and lift
A detector that only reports double_top, confidence 0.92 tells an agent nothing about whether that
pattern has ever meant anything. patternfetch attaches an evidence block to each detected pattern:
hitRate is the realizable gross directional base rate: the fraction of non-overlapping historical
occurrences of that pattern, in that timeframe and confidence band, whose close-to-close return over
the next horizon bars went the expected direction. The forward window starts at detection, so
there is no lookahead. No stops, fees or slippage are modelled.
lift compares that hit rate against the baseline of the same market with no pattern present. Many
patterns come back indistinguishable-from-baseline — that is the honest result, and reporting it
is the point. An agent can filter on informative instead of trusting a geometric confidence score.
Calibration. Across 105 audited categories, 3 fall outside their confidence interval — fewer
than the ~5.3 that chance alone predicts across 105 comparisons. For US stocks it is 0 of 60. Method
and full tables:
patternfetch.com/pattern-base-rates-study. The
measurement is reproducible with the open-source
honest-signals tool.
Quickstart
No key required — the demo endpoint is public:
With a key (self-serve, $3 starter credit):
JavaScript client:
Tools
Six tools, the same set over MCP (patternfetch_*) and REST (POST /v1/*).
Client methods
MCP
patternfetch is a remote MCP server (Streamable HTTP) at https://patternfetch.com/mcp.
Tools: patternfetch_brief, patternfetch_multi, patternfetch_delta, patternfetch_analogs,
patternfetch_scan, patternfetch_capabilities.
Discovery (initialize, tools/list) is free — no key. Only tools/call needs auth.
One-click OAuth (nothing to paste) — in Claude Code, Claude Desktop, Cursor or Smithery, add the
URL and authorize once; a free-tier key is minted for you:
In claude.ai: Customize → Connectors → Add custom connector → https://patternfetch.com/mcp → Authorize.
Or with a Bearer key — add to your MCP config:
Get a free key (small starter credit) at https://patternfetch.com/v1/keys.
Local stdio bridge
Prefer a local stdio server (Claude Desktop, sandboxes, no inbound HTTP)? This package
ships patternfetch-mcp, a zero-dependency stdio↔HTTP bridge that exposes the same tools
and forwards calls to patternfetch.com:
tools/list works with no key and falls back to the embedded snapshot
(mcp-tools.json) when the remote is unreachable, so introspection always
succeeds. Tool calls use PATTERNFETCH_API_KEY, OAuth or x402. Override the endpoint with
PATTERNFETCH_MCP_URL.
Refresh the snapshot from the live server:
Pricing
$3 starter credit on signup, at least $0.50 of it usable immediately without a card. After that, pay
per call from credit, topped up via Stripe or x402 USDC on Base. Studio plan: $19/month including
$25 of usage.
Live figures: GET /v1/platforms.
Legal
patternfetch provides impersonal market data and algorithmic signals for informational purposes
only. NOT investment, financial, legal or tax advice, and not a recommendation to buy, sell or
hold any security or crypto-asset. Outputs are not personalized to you. Base rates are gross
directional frequencies without stops, fees or slippage; past performance and historical analogs do
not guarantee future results. Markets are volatile — you may lose all capital. Do your own research.
See patternfetch.com/disclaimer,
/methodology and
/terms.