FRED for agents.
REST + CLI + MCP for FRED's macro time series, joined to the prediction markets pricing each release.
Two ways in. Use it as the agent-callable FRED feed: one call returns the macro series the question is about, CPI, FFR, NFP, unemployment, GDP, M2, with computed previous-observation and year-ago deltas, plus an aggregated LLM answer in plain English. Or use it as a market edge: add includeMarkets=true and the same call attaches the Kalshi and Polymarket contracts pricing the next print. FRED owns the data; SimpleFunctions runs the aggregation, delta computation, and cross-reference layer on top.

Antwerp Bourse, 1531 — the world's first organized macro pricing room.
An aggregated LLM answer over FRED + matched markets
This is the differentiator vs hitting FRED directly. The economic data API runs an LLM aggregator over the matched FRED series, computes the previous and year-ago deltas for every series, and attaches matched Kalshi / Polymarket contracts whenincludeMarkets=true. Two real responses below.
One natural-language query → series + computed deltas → synthesized answer → optional matched markets.
FRED owns the series. SimpleFunctions runs the aggregation layer.
“cpi”LLM answer
The Consumer Price Index for All Urban Consumers (CPIAUCSL) stood at 330.293 on March 1, 2026, up from 326.588 on January 1, 2026. The core CPI excluding food and energy (CPILFESL) reached 334.165 on March 1, 2026, compared to 332.793 three months earlier. Both indices show a steady upward trend over the first quarter of 2026.
Series (2)
Consumer Price Index for All Urban Consumers — All Items
CPIAUCSL · Index 1982–1984 = 100 · Monthly · Seasonally Adjusted
330.2932026-03-01
+2.83 (+0.87%)Δ y/y +10.51 (+3.29%)Core CPI — All Items Less Food and Energy
CPILFESL · Index 1982–1984 = 100 · Monthly · Seasonally Adjusted
334.1652026-03-01
“fed funds rate”LLM answer
The Federal Funds Effective Rate stood at 3.64% as of March 1, 2026, down from 3.88% in November 2025 and 4.09% in October 2025. The Federal Funds Target Range Upper Limit has been holding steady at 3.75% as of late April 2026. The Fed has maintained its policy rate through Q1.
Series (2)
Federal Funds Effective Rate
FEDFUNDS · Percent · Monthly · Not Seasonally Adjusted
3.642026-03-01
−0.69 (−15.94%)Federal Funds Target Range — Upper Limit
DFEDTARU · Percent · Daily
3.752026-04-29
Matched markets (includeMarkets=true)
Fed funds upper limit ≥ 4.5% by Apr 2027 meeting
kalshi
2¢Fed funds upper limit = 4.0% at Apr 2027 meeting
kalshi
7¢These cards render real responses from /api/public/query-econ. The full wire format is documented further down. FRED's source-of-truth values are available unaltered through the St. Louis Fed's FRED site itself.
Macro series first. Markets only when requested.
The economic data API is intentionally separate from the prediction-market search endpoint. Pull official series without market opinions mixed in; flip the switch when the question calls for both.
01Official series
FRED-backed search, metadata, observations, units, frequency, tags, categories. Series IDs are the canonical FRED identifiers (CPIAUCSL, FEDFUNDS, UNRATE, …).
02Agent-ready deltas
Latest value, previous-observation change, year-ago change (value + percent), source URL. Computed once at the API; the agent doesn't need to do the math.
03Optional market context
Set includeMarkets=true to attach matching Kalshi and Polymarket contracts. The aggregator joins them by topic + LLM-extracted keywords.
04No auth for public use
Free public endpoint with rate-limited unauthenticated access. Higher tiers require a Bearer token; FRED-mirror cache absorbs most read load.
Endpoint and parameters
One endpoint, four knobs. q is required; everything else has a sensible default. The endpoint is part of the economic data API on the public surface.
qmodelimitincludeMarketsSource posture
FRED owns the series. SimpleFunctions runs an LLM-driven search over the FRED mirror, computes the previous and year-ago deltas, and (when requested) attaches matched Kalshi / Polymarket contracts on top. The platform is a consumer of FRED, not a substitute.
Series categories
The full FRED catalog is searchable. These are the categories most agents and dashboards land in — with a few representative series IDs so you can see the shape of what the aggregator routes to.
CPIAUCSL · CPILFESL · PCE · PCEPILFE?q=cpi / ?q=core+pceFEDFUNDS · DFEDTARU · DGS10 · DGS2 · SOFR?q=fed+funds+rate / ?q=10+year+treasuryUNRATE · PAYEMS · CIVPART · ICSA?q=unemployment / ?q=nonfarm+payrollsGDP · GDPC1 · INDPRO · RSAFS?q=real+gdp / ?q=industrial+productionM2SL · BOGMBASE · WALCL?q=m2 / ?q=fed+balance+sheetHOUST · CSUSHPINSA · MORTGAGE30US?q=housing+starts / ?q=case+shillerUMCSENT · CCICP · PUTILIQUI?q=consumer+sentimentQuery examples
Three shaped invocations — clean macro reading (mode=full), fast structured data (mode=raw), and macro + matched markets (includeMarkets=true).
Inflation
q=cpicurl "https://simplefunctions.dev/api/public/query-econ?q=cpi&limit=3"Labor
q=unemployment ratecurl "https://simplefunctions.dev/api/public/query-econ?q=unemployment+rate&mode=raw"Rates + matched markets
q=fed funds ratecurl "https://simplefunctions.dev/api/public/query-econ?q=fed+funds+rate&includeMarkets=true"Use cases
Four shipped integrations of the economic data API. The endpoint is deliberately minimal so it composes — most production callers chain into the inspect endpoint or the matched-market page on the second hop.
Macro traders
Pull the latest CPI / NFP / FFR reading and the matched Kalshi rate-cut markets in one call. The aggregator answer fits in a research-loop context window.
Dashboards
Macro reading widgets that show the FRED value + previous and year-ago deltas without the dashboard having to compute them. Source URL attached to every series.
Agents
A single tool call returns "what is true today" for a macro topic — series, deltas, optional markets — with a next-actions graph the agent can fetch directly.
Journalists / FP&A
Drop a current macro reading into a story or memo. Synthesized one-paragraph answer + named factors + observation date land in one request.
Read next from the library
Matched from SimpleFunctions blog, opinions, technical guides, concepts, and learn pages.
Fed Rate Cuts 2026: What $200M in Prediction Market Volume Is Telling Us
Fed rate prediction market analysis for 2026. Meeting-by-meeting probabilities, comparison with CME futures, cross-market signals, tail risk pricing, and historical accuracy.
MCP Servers for Prediction Markets: Connect Claude Code to Kalshi and Polymarket
Connect Claude Code, Cursor, or Cline to Kalshi and Polymarket prediction markets via MCP. One-line setup, 18 tools, real-time market data for AI agents.
US Recession 2025? What 1% Prediction Market Odds Get Right—and Wrong—About the Cycle
Prediction markets put 2025 US recession odds near 1%, while yield curves, economic indicators, and institutional forecasts point to much higher risk. This deep dive compares market pricing to historical base rates, Federal Reserve policy, and forecasting models to see if investors are underpricing recession risk.
Why "Prediction Market Index Funds" Are Mathematically Dubious
Index funds need continuous returns, shared factor exposures, and meaningful weights. Binary prediction-market contracts have none. A naive PM index converges to noise, not a return.
Connecting your AI agent to prediction market data in 5 minutes
Three integration paths to connect your AI agent to live prediction market data: MCP for Claude/Cursor, REST API for Python/JS, and CLI for terminal workflows.
Causal trees for prediction markets: turning macro intuition into tradeable structure
Learn how to build causal trees — hierarchical probabilistic models — that turn macro intuition into tradeable prediction market structure on Kalshi and Polymarket.
FAQ
What is the economic data API?
A REST endpoint at /api/public/query-econ that takes a natural-language query and returns FRED-backed macroeconomic time series — series metadata, latest observation, computed previous-observation and year-ago deltas — and optionally a synthesized LLM answer plus matched Kalshi / Polymarket prediction markets. The aggregator + delta computation + cross-reference are the differentiator over hitting FRED directly.
How fresh is the data?
FRED-mirror refreshes on a continuous schedule; high-frequency series (rates, daily Treasury, SOFR) propagate the same business day. Monthly indicators (CPI, NFP, PCE) reflect the latest release as soon as it appears in FRED. The platform never alters values — what FRED publishes is what the API returns.
Which series are covered?
The full FRED catalog is searchable. The endpoint runs an LLM keyword extraction and matches against the FRED-mirror search index. Common categories — inflation, rates, employment, growth, monetary aggregates, housing, sentiment — are reliably routed; long-tail series resolve when the query is specific enough.
What about BLS or BEA data directly?
BLS and BEA data flows into FRED, so most BLS / BEA indicators (CPI, PPI, NFP, GDP, PCE) are reachable through this endpoint via FRED's mirror. The platform doesn't scrape BLS or BEA primary endpoints — when an indicator isn't in FRED, the endpoint says so honestly rather than guessing.
Does it work for AI agents?
Yes — the response is shaped for tool-use. Each series ships with an observationsUrl and a sourceUrl, and the response carries a nextActions block (inspect[] for series detail, related[] for adjacent endpoints). Agents typically call mode=raw on the first hop and inspect on the second.
How is this different from FRED's API directly?
FRED gives you the series. The economic data API gives you the series PLUS the previous-observation delta, the year-ago delta, an LLM-synthesized answer, and (with includeMarkets=true) the Kalshi / Polymarket contracts that price the related event. FRED is the source of record; this endpoint is the aggregation layer.
What does the JSON shape look like?
Top-level: query (echoed), answer (when mode=full), series (Series[]), searchTerms, reasoning, optional markets (Market[]), meta (provider, source, mode, latencyMs, ts), nextActions ({ inspect, related }). Each series record carries id, title, units, frequency, latest, previous, changes ({ previous, yearAgo }), 12 recent observations, sourceUrl, observationsUrl. All URLs in the response are fully qualified.
Is there a free tier?
Yes. Unauthenticated access is rate-limited to 30 requests per minute (read-only macro data is public). Bearer-token auth raises the rate ceiling. The endpoint never charges per-call; FRED itself is free.
How do related markets attach?
When includeMarkets=true, the aggregator runs a parallel Kalshi + Polymarket search against the same query and returns the top matches sorted by volume (resolved markets sink to the bottom). Each market record carries title, ticker (or slug), price, venue, volume — same shape as the prediction-market search API.
How are previous and year-ago changes computed?
The endpoint pulls the most recent 13 observations per series, picks the latest value, picks the previous observation (m/m for monthly, d/d for daily), and finds the year-ago observation by matching month + year minus one. Both are returned as { value, pct, fromDate, toDate } so the caller can verify the dates.
Are next-actions URLs absolute?
Yes. Every URL in the response — sourceUrl (links to fred.stlouisfed.org), observationsUrl (back to /api/public/fred?series=...), and every nextActions[].url — is fully qualified (https://simplefunctions.dev/... or https://fred.stlouisfed.org/...). Agents can fetch them directly without joining a base URL.
Which languages are supported?
The LLM keyword-extraction step handles natural language across English, Spanish, French, Portuguese, Mandarin, Japanese, German, and most European languages well. Series titles themselves come from FRED — primarily English with a handful of multilingual metadata fields.
Related surfaces
Government data API
Bills, nominations, congressional members, CRS reports — same aggregator pattern, policy domain.
Prediction market search
Keyword-driven discovery across Kalshi + Polymarket — the broader sibling endpoint.
Event probability API
Per-event probability across Kalshi + Polymarket with next-actions graph.
World state
Token-budgeted snapshot of the prediction market world for agents.
For macro traders
Buyer-specific framing — Fed cuts, recession, inflation, election, geopolitics.
Historical data
OHLC candles, settled-market resolutions, calibration archives.