{
  "markdown": "# Prediction Markets API\n\n[![MCP Server](https://img.shields.io/badge/MCP-server-blue)](https://prediction-markets.api.klymax402.com/mcp)\n[![x402](https://img.shields.io/badge/payments-x402-6E56CF)](https://x402.org)\n[![License: MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE)\n\nReal-time prediction market odds from Polymarket and Kalshi. Active markets, probabilities, volume, categories. The betting intelligence layer agents need for event forecasting. Pay-per-call via [x402](https://x402.org) (USDC on Base L2) -- no API key, no signup, no rate-limit wall.\n\nPart of the [klymax402](https://klymax402.com) marketplace -- 100 x402 micropayment APIs for AI agents, one wallet, USDC on Base.\n\n## Quickstart -- MCP\n\nAdd to your MCP client config (Claude Desktop, Cursor, ElizaOS, etc.):\n\n```json\n{\n  \"mcpServers\": {\n    \"prediction-markets\": {\n      \"url\": \"https://prediction-markets.api.klymax402.com/mcp\"\n    }\n  }\n}\n```\n\n## Quickstart -- HTTP (x402)\n\n```bash\ncurl -X POST \"https://prediction-markets.api.klymax402.com/api/markets\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{}'\n# -> 402 Payment Required, with an x402 payment challenge in the response body\n```\n\nAny x402-aware client ([`@x402/fetch`](https://www.npmjs.com/package/@x402/fetch), [`x402-agent-tools`](https://www.npmjs.com/package/x402-agent-tools), ATXP) handles the 402 -> sign -> retry cycle automatically.\n\n## Tools\n\n| Tool | Method | Path | Price | Description |\n|---|---|---|---|---|\n| `prediction_list_markets` | POST | `/api/markets` | $0.012 | List active prediction markets from Polymarket and Kalshi with current odds, volume, and categories. Filter by topic, platform, and sort by volume, newest, or closing soon. |\n| `prediction_get_market_odds` | POST | `/api/odds` | $0.012 | Get detailed odds and trading data for a specific prediction market by ID or search query. Searches both Polymarket and Kalshi. |\n| `prediction_trending_markets` | POST | `/api/trending` | $0.008 | Top trending prediction markets from Polymarket and Kalshi ranked by volume and engagement. |\n\n### `prediction_list_markets`\n\nUse this when you need to browse active prediction markets or find betting odds on real-world events. Returns a list of active markets from Polymarket and Kalshi with current probabilities, trading volume, and metadata.\n\n**Parameters**\n\n| Name | Type | Required | Description |\n|---|---|---|---|\n| `category` | string | no | Filter markets by topic category. Omit for all categories. |\n| `limit` | number | no | Number of markets to return (1-50). Default: 20. |\n| `sort` | string | no | Sort order. 'volume' = highest traded, 'newest' = recently created, 'closing_soon' = ending soonest. Default: volume. |\n| `source` | string | no | Filter by platform. Omit to get markets from both Polymarket and Kalshi. |\n\n**Returns**\n\n- `question` -- the prediction market question (e.g. \"Will Bitcoin reach $100k by December 2026?\")\n- `outcomePrices` -- probability for each outcome as decimal (0.65 = 65% chance YES)\n- `volume` -- total trading volume in USD\n- `liquidity` -- current available liquidity in USD\n- `endDate` -- when the market resolves\n- `category` -- topic category (politics, crypto, sports, science, culture)\n- `active` -- whether the market is currently trading\n- `source` -- data source -- \"polymarket\" or \"kalshi\"\n\nExample response:\n\n```json\n{ markets: [{ question: \"Will Trump win 2028?\", outcomePrices: { \"Yes\": 0.42, \"No\": 0.58 }, volume: 15420000, liquidity: 890000, endDate: \"2028-11-06\", category: \"politics\", source: \"polymarket\" }] }\n```\n\n**Not for**: crypto price data (use `token_get_price`), crypto news (use `crypto_get_news`), stock prices (use `stock_get_quote`), DeFi yields (use `defi_find_best_yields`), Hyperliquid perp data (use `hyperliquid_get_market_data`).\n\n### `prediction_get_market_odds`\n\nUse this when you need detailed odds, probabilities, and trading data for a specific prediction market. Searches both Polymarket and Kalshi to find the best match by market ID or question text.\n\n**Parameters**\n\n| Name | Type | Required | Description |\n|---|---|---|---|\n| `marketId` | string | no | Polymarket condition ID or Kalshi ticker. Use this if you already know the market ID. |\n| `query` | string | no | Search query to find a market by question text (e.g. 'bitcoin 100k', 'trump election'). Used when marketId is not known. |\n\n**Returns**\n\n- `question` -- the full prediction market question text\n- `outcomes` -- array of possible outcomes with their current probabilities\n- `outcomePrices` -- decimal probabilities per outcome (0.72 = 72% implied probability)\n- `volume` -- total all-time trading volume in USD\n- `volume24h` -- trading volume in the last 24 hours\n- `liquidity` -- current depth of the order book in USD\n- `endDate` -- resolution date of the market\n- `description` -- detailed market description and resolution criteria\n- `active` -- whether the market is currently open for trading\n- `source` -- which platform the market is from -- \"polymarket\" or \"kalshi\"\n\nExample response:\n\n```json\n{ question: \"Will ETH flip BTC by 2027?\", outcomes: [\"Yes\", \"No\"], outcomePrices: { \"Yes\": 0.08, \"No\": 0.92 }, volume: 2340000, volume24h: 45000, liquidity: 120000, endDate: \"2027-12-31\", active: true, source: \"polymarket\" }\n```\n\n**Not for**: crypto price data (use `token_get_price`), crypto news (use `crypto_get_news`), stock prices (use `stock_get_quote`), DeFi yields (use `defi_find_best_yields`), Hyperliquid perp data (use `hyperliquid_get_market_data`).\n\n### `prediction_trending_markets`\n\nUse this when you need to see what prediction markets are trending right now. Returns the hottest markets from both Polymarket and Kalshi ranked by recent trading volume and activity.\n\n**Parameters**\n\n| Name | Type | Required | Description |\n|---|---|---|---|\n| `limit` | number | no | Number of trending markets to return (1-30). Default: 10. |\n| `source` | string | no | Filter by platform. Omit to get trending markets from both Polymarket and Kalshi. |\n\n**Returns**\n\n- `question` -- the market question\n- `probability` -- current implied probability for the leading outcome (decimal)\n- `volume24h` -- trading volume in the last 24 hours in USD\n- `totalVolume` -- all-time trading volume in USD\n- `priceChange24h` -- change in probability over the last 24 hours (e.g. +0.05 = probability rose 5%)\n- `category` -- topic category\n- `endDate` -- when the market resolves\n- `source` -- data source -- \"polymarket\" or \"kalshi\"\n\nExample response:\n\n```json\n{ trending: [{ question: \"Will Fed cut rates in July 2026?\", probability: 0.73, volume24h: 890000, totalVolume: 12500000, priceChange24h: 0.08, category: \"politics\", endDate: \"2026-07-31\", source: \"polymarket\" }] }\n```\n\n**Not for**: crypto price data (use `token_get_price`), crypto news (use `crypto_get_news`), stock prices (use `stock_get_quote`), DeFi yields (use `defi_find_best_yields`), Hyperliquid perp data (use `hyperliquid_get_market_data`).\n\n## Example agent prompts\n\n- \"Browse active prediction markets or find betting odds on real-world events\"\n- \"Detailed odds, probabilities, and trading data for a specific prediction market\"\n- \"See what prediction markets are trending right now\"\n\n## Payment\n\n- Protocol: [x402](https://x402.org) -- HTTP-native pay-per-call, no signup, no API key\n- Network: Base L2 (`eip155:8453`)\n- Asset: USDC\n- Facilitator: Coinbase CDP (primary), PayAI (fallback)\n- Also reachable via [ATXP](https://atxp.ai) (OAuth-wrapped x402, RFC 9728 protected-resource metadata)\n\n## Part of klymax402\n\n100 x402 micropayment APIs for AI agents -- one wallet, USDC on Base, zero signup.\n\n- Catalog: https://klymax402.com/llms.txt\n- Full API reference: https://klymax402.com/llms-full.txt\n- Live stats: https://klymax402.com/stats\n\n## License\n\nMIT\n",
  "bytes": 7771,
  "sha": "a475643f85d3915ab650dcdfc0d19dae65a4162b9d89d93c8abba5509439a88c",
  "repo_slug": "br0ski777/prediction-markets-x402",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_br0ski777_prediction_markets_08dee1fe/readme"
}