Market regime · for AI agents

How does an AI agent know the current market regime?

It asks once. A single patternfetch /v1/brief call returns a labeled regime — trend, strength and volatility — that every agent in a crew can read off the same response, instead of each one re-deriving it from raw candles.

Try free — no signup Read the docs

TL;DR

One patternfetch /v1/brief call returns a regime object — trend (up / down / range), a strength from 0..1, and volPct (volatility, ATR as a percent of price) — so every agent in a multi-agent crew can share the same regime label instead of each re-deriving it from raw candles.

What "regime" means here

patternfetch's regime is a small, honest object — three fields, nothing more:

FieldTypeMeaning
trend"up" | "down" | "range"up = uptrend (trending up) · down = downtrend (trending down) · range = sideways / chop
strength0..1How pronounced the trend is. Closer to 1 = stronger/cleaner; closer to 0 = weak or ambiguous.
volPctnumber (percent)Volatility: ATR (Average True Range) expressed as a percent of price.

So a value like "regime":{"trend":"up","strength":0.42,"volPct":2.13} reads as: a moderate uptrend with ~2.1% ATR volatility. That is the entire regime — there is no separate "bull/bear/chop confidence %" field to track. If you want the strength of the move, read strength; if you want how choppy it is, read volPct.

Defined term: market regime

Market regime — the prevailing state of a market over a window of candles, summarized as a direction (trend: up = uptrend, down = downtrend, range = sideways/chop), a magnitude of that direction (strength, 0..1), and how volatile it is (volPct, ATR as a percent of price). A regime label lets an agent reason about what kind of market it is in before deciding what to do.

Why agents need a shared regime

In a multi-agent trading setup the regime is a shared assumption — and if two agents disagree about it, they fight each other. Picture a crew of three:

📈 trend-following agent — wants to act when trend is up/down with high strength ↩️ mean-reversion agent — wants range / low strength 🧭 supervisor — arbitrates, sizes, and vetoes when volPct is extreme

If each agent pulls its own candles and runs its own ad-hoc trend logic, they can label the same market differently — one sees an uptrend, another sees chop — and the supervisor has no single source of truth to reconcile. The fix is boring and reliable: make one cheap call, then hand the same regime object to all three. Now the trend agent and the mean-reversion agent are arguing about what to do, not what the market is — which is the argument you actually want them to have.

The one call

POST a ticker and timeframe; read the regime object straight off the response:

Request
curl -X POST https://patternfetch.com/v1/brief \
  -H "Authorization: Bearer pf_…" \
  -H "Content-Type: application/json" \
  -d '{ "ticker": "BTC/USDT",
        "timeframe": "4h" }'
Response — the regime object
{
  "analysis": {
    "regime": {
      "trend": "up",
      "strength": 0.42,
      "volPct": 2.13
    }
    // …also: patterns, levels,
    //         indicators, nl
  }
}

The same /v1/brief call also returns patterns (chart & candlestick), levels (support/resistance), interpreted indicators (RSI/EMA/ATR), and a one-line nl summary — so you get the regime and the rest of the market state in a single token-compact response, no extra round-trip. Pass just the regime object to your crew, or hand them the whole brief. See it live →

Free + pay

No-signup demoPOST /v1/demo returns a real brief (with its regime) and no key. ② Free key with $0.05 starter credit (~5 briefs) from one call, no card — POST /v1/keys. ③ Pay per call: a brief is $0.01, settled with Stripe or x402 (USDC on Base, no account). ④ MCP one-click — connect via OAuth and patternfetch mints a free-tier key for you; nothing to paste. Pricing →

FAQ

What regimes does patternfetch report?

Three fields: trend (up = uptrend, down = downtrend, range = sideways/chop), a strength from 0..1, and volPct (volatility as ATR % of price). That is the whole regime — there is no separate bull/bear/chop confidence percentage.

How is the regime computed?

The trend label and 0..1 strength come from patternfetch's trend classification over the candle window; volPct is ATR (Average True Range) as a percent of price. The exact rules are on the methodology page.

Can multiple agents share the same regime?

Yes — make one /v1/brief call and pass the returned regime object to every agent in the crew. A trend-following agent, a mean-reversion agent and a supervisor all read the same trend, strength and volPct instead of each re-deriving it from raw candles.

Is the regime label investment advice?

No. It's impersonal, algorithmic market data for informational purposes only — not advice, not personalized, non-executing. See the disclaimer.

Keep reading

Interpreted RSI/EMA/ATR → Support/resistance levels → How it's computed → Full API docs → Try a live brief →