Polymarket API: Get odds history
Shows how a Polymarket outcome's chance changed over time, from a market question or a Polymarket link. For a text question it uses the highest-volume matching market.
Unofficial. Not affiliated with or endorsed by Polymarket.
Inputs
Values from the run on Oct 23, 2026, shown under Output.
- Market, required
market The market question or a Polymarket market link, for example "Xi Jinping out before 2027?".
Xi Jinping out before 2027?
- Period optional
period How far back to show, for example "last_week". Defaults to last_month.
last_week
One of
last_day,last_week,last_month,all_time. Defaultlast_month.- Outcome optional
outcome Outcome to track, for example "No". Defaults to the first outcome, usually Yes.
(default)
Input as JSON
{ "market": "Xi Jinping out before 2027?", "period": "last_week"}Output
{ "points": [ { "date_time": "2026-10-16T10:00:31Z", "chance_percent": 2.85 }, { "date_time": "2026-10-16T11:00:30Z", "chance_percent": 2.85 }, { "date_time": "2026-10-16T12:00:39Z", "chance_percent": 2.85 } ], "outcome": "Yes", "question": "Xi Jinping out before 2027?", "market_url": "https://polymarket.com/event/xi-jinping-out-before-2027" , "current_chance_percent": 2.65}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"polymarket.com/get_odds_history","input":{"market":"Xi Jinping out before 2027?","period":"last_week"}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "polymarket.com/get_odds_history" , "input": { "market": "Xi Jinping out before 2027?", "period": "last_week" }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "polymarket.com/get_odds_history" , "input": { "market": "Xi Jinping out before 2027?", "period": "last_week" } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run polymarket.com/get_odds_history# with {"market":"Xi Jinping out before 2027?","period":"last_week"}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [ "market" ], "properties": { "market": { "type": "string", "description": "The market question or a Polymarket market link, for example \"Xi Jinping out before 2027?\"." }, "period": { "enum": [ "last_day", "last_week", "last_month", "all_time" ], "type": "string", "default": "last_month", "description": "How far back to show, for example \"last_week\". Defaults to last_month." }, "outcome": { "type": "string", "default": "", "description": "Outcome to track, for example \"No\". Defaults to the first outcome, usually Yes." } }}Output schema
{ "type": "object", "required": [ "question", "outcome", "current_chance_percent", "market_url", "points" ], "properties": { "points": { "type": "array", "items": { "type": "object", "required": [ "date_time", "chance_percent" ], "properties": { "date_time": { "type": "string", "format": "date-time", "description": "Sample time in ISO 8601 UTC." }, "chance_percent": { "type": "number", "description": "Chance at this time, as a percentage." } }, "additionalProperties": false }, "description": "Historical chances in time order, at hourly or daily spacing depending on the period." }, "outcome": { "type": "string", "description": "The tracked outcome." }, "question": { "type": "string", "description": "The matched market question." }, "market_url": { "type": "string", "description": "Link to the Polymarket event containing this market." }, "current_chance_percent": { "type": "number", "description": "Current chance, as a percentage from 0 to 100." } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
polymarket.com/get_odds_history- Returns
- question, outcome, current chance, market link, time series of chances
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method polymarket.com/get_odds_history with the inputs above.
Ask your agent
- How has the chance of Xi Jinping being out before 2027 changed over the last month on Polymarket?
- Show me the odds history for the Fed cutting rates in June on polymarket.com, last week
- Track the No outcome chance for "Will Bitcoin hit 150k in 2025?" over all time
- What did the Yes odds look like over the last day for the Ukraine ceasefire market at https://polymarket.com/event/ukraine-ceasefire-2025
- Plot how the chance of Lakers winning the NBA title moved across the past month
See more
All Polymarket methodsFinds Polymarket prediction markets about a topic, ranked by total trading volume, with outcome chances and market details.
polymarket.com/search_marketsLists the open Polymarket markets with the most trading in the last 24 hours. You can pick one category or list all of them; markets outside the named categories are labeled Other.
polymarket.com/list_trending_marketsFind Kalshi prediction events about a topic, ranked by total contracts traded, with Yes prices, outcome volumes and status. Settled chances show the resolved result; closed outcomes have no live buy or sell prices. Older closed markets may lack 24-hour volume; very broad searches cover up to 1,000 matches.
kalshi.com/search_marketsGets decades of yearly commodity or stock-index price history from Macrotrends: yearly average, open, high, low, close, annual change and inflation-adjusted value for gold, silver, crude oil, natural gas, copper, Dow Jones, S&P 500 and Nasdaq. The current year may be incomplete.
macrotrends.net/get_long_term_price_historyGets a coin's daily prices and price change over the last 7, 30, 90 or 365 days, with UTC dates. Today's price may change.
coingecko.com/get_coin_price_historyReturns Yahoo Finance daily, weekly or monthly price history and total adjusted-close return for a stock, fund, index or cryptocurrency.
finance.yahoo.com/get_price_historyGets Binance spot price candles for a coin and quote currency, newest by default or within a UTC date range, up to 1,000 candles.
binance.com/get_price_historyLists the largest price rises and falls among CoinMarketCap's top 100 coins with over $50,000 in 24-hour volume, for a chosen period.
coinmarketcap.com/list_gainers_and_losers