🔗 MCP API

Getting Started

Connect your MCP client to the FinFeedAPI Prediction Markets MCP server and start querying exchanges, markets, activity, order books, and OHLCV data.

Getting Started with Prediction Markets API MCP

This guide shows how to connect an MCP client to the hosted FinFeedAPI Prediction Markets MCP server.

Endpoint and authentication

  • MCP endpoint: https://api.prediction-markets.finfeedapi.com/mcp
  • Header: X-APIKey: YOUR_API_KEY
  • Transport: HTTP streaming MCP

Cursor example

Add the Prediction Markets server to your MCP client configuration:

{
  "mcpServers": {
    "FinFeedAPI-Prediction-Markets": {
      "url": "https://api.prediction-markets.finfeedapi.com/mcp",
      "headers": {
        "X-APIKey": "YOUR_API_KEY_HERE"
      }
    }
  }
}

Replace YOUR_API_KEY_HERE with your real API key and restart the client if required by your MCP application.

First requests to try

Once connected, these are the fastest ways to validate the integration.

1. List supported exchanges

Call exchanges_list with no arguments.

Example response excerpt:

[
  {
    "exchange_id": "KALSHI",
    "market_name_institution_description": "A US-regulated exchange for trading event contracts.",
    "website": "https://kalshi.com"
  },
  {
    "exchange_id": "POLYMARKET",
    "market_name_institution_description": "The world's largest prediction market.",
    "website": "https://polymarket.com"
  }
]

2. List active market IDs on one venue

Call markets_get_active with:

{
  "exchange_id": "POLYMARKET",
  "limit": 3,
  "page": 1
}

Example response excerpt:

[
  "2026-BALANCE-OF-POWER-R-SENATE-R-HOUSE-537_NO",
  "2026-BALANCE-OF-POWER-R-SENATE-R-HOUSE-537_YES",
  "2026-BASKETBALL-VTB-UNITED-LEAGUE-WINNER-PARMA_NO"
]

3. List supported OHLCV periods

Call ohlcv_list_periods with no arguments.

Example response excerpt:

[
  { "period_id": "1SEC", "display_name": "1 Second" },
  { "period_id": "1MIN", "display_name": "1 Minute" },
  { "period_id": "1HRS", "display_name": "1 Hour" },
  { "period_id": "1DAY", "display_name": "1 Day" }
]

4. Fetch latest OHLCV candles for one market

Call ohlcv_get_latest_market with:

{
  "exchange_id": "POLYMARKET",
  "market_id": "1-MEGATON-METEOR-STRIKE-IN-2026_NO",
  "period_id": "1DAY",
  "limit": 2
}

Example response excerpt:

[
  {
    "time_period_start": "2026-04-07T00:00:00Z",
    "time_period_end": "2026-04-08T00:00:00Z",
    "price_open": 0.956,
    "price_high": 0.956,
    "price_low": 0.9415,
    "price_close": 0.9415,
    "volume_traded": 0,
    "trades_count": 0
  },
  {
    "time_period_start": "2026-04-06T00:00:00Z",
    "time_period_end": "2026-04-07T00:00:00Z",
    "price_open": 0.938,
    "price_high": 0.941,
    "price_low": 0.9365,
    "price_close": 0.941,
    "volume_traded": 0,
    "trades_count": 0
  }
]

5. Fetch the current order book snapshot

Call orderbook_get_current with:

{
  "exchange_id": "POLYMARKET",
  "market_id": "1-MEGATON-METEOR-STRIKE-IN-2026_NO"
}

Example response excerpt:

{
  "exchange_id": "POLYMARKET",
  "market_id": "1-MEGATON-METEOR-STRIKE-IN-2026_NO",
  "time_exchange": "2026-04-07T13:40:15.090217Z",
  "time_coinapi": "2026-04-07T13:40:15.0902171Z",
  "asks": [
    { "price": 0.949, "size": 112.39 },
    { "price": 0.963, "size": 40.0 }
  ],
  "bids": [
    { "price": 0.928, "size": 81.55 },
    { "price": 0.927, "size": 2019.39 }
  ]
}

6. Fetch bounded quotes history

Call activity_get_quotes_history with a narrow window:

{
  "exchange_id": "POLYMARKET",
  "market_id": "1-MEGATON-METEOR-STRIKE-IN-2026_NO",
  "time_start": "2026-04-07T13:35:00Z",
  "time_end": "2026-04-07T13:40:00Z",
  "limit": 5
}

Example response shape:

[
  {
    "entry_time": "2026-04-07T13:35:12.0000000Z",
    "recv_time": "2026-04-07T13:35:12.1230000Z",
    "ask": 0.949,
    "bid": 0.928,
    "ask_volume": 112.39,
    "bid_volume": 81.55
  },
  {
    "entry_time": "2026-04-07T13:36:01.0000000Z",
    "recv_time": "2026-04-07T13:36:01.0880000Z",
    "ask": 0.963,
    "bid": 0.927,
    "ask_volume": 40.0,
    "bid_volume": 2019.39
  }
]

Market discovery workflow

  1. Call exchanges_list.
  2. Select an exchange_id.
  3. Call markets_get_active when you only need IDs, or markets_get_history when you need titles, descriptions, prices, and status.
  4. Select a market_id.
  5. Call activity_get_current, activity_get_latest, orderbook_get_current, or the OHLCV tools depending on the use case.

Historical flat-file workflow

Use activity_get_trades_history, activity_get_quotes_history, or orderbook_get_history when you need raw historical events instead of the latest snapshot.

For these tools:

  • use date for a full-day query, or
  • use time_start and optional time_end for narrower windows

Keep ranges tight and always set a reasonable limit when exploring.

Exchange-wide OHLCV workflow

Use ohlcv_get_history_exchange when you want one OHLCV window across all markets on a venue:

{
  "exchange_id": "POLYMARKET",
  "period_id": "1MIN",
  "time_start": "2026-04-07T12:00:00Z",
  "time_end": "2026-04-07T13:00:00Z"
}

The window between time_start and time_end must not exceed 24 hours.

Troubleshooting

No tools appear in the client

  • Verify the endpoint URL is exactly https://api.prediction-markets.finfeedapi.com/mcp.
  • Confirm the request includes the X-APIKey header.
  • Restart the MCP client after editing its configuration.

Current activity returns no data

If activity_get_current or activity_get_latest returns a "no activity found" error, it usually means the chosen market currently has no recent trades or quotes exposed by that tool. Retry with another market or use a historical tool with a bounded range.

Historical tools return too much data

  • Prefer time_start / time_end over full-day queries when exploring.
  • Keep limit small at first, then widen only if needed.
  • Avoid broad historical requests for highly active markets unless your client is prepared for large payloads.

OHLCV returns no rows

  • Check that exchange_id and market_id match.
  • Confirm the period_id is supported by ohlcv_list_periods.
  • Verify the requested time range actually contains market data for that venue and outcome.
Service StatusGitHub SDK