patternfetch — Market-State Briefs for AI Trading Agents
About
patternfetch — token-compact market-state briefs for AI trading agents. One call: compact candles + patterns + support/resistance + regime + interpreted indicators. MCP + REST, x402 + Stripe. github.com/MarvinRey7879/patternfetch-client
Details
- Author
- MarvinRey7879
- Downloads
- 356
- Categories
- Finance, Other, AI
Jump to
- Compact candle codec with SAX shape signature per ticker
- Detected chart patterns (double top/bottom, head & shoulders, engulfing, hammer, doji)
- Support/resistance clusters and market regime labels
- Interpreted indicators (RSI, EMA, ATR) with a one-line summary
- Token-minimal polling via /v1/delta endpoint (cheaper if unchanged)
- Pay-per-call via x402 (USDC on Base) or Stripe
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
patternfetch — Market-State Briefs for AI Trading AgentsCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Configure the MCP client as a remote streamable-http server using the URL https://patternfetch.com/mcp and an Authorization header with a Bearer token. Obtain an API key by sending a POST request to /v1/keys with your email. Then send ticker and timeframe parameters to endpoints like /v1/brief to retrieve a full brief, or use /v1/delta for token-minimal polling.
patternfetch_brief
Get a token-compact market-state brief for a stock, ETF, or crypto ticker + timeframe. Returns compact candles, detected chart/candlestick patterns with geometric confidence AND a backtested historical base rate (how often that pattern+timeframe+confidence-band actually resolved its way), support/resistance levels, trend/regime, and interpreted indicators (RSI/EMA state) plus a one-line summary. Covers US stocks/ETFs (split & dividend adjusted, delayed/EOD) and crypto spot (realtime). WHEN: an agent needs the current technical picture of a market without dumping raw OHLCV into context (saves tokens, avoids numeric hallucination). WHEN NOT: you need order execution or portfolio advice. Examples: {"ticker":"AAPL","timeframe":"1d"}, {"ticker":"BTC/USDT","timeframe":"4h"}. Output is impersonal market data, NOT investment advice.
patternfetch_multi
Get a multi-timeframe market-state view for one stock, ETF, or crypto ticker in a single call: a token-compact brief for each requested timeframe (default 1h, 4h, 1d) PLUS a cross-timeframe alignment read — whether the trends across timeframes agree or diverge, with the split spelled out (e.g. "1h up / 4h up / 1d down"). WHEN: an agent wants to know if a setup is confirmed across horizons or conflicting between them, without making 3 separate brief calls. WHEN NOT: you only care about one timeframe (use brief). The alignment/divergence is impersonal DESCRIPTIVE data, not a signal to act on. Example: {"ticker":"BTC/USDT","timeframes":["1h","4h","1d"]}. Not investment advice.
patternfetch_delta
Get only what CHANGED since your last brief for a ticker+timeframe (trend flips, new patterns, RSI-state changes). WHEN: an agent polls the same market repeatedly and wants minimal tokens — call brief once, then delta on each later poll. WHEN NOT: first look at a market (use brief). Returns changed=false when nothing material changed. Example: {"ticker":"BTC/USDT","timeframe":"4h"}. Impersonal data, not advice.
patternfetch_analogs
Find earlier windows IN THE SAME SERIES whose shape resembles the current price action and return the FULL distribution of what followed (win-rate, median, min, max, n) over a fixed forward horizon. Parameters: window = how many recent bars form the shape being matched (default 32); horizon = how many bars forward each match is measured over (default 20). WHEN: an agent wants the historical spread of outcomes after a similar-looking setup, including how wide and how uncertain that spread is. WHEN NOT: you want the current technical picture (use brief), you want to find candidates across the market (use scan), or you need one expected value — this deliberately returns a distribution, not a point estimate. NOT a prediction, NOT a backtest of a strategy; past distribution does not guarantee future results. Example: {"ticker":"ETH/USDT","timeframe":"1d"}. Impersonal data, not advice.
patternfetch_scan
Scan US stocks, ETFs, and crypto for tickers currently in a given regime or showing a chart/candlestick pattern, RANKED by the honest backtested base rate + 95% CI — discovery, NOT lookup. This is the screener: instead of asking about one ticker you already know, ask "which tickers right now are in an uptrend / printing a double_bottom, and which of those has the strongest historical base rate?" and get a ranked shortlist back. Precomputed daily over a curated universe (liquid US large-caps + core/sector ETFs + major crypto pairs) so it is fast and cheap. Filters (all optional): assetClass ("stock"|"crypto"|"all"), regime ("up"|"down"|"range"), pattern (e.g. "double_bottom","double_top","head_and_shoulders","bullish_engulfing","bearish_engulfing","hammer"), minLift (-1..1 in rate points, e.g. 0.02 = keep only patterns beating their OWN pattern-free baseline by >= 2pp; 0 = at or above baseline), minBaseRate (0..1, drop tickers whose top pattern base rate is below this), tf, limit. PREFER minLift over minBaseRate: a raw base rate is not comparable across bullish and bearish rows, so minBaseRate:0.55 mostly returns bullish patterns in a rising universe before any of them carries information, whereas minLift returns the ones that measurably add something. Rows with no baseline in the evidence table are excluded by any minLift (absence of a lift is not a lift of 0). Each row: {sym, tf, assetClass, regime, pattern, baseRate, ci95, n, scope, confidence, asOf} PLUS the drift-free comparison {baseline, lift, liftCi95, liftReading} — baseline is the direction-matched rate with no pattern present, lift is baseRate minus that baseline, and liftReading says whether the difference is distinguishable from zero at all ("above-baseline" | "below-baseline" | "indistinguishable-from-baseline"). Read lift, not baseRate, when comparing a bullish row against a bearish one: in a rising universe a bullish pattern starts ahead before it carries any information. Ranked by baseRate desc, then confidence desc, then narrower CI, then fresher asOf. WHEN: an agent wants to FIND candidates across the market, not analyze a named one (then call brief on the shortlist). WHEN NOT: you already have a specific ticker (use brief). Example: {"assetClass":"all","regime":"up","minLift":0.02,"limit":20}. Impersonal historical data, not investment advice; base rates are gross directional frequencies and do not guarantee future results.
patternfetch_capabilities
Return patternfetch's own capability matrix: which asset classes are covered (US stocks, ETFs, crypto spot), the data source and delay for each, the supported timeframes, the endpoint list, the per-call prices and tier limits, and the product version. Takes no arguments and returns the same static self-description on every call — it contains NO market data (no quotes, candles, patterns or base rates). WHEN: once at the start of a session, to learn which asset classes and timeframes are supported before calling brief/multi/delta/analogs/scan, instead of guessing and getting a validation error. WHEN NOT: you already know the ticker and timeframe are supported (go straight to brief), or you want actual market data (this returns none).
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"patternfetch \u2014 market-state briefs for ai trading agents": {
"patternfetch": {
"url": "https://patternfetch.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_PATTERNFETCH_KEY"
}
}
}
}
}
McpServers
{
"patternfetch": {
"url": "https://patternfetch.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_PATTERNFETCH_KEY"
}
}
}
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 rateandits 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.
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 atpatternfetch.com/v1/, MCP atpatternfetch.com/mcp(Streamable HTTP), plus a local stdio bridge (patternfetch-mcp).
A detector that only reportsdouble_top, confidence 0.92tells an agent nothing about whether that pattern has ever meant anything. patternfetch attaches anevidenceblock to each detected pattern:
{ "name": "double_top", "confidence": 0.92, "evidence": { "scope": "US stocks & ETFs", "tf": "1d", "band": "0.75-1.00", "horizon": 10, "n": 7508, "hitRate": 0.431, "ci95": 0.011, "lift": { "baseline": 0.419979, "baselineN": 46038, "lift": 0.011021, "ci95": 0.012075, "informative": false, "reading": "indistinguishable-from-baseline" } } }
hitRateis 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 nexthorizonbars went the expected direction. The forward window starts at detection, so there is no lookahead. No stops, fees or slippage are modelled.
liftcompares that hit rate against the baseline of the same market with no pattern present. Many patterns come backindistinguishable-from-baseline— that is the honest result, and reporting it is the point. An agent can filter oninformativeinstead 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-sourcehonest-signalstool.
No key required — the demo endpoint is public:
curl -X POST https://patternfetch.com/v1/demo \ -H 'content-type: application/json' \ -d '{"ticker":"AAPL","timeframe":"1d"}'
With a key (self-serve, $3 starter credit):
curl -X POST https://patternfetch.com/v1/keys -d '{"email":"you@example.com"}' curl -X POST https://patternfetch.com/v1/brief \ -H 'authorization: Bearer pf_...' \ -H 'content-type: application/json' \ -d '{"ticker":"BTC/USDT","timeframe":"4h"}'
import { Patternfetch } from 'patternfetch'; const { key } = await new Patternfetch().createKey('you@example.com'); const pf = new Patternfetch({ apiKey: key }); const brief = await pf.brief({ ticker: 'AAPL', timeframe: '1d' }); console.log(brief.analysis.nl); // "AAPL: uptrend (strong), +0.14% last 1d, RSI 71.66 (overbought), // bearish_engulfing (conf 1, hist 41% over 10b, lift -0.7pp vs 42% base (within noise))." for (const p of brief.analysis.patterns) { if (p.evidence?.lift.informative) console.log(p.name, p.evidence.hitRate, p.evidence.lift.lift); }
Six tools, the same set over MCP (patternfetch_) and REST (POST /v1/*).
patternfetch is aremote MCP server(Streamable HTTP) athttps://patternfetch.com/mcp. Tools:patternfetch_brief,patternfetch_multi,patternfetch_delta,patternfetch_analogs,patternfetch_scan,patternfetch_capabilities. Discovery (initialize,tools/list) is free — no key. Onlytools/callneeds 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:
claude mcp add --transport http patternfetch https://patternfetch.com/mcp
Inclaude.ai: Customize → Connectors → Add custom connector →https://patternfetch.com/mcp→ Authorize.
Or with a Bearer key— add to your MCP config:
{ "mcpServers": { "patternfetch": { "url": "https://patternfetch.com/mcp", "headers": { "Authorization": "Bearer pf_..." } } } }
Get a free key (small starter credit) athttps://patternfetch.com/v1/keys.
Prefer a local stdio server (Claude Desktop, sandboxes, no inbound HTTP)? This package shipspatternfetch-mcp, a zero-dependency stdio↔HTTP bridge that exposes the same tools and forwards calls topatternfetch.com:
{ "mcpServers": { "patternfetch": { "command": "npx", "args": ["-y", "patternfetch-mcp"], "env": { "PATTERNFETCH_API_KEY": "pf_..." } } } }
tools/listworks with no key and falls back to the embedded snapshot (mcp-tools.json) when the remote is unreachable, so introspection always succeeds. Tool calls usePATTERNFETCH_API_KEY, OAuth or x402. Override the endpoint withPATTERNFETCH_MCP_URL.
Refresh the snapshot from the live server:
curl -s -X POST https://patternfetch.com/mcp \ -H 'content-type: application/json' \ -H 'accept: application/json, text/event-stream' \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
$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.
patternfetch providesimpersonal 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. Seepatternfetch.com/disclaimer,/methodologyand/terms.
Coinrule Agentic Trading MCP enables investors to create, backtest, execute, and manage trading agents through natural language across stocks, crypto and ETFs
Institutional squeeze scanner, options flow, IWM 0DTE, AI council verdicts. Pay per call in RLUSD on XRPL — no API keys. Agent Credit Bureau, signal marketplace, hiring protocol.
Manage your crypto trading bots, deals, and backtests from your AI assistant.
Live scored Solana memecoin signals with safety profiles, conviction scoring, and paper trading for AI agents.
Keyless CEX/DEX signing for AI agents — exchange API keys stay inside an AWS Nitro Enclave, so a prompt-injected agent can't leak them. Binance, OKX, Bybit, KuCoin, Hyperliquid, Asterdex.
Risk Intelligence MCP Server for crypto agents — 52 tools, 72B AI model, 560+ signals, derivatives, on-chain, autonomous trading
Full-lifecycle algorithmic trading: describe strategies in plain English, AI generates code, backtest on real data, deploy live to 10+ brokers. Stocks, options, crypto, futures. Free tier available.
Integrate AI with high-frequency cryptocurrency trading systems.
Crypto trading backtesting, bot deployment, and account management for Sentinel Bot via AI agents.
63 deterministic quant computation tools for autonomous financial agents. Options pricing, derivatives, risk, portfolio optimization, statistics, crypto/DeFi, macro/FX. 1,000 free calls/day, no signup.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.




