patternfetch Stock technical indicators API

Stock indicators · API + MCP

RSI, EMA and ATR on stocks — as a label, on adjusted prices.

One POST /v1/brief with a stock or ETF ticker returns the interpreted state of the indicators, not a 200-number array: overbought, above_20_50, a volatility percentage — with the exact numeric value still attached. And because equities split and pay dividends, everything is computed on adjusted candles, so a corporate action never fakes a crossover your agent then acts on.

StocksETFsRSI · EMA · ATR1m → 1wYahoo · adjusted

TL;DR — One POST /v1/brief (or the MCP tool patternfetch_brief) with a stock or ETF ticker returns interpreted indicator state: RSI as { v, state: overbought | oversold | neutral }, EMA as { v, state: above_20_50 | below_20_50 | mixed | above_20 | below_20 }, and volatility as volPct (ATR as a percentage of price, in the regime block). All computed on split- and dividend-adjusted candles. The same call also returns patterns, support/resistance levels and a one-line nl summary.

Why a label instead of an array

An LLM reasoning over a long array of indicator numbers does two things badly: it burns tokens carrying the array, and it hallucinates when it has to compare, average or cross those numbers itself. A state label sidesteps both. overbought is cheap to carry and unambiguous to act on; above_20_50 already encodes the moving-average relationship the agent would otherwise derive by hand — badly. The numeric v is still in the payload for anyone who needs the exact figure, so you lose nothing; you just stop paying for arithmetic the model gets wrong. Thresholds and windows are documented in the methodology. The failure mode itself is worked through on the indicator hallucination page.

Why adjusted prices decide the answer

This is the part that has no crypto equivalent. A crypto pair trades continuously and never splits; a stock does both, and an indicator computed on the unadjusted series will confidently report something that never economically happened.

What breaks unadjusted

  • A 4:1 split drops the raw price 75% overnight. RSI reads that as a violent selloff and can print oversold on a day nothing happened.
  • A dividend knocks the price down by the payout — small, but it accumulates across the EMA window.
  • Either can push price across its 20 or 50 EMA and manufacture a crossover out of an accounting event.

What patternfetch does

  • Indicators are computed on split- and dividend-adjusted candles from Yahoo.
  • The state label therefore describes the market, not the corporate action.
  • The same adjusted series feeds patterns and levels, so every block of the brief agrees with every other block.

The one call

A real /v1/brief shape for Apple on the daily. Indicators arrive interpreted; volPct rides along in regime.

Request

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

Response (indicators, interpreted)

"indicators": {
  "rsi": { "v": 61.4, "state": "neutral" },
  "ema": { "v": 229.83, "state": "above_20_50" }
},
"regime": {
  "trend": "up",
  "strength": 0.38,
  "volPct": 1.42
}
rsi.v
61.4
rsi.state
neutral
ema.v
229.83
ema.state
above_20_50
regime.trend
up
regime.strength
0.38
regime.volPct
1.42

The same call also returns detected chart & candlestick patterns, clustered support/resistance levels and a one-line nl summary — the indicators above are one block of the full brief, not a separate endpoint to stitch in. See it live →

The state vocabulary

A small, closed set of labels — which is the point. An agent can branch on these without a parser and without a prompt explaining what 71.2 means.

FieldStatesWhat it encodes
rsi.stateoverbought · neutral · oversoldMomentum extreme, from the RSI value
ema.stateabove_20_50 · above_20 · mixed · below_20 · below_20_50Price position against the 20 and 50 averages
regime.trendup · down · sidewaysDirectional regime over the window
regime.volPctnumeric %ATR as a percentage of price — includes overnight gaps

On equities volPct carries something a continuous market's doesn't: because ATR uses true range, the gap between one session's close and the next session's open is inside the number. For an agent sizing overnight exposure that is the correct reading — the gap is the risk. Methodology →

Free to start. MCP-native for agents.

Streamable HTTP at /mcp — discovery is free, a tools/call is billed like REST. Five tools, one schema across stocks, ETFs and crypto.

patternfetch_brief patternfetch_multi patternfetch_delta patternfetch_analogs patternfetch_capabilities

Connect (OAuth or Bearer)

# one line — OAuth mints a free key,
# nothing to paste
claude mcp add --transport http \
  patternfetch https://patternfetch.com/mcp

# or Bearer in a config file
{ "mcpServers": { "patternfetch": {
  "url": "https://patternfetch.com/mcp" } } }

Free, then pay-per-call

Free to start:No-signup demoPOST /v1/demo returns a real brief with indicators, no key. ② Free key with $3.00 starter credit (300 briefs) from one call, no card. A brief is $0.01. Pay with x402 (USDC on Base, no account) or Stripe. Credits never expire. Pricing →

Questions.

Which indicators do you return for stocks?
RSI, EMA and ATR — interpreted. RSI as overbought / oversold / neutral; EMA as its position relative to the 20/50 averages (above_20_50, below_20_50, mixed, above_20, below_20); ATR as volPct — volatility as a percentage of price — inside the regime block. Every indicator also ships its numeric value in v.
Are the indicators computed on adjusted prices?
Yes — on split- and dividend-adjusted candles from Yahoo. This matters more than it sounds: an unadjusted series drops discontinuously on a split or a dividend, which can push RSI toward a false oversold reading and can fabricate an EMA crossover that never happened in economic terms. Adjusting first means the state label describes the market, not the corporate action.
How do overnight gaps affect ATR and volPct?
ATR uses true range, which includes the gap between one session's close and the next session's open. Because equities trade in sessions rather than continuously, a stock's volPct reflects overnight gap risk as well as intraday movement. That's the intended reading: for an agent sizing overnight exposure, the gap is the risk, so it belongs in the number.
Can I still get the raw values?
Yes. The numeric v is included with every indicator (e.g. rsi.v = 61.4) alongside the state. For raw candles to compute your own indicators, call POST /v1/candles for the compact candle codec.
Which tickers and timeframes are supported?
US stocks and ETFs (e.g. AAPL, SPY, MSFT, QQQ) from Yahoo, split & dividend adjusted, delayed/EOD — plus crypto spot pairs (e.g. BTC/USDT) from Binance, realtime. Timeframes 1m, 5m, 15m, 30m, 1h, 4h, 1d, 1w.
Is this investment advice?
No. It's impersonal market data and algorithmic signals, for informational purposes only — not investment, financial, legal or tax advice, not personalized, non-executing. See the disclaimer.
Related

Keep exploring.