Glossary

The terms behind patternfetch

Plain definitions of the market-data and agent concepts patternfetch uses. patternfetch returns a token-compact market-state brief — patterns, support/resistance, regime, interpreted RSI/EMA/ATR, and a one-line summary — in one agent-payable call.

Market-state brief

A compact, structured digest of one crypto ticker and timeframe — compact candles, detected patterns, support/resistance, a regime label, interpreted indicators, and a one-line summary — small enough to put directly in an LLM's context. Returned by one POST /v1/brief call. See the docs.

Compact candle codec

A token-efficient encoding of OHLCV candles: one row per candle as o,h,l,c,v (semicolon-joined, no per-row timestamp), at a fixed decimal precision chosen by price magnitude. Carries the raw numbers in a fraction of the tokens of a JSON array. Detail in the methodology.

SAX shape signature

A short a–g fingerprint (≤8 chars) of recent price action, computed over z-normalized close-to-close returns and collapsed with PAA. Summarizes the shape of a series — not a forecast.

Market regime

A label for the current state: trend (up, down, or range), a 0–1 strength, and volPct (ATR as a percent of price). Tells an agent whether the market is trending or chopping. More: market-regime API.

Support & resistance level

A price clustered from swing pivots where the market has repeatedly reacted, each with a 0–1 strength (1 = strongest / most-tested). More: support/resistance API.

Interpreted indicator

An indicator returned as a labeled state, not a number wall — e.g. RSI as {v, state: overbought/oversold/neutral}, EMA as {v, state: above_20_50…}. The value is computed server-side so the LLM reads a verified label instead of doing arithmetic. More: indicators API · why this reduces hallucination.

Historical analog

An earlier window of the same series whose shape resembles the current price action (cosine similarity over z-normalized windows). patternfetch returns the full forward-outcome distribution of such analogs (win-rate, median, min, max) — winners and losers, not a prediction. Like any directional frequency, the win-rate is readable only against the pattern-free baseline for the same market, timeframe and horizon.

Directional base rate

How often a given pattern, timeframe and confidence band historically resolved in its own direction over a fixed forward horizon (10 bars), measured with no lookahead. Returned as hitRate in a brief's evidence block and as baseRate in a scan row. Not an edge on its own — it only carries information relative to the pattern-free baseline.

Pattern-free baseline

The rate at which any window of the same length closes in a given direction for the same market and timeframe, with no pattern involved — the only valid reference for a base rate. It is not 50%: US equities drift upward, so over 10 bars US stocks & ETFs close up 57.8% of the time on the daily, 61.2% on the weekly, 54.0% on 4h and 52.7% on 1h. Crypto shows no comparable drift, so its baseline genuinely does sit near 50% — 49.3% on the daily, 49.7% on 4h, 50.5% on 1h. A crypto pattern at 50% is matching its baseline; a stock pattern at 50% is well below its own.

Lift

The gap between a base rate and its pattern-free baseline, in percentage points, with a cluster-robust 95% CI (clustered by calendar day, since ~117 tickers move together on the same day and counting them as independent makes intervals far too narrow). Lift is the quantity that would be an edge. Across the 105 buckets measured so far — 60 stock, 45 crypto — three clear an uncorrected interval, all three on crypto: fewer than the ~5.3 that chance alone would produce, and none survives correcting for having tested 105 buckets. Only one of the 105 lands above its baseline (double_top 1d, +9.78pp on n=149); on US stocks & ETFs it is 0 of 60. See the methodology.

Token-compact

Designed to use few LLM tokens. A brief carries the signal of hundreds of candles in a few hundred tokens — lower cost and latency, and it avoids the numeric hallucination that long raw-number arrays cause. More: token cost of raw OHLCV.

x402

An open standard for paying per HTTP call: the server replies 402 with payment requirements, the client signs a USDC payment, and a facilitator settles it on-chain. patternfetch accepts x402 on Base mainnet, so an AI agent can pay with no account. More: how an agent pays.

MCP (Model Context Protocol)

A protocol that lets AI agents call external tools. patternfetch ships an MCP server over Streamable HTTP at /mcp with tools patternfetch_brief, patternfetch_delta, patternfetch_analogs, patternfetch_capabilities; discovery is free. Setup in the how-to.