Short answer: don't put raw OHLCV candles in the model's context. Call one endpoint that returns the digested market state — compact candles, patterns, support/resistance, regime, and interpreted indicators — small enough to drop straight into a prompt or read from an MCP tool.
The instinct when wiring market data into an LLM agent is to fetch the last few hundred OHLCV candles and paste them in. Two things go wrong:
patternfetch does the structural work deterministically, server-side, and returns a compact brief per (ticker, timeframe):
# 1) get a free key
curl -X POST https://patternfetch.com/v1/keys -d '{"email":"you@example.com"}'
# 2) get a brief
curl -X POST https://patternfetch.com/v1/brief \
-H "authorization: Bearer pf_..." \
-d '{"ticker":"BTC/USDT","timeframe":"4h"}'
Feed the returned brief — not the raw candles — into the model. Other endpoints: /v1/delta (what changed since last brief), /v1/candles (compact codec only), /v1/analogs (historical analogs). Full schema in the OpenAPI spec and llms.txt.
If your agent speaks MCP, point it at the patternfetch MCP server and call patternfetch_brief directly — no glue code. Tools: patternfetch_brief, patternfetch_delta, patternfetch_analogs, patternfetch_capabilities. Billed per call via x402 (USDC on Base, no account) or Stripe.
Why not just send raw OHLCV candles to the LLM?
A few hundred candles is a large, repetitive block of numbers — it costs tokens on every call, and LLMs are unreliable at deriving structure from raw numbers. A brief does that computation deterministically and returns a small, structured result.
What timeframes and assets are supported?
Crypto spot pairs, minute to daily (1m, 5m, 15m, 1h, 4h, 1d).
Is this investment advice?
No. patternfetch returns impersonal market data and algorithmic signals for informational purposes only — not advice, not personalized, not a recommendation.