patternfetch Stock support & resistance levels API
Stock levels · API + MCPSupport and resistance on stocks — computed on adjusted prices.
One POST /v1/brief with a stock or ETF ticker returns clustered support and resistance levels, each with a strength score, derived from swing pivots. No charts to parse, no lines to draw. And because equities split, pay dividends and trade in sessions, the levels are built on split- and dividend-adjusted candles — so a 4:1 split doesn't leave your agent staring at a level four times above the current price.
StocksETFs1m → 1wYahoo · adjustedswing-pivot levels
TL;DR — One POST /v1/brief (or the MCP tool patternfetch_brief) with { ticker, timeframe } returns clustered support and resistance levels for stocks & ETFs in analysis.levels, each a { price, strength } pair with strength 0..1 (1 = strongest / most-tested). Levels are computed from swing pivots on adjusted candles. The same call also returns chart & candlestick patterns, a regime label, interpreted indicators and a one-line nl summary.
How the levels are built
patternfetch detects swing-pivot highs and lows in the recent candle window — local extrema where price reversed — then clusters nearby pivots into discrete levels. Each cluster of touches becomes one support level (below the current price) or one resistance level (above it). The strength score reflects how many times price touched or reacted near that level and how significant those reactions were: a level tested repeatedly scores closer to 1, a level touched once scores lower. It is fully algorithmic — computed from the OHLCV series, never hand-drawn — and ranked relative to the other levels in the same set. The exact pivot-detection and clustering rules live in the methodology.
What makes equities different
Levels on a stock are not the same problem as levels on a 24/7 spot pair. Three things change, and all three are handled before your agent sees a number.
Corporate actions
- Stocks split and pay dividends. On unadjusted prices, a pivot from before a split sits at a price the stock will never revisit.
- patternfetch reads split- and dividend-adjusted candles, so every level is on the same basis as today's price.
- A level from two years and one split ago is still directly comparable to the last close.
Sessions and gaps
- Equities trade in sessions. A stock can gap over a level overnight without ever trading at it.
- Pivots are detected on the series as it actually printed — a gapped-over level stays in the set, carrying only the strength its real touches earned.
- strength is therefore the signal for tested versus merely passed.
Crypto spot has neither problem — it trades continuously and never splits — which is why the same endpoint routes stock tickers to adjusted equity candles and crypto tickers to exchange data automatically. See the crypto support/resistance API for the continuous-market side.
The one call
A real /v1/brief shape for Apple on the daily. Levels come back sorted, nearest-to-price first, in analysis.levels.
Request
curl -X POST https://patternfetch.com/v1/brief \
-H "Authorization: Bearer pf_…" \
-H "Content-Type: application/json" \
-d '{ "ticker": "AAPL",
"timeframe": "1d" }'
Response — analysis.levels
{
"support": [
{ "price": 218.40, "strength": 1 },
{ "price": 211.75, "strength": 0.62 }
],
"resistance": [
{ "price": 237.90, "strength": 1 },
{ "price": 244.20, "strength": 0.55 }
]
}
Each level is a { price, strength } pair. strength: 1 marks the strongest / most-tested level in the set; lower values are weaker. The same POST /v1/brief call also returns chart & candlestick patterns with their evidence block, a regime label (trend + volatility), interpreted indicators (rsi, ema) and a one-line nl summary — the full market state in one token-compact response, not four round trips. See it live →
Levels are per timeframe, not per ticker
The same stock has different levels on different timeframes, and that is not a bug — a 1d pivot and a 1w pivot describe different populations of market participants. Ask for the timeframe your agent actually reasons on.
| Timeframe | Window it summarises | Typical use for an agent |
|---|---|---|
| 1m — 30m | Intraday session structure | Entry/exit refinement inside a session |
| 1h — 4h | Multi-session swing structure | Swing context, overnight-risk framing |
| 1d | Months of daily closes | The default for equity market-state briefs |
| 1w | Multi-year structure | Long-horizon levels, position framing |
Need several at once? POST /v1/multi returns the same brief across a set of timeframes in one call, so an agent can see whether a daily resistance is also a weekly one. Multi-timeframe brief →
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.
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 demo — POST /v1/demo returns a real brief with levels, 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 →