Back to Settings, API/MCP

Developer documentation

Prediction market MCP server

Connect AI agents to published Kalshi and Polymarket data, Precision model probabilities and research receipts through the Model Context Protocol (MCP).

Prediction market research for AI agents

The MCP server gives AI agents markets, model reads, receipts and graded performance as tools. It never places an order. Probabilities are numbers from 0 to 1, and a null means no published value, never zero.

Precision Algorithms is an independent research service. Coverage is the published Precision market cohort, with fields determined by your plan and available source evidence. It does not include every contract listed by either venue.

Server URL
https://markets.precisionalgorithms.com/api/mcp
Transport
Streamable HTTP

From plan to agent connection

  1. Choose a plan. Precision+ includes all four MCP tools. Quant adds request capacity, recorded history and explanations in tool results.
  2. After your paid plan is active, open Settings, API/MCP. Create a named key and store it when it is shown. It cannot be shown again.
  3. Use the MCP setup below with your key. Connect your agent, list the tools, then search for a market.

Build an agentic research workflow

  1. Find relevant markets

    Call search_markets with a topic, category or venue filter. Use each returned uid for follow-up reads. Check the exact question, outcome and settlement terms before comparing Kalshi and Polymarket contracts.

  2. Explain the model and market difference

    Use get_market and get_receipt to inspect venue quotes, the available Precision model probability and its receipt. Retain quote observation times, score times and the published signal status in your research brief. Quant adds available explanations and recorded history.

  3. Review the evidence over time

    Use recorded history in eligible Quant tool results and get_track_record for the published aggregate. History contains recorded observations. The track record is an all-time retrospective settled-market view; missing values remain null.

Start with How to Read for probabilities and gaps, or review the research methodology. For notebooks and custom HTTP integrations, use the REST API guide.

Example research prompt for your agent
Search Precision's published markets for a topic I choose. For up to five results, use the returned uid to read each market and its receipt. Summarize the exact outcome, venue probability, available Precision probability, quote observation time and model score time. Link to the market and its venue. Keep missing values visible and distinguish model previews from actionable reads. Only compare contracts across venues after checking their outcome and settlement terms.

Authentication

Send a key in the Authorization header: Authorization: Bearer pa_live_.... A key is pa_live_ and 64 hex characters. Create and revoke keys in Settings, API/MCP. A key is shown once when you create it. We store only a hash.

The MCP server needs a key on every request, including setup calls. A website session token does not replace a key. Never put a key in browser code or a public repository.

Plans and limits

PlanRate limitWhat it reads
Precision+60 requests per hour per account; 5 per 10 secondsThe published market cohort with its allowed model block and receipt.
Quant Research Desk600 requests per hour per account; 20 per 10 secondsPrecision+ plus the recorded history series and the explanation block.

Limits count per account, shared across all keys and REST/MCP, in fixed clock hours (UTC). A separate rolling 10-second window limits bursts. Creating another key does not add quota. Admitted keyed responses and quota denials carry X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (Unix seconds at the end of the hour). When either limit is reached, the API answers 429 rate_limited with a Retry-After header in seconds. Wait at least that long before retrying. For temporary failures, use bounded exponential backoff with jitter, and honor Retry-After on 429 and 503. Cache results in your own client and avoid repeated parallel retries.

Track record scope

The published track record is an all-time retrospective settled-market aggregate. Omit window or send all. The response echoes filters.window as all and filters.anchor as null. 30d, 90d and any anchor return 400 invalid_parameter.

asOf is the aggregate generation time. freshness.ageSeconds is the age of that generation. freshness.state is fresh while that age is at most 7,200 seconds and delayed above that. model.id, model.version, freshness.lastCheckpointAt and freshness.lastSettlementAt stay null. Read performance.provenance.sourceGeneratedAt for the same generation clock and meta snapshot clocks for serving validity. A new snapshot does not create a missing score time.

Publication clocks and polling

The active board has a one-minute publication schedule; the settled board has a five-minute schedule. Model scores and recorded history follow their source and export schedules. A scheduled publish can be delayed or refused by data checks. These clocks are separate from request limits and are not a promise that each field changes on each publish.

meta.as_of is the response time, not the age of every quote or model read. Check model.scored_at and the timestamps in history. A probability is published only with model.scored_at. A fresh response can contain an older score: model.read_stale is true when the score is more than 8 hours old. A null edge or Kelly is not a zero value.

The API reads a bounded published cohort, not the whole live venue catalog. Search and detail reads do not discover extra contracts. A market_not_found 404 means the contract is absent from that valid generation. A missing or expired snapshot returns 503; the request does not start a live build.

Snapshot responses include meta.snapshot_id, published_at, source_generated_at, expires_at, freshness and scope. Pass snapshot_id to supported tools to keep reads on one generation. When it expires, search again without the old pin.

Poll the board no more often than its publication clock, and budget for setup and tool calls together. Quant adds request capacity and data fields; it does not make source data publish faster.

MCP server

The MCP server speaks Streamable HTTP at https://markets.precisionalgorithms.com/api/mcp. It is stateless and answers in JSON. Each MCP HTTP request counts against the account's shared hourly and burst limits, including setup calls such as tools/list. A tool call returns what the account's plan allows.

  • search_marketsList active or settled markets, filtered by text, category and provider.
  • get_marketOne market by uid, with quotes, the model block your plan allows, its receipt and links.
  • get_receiptThe published read for one market: the model block and its receipt. Quant adds the explanation and the input audit.
  • get_track_recordThe graded performance of the model against the exchange.

Connect an agent

  1. Create a key in Settings, API/MCP.
  2. In a client that supports remote Streamable HTTP and custom headers, set the server URL to https://markets.precisionalgorithms.com/api/mcp and the header to Authorization: Bearer YOUR_KEY.
  3. Connect, then list the tools. Search first and use a returned uid for detail or receipt calls.

No OAuth login or browser session is used. A client that cannot send a custom header needs a local bridge such as mcp-remote. Keep the key in the client's private configuration.

AI agent configurations

The configurations below use each client's documented HTTP connection settings. Set PA_API_KEY to your Precision key in the environment that launches the client, then restart it. Keep the value private. List the tools to check the connection before starting a research workflow.

Claude Code

Add this server to your project's .mcp.json. Claude Code reads the key from PA_API_KEY. Review the connection with /mcp. See the official Claude Code MCP setup.

{
  "mcpServers": {
    "precision-algorithms": {
      "type": "http",
      "url": "https://markets.precisionalgorithms.com/api/mcp",
      "headers": {
        "Authorization": "Bearer ${PA_API_KEY}"
      }
    }
  }
}
Cursor

Add this server to ~/.cursor/mcp.json for your personal setup. Cursor uses ${env:PA_API_KEY} to read the key from its environment. See the official Cursor MCP configuration.

{
  "mcpServers": {
    "precision-algorithms": {
      "url": "https://markets.precisionalgorithms.com/api/mcp",
      "headers": {
        "Authorization": "Bearer ${env:PA_API_KEY}"
      }
    }
  }
}
Codex

Add this server to ~/.codex/config.toml. bearer_token_env_var sends the value of PA_API_KEY as the Authorization Bearer token. See the official Codex MCP configuration.

[mcp_servers.precision_algorithms]
url = "https://markets.precisionalgorithms.com/api/mcp"
bearer_token_env_var = "PA_API_KEY"

Try it with the MCP Inspector

npx @modelcontextprotocol/inspector --cli https://markets.precisionalgorithms.com/api/mcp \
  --transport http \
  --header "Authorization: Bearer pa_live_YOUR_KEY" \
  --method tools/list

The Inspector CLI guide describes the HTTP transport and header options.

Claude Desktop with a local bridge

Add this to claude_desktop_config.json and replace the placeholder key with yours.

{
  "mcpServers": {
    "precision-algorithms": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://markets.precisionalgorithms.com/api/mcp",
        "--header",
        "Authorization:${PA_AUTH}"
      ],
      "env": {
        "PA_AUTH": "Bearer pa_live_YOUR_KEY"
      }
    }
  }
}

Restart the client after saving. This uses the third-party mcp-remote bridge and needs Node.js with npx. Review that package before running it.

Protocol setup

POST initialize first. Use the protocol version in the response for the MCP-Protocol-Version header on later requests. Then send notifications/initialized (HTTP 202, no body), tools/list and tools/call in that order. Send the key on every HTTP request. This stateless server has no session ID. GET and DELETE return 405; it does not offer an event stream or session deletion. Use one message per request; protocol 2025-06-18 does not allow batches.

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "initialize",
  "params": {
    "protocolVersion": "2025-06-18",
    "capabilities": {},
    "clientInfo": {
      "name": "example-client",
      "version": "1.0.0"
    }
  }
}
{
  "jsonrpc": "2.0",
  "method": "notifications/initialized"
}
Authorization: Bearer YOUR_KEY
Content-Type: application/json
MCP-Protocol-Version: 2025-06-18

Tool arguments and returns

Send one JSON-RPC request per POST, with Content-Type: application/json. A successful tool call returns result.structuredContent and the same JSON encoded in result.content[0].text. The examples below show the full structuredContent object using synthetic data. Null fields mean no published value.

search_markets arguments, request and return
search_markets arguments
FieldTypeNotes
statusstring, one of active, settled (default active)
categorystring, one of sports, trading, crypto, stocks, weather, politics, economics, financials, technology, culture, world, other
providerstring, one of kalshi, polymarket
querystring (2 to 120 characters)Text in the question or ticker. 2 to 120 characters.
limitinteger (default 20, 1 to 50)Rows per page.
snapshot_idstring (pattern ^(active|settled):[a-f0-9]{64}$)Pin the snapshot_id returned by a prior keyed response. Active and settled retained generations have separate bounds (10 and 35 minutes); expires_at and all source/model deadlines still apply and can end serving earlier. Anonymous pins return 403 snapshot_key_required. A pin cannot be used with month archive queries.
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "search_markets",
    "arguments": {
      "query": "Illustrative",
      "provider": "kalshi",
      "status": "active",
      "limit": 1
    }
  }
}
{
  "access": "pro",
  "markets": [
    {
      "uid": "kalshi:EXAMPLE",
      "provider": "kalshi",
      "external_id": "EXAMPLE",
      "ticker": "EXAMPLE",
      "slug": null,
      "event_id": null,
      "category": "weather",
      "question": "Illustrative market",
      "status": "active",
      "close_time": "2026-01-02T12:00:00.000Z",
      "is_settled": false,
      "outcome": null,
      "quotes": {
        "yes_bid": 0.45,
        "yes_ask": 0.47,
        "no_bid": 0.53,
        "no_ask": 0.55,
        "last_price": 0.46,
        "market_probability": 0.46,
        "volume": 1000,
        "volume_24h": null,
        "liquidity": null,
        "open_interest": null,
        "open_interest_unit": null,
        "observed_at": "2026-01-01T11:59:30.000Z",
        "price_stale": false
      },
      "model": {
        "probability": 0.5,
        "confidence": null,
        "signal": "watch",
        "version": "example-v1",
        "scored_at": "2026-01-01T11:00:00.000Z",
        "read_stale": false,
        "edge": 0.04,
        "kelly": null
      },
      "locked": false,
      "reliability": null,
      "receipt": null,
      "explanation": null,
      "history": null,
      "settled_preclose": null,
      "links": {
        "web": "https://markets.precisionalgorithms.com/m/kalshi-example",
        "provider_web": null,
        "provider_app": null
      }
    }
  ],
  "pagination": {
    "offset": 0,
    "limit": 1,
    "returned": 1,
    "next_offset": null,
    "has_more": false
  },
  "meta": {
    "served_by": "data-api-published-snapshot",
    "total_count": 1,
    "as_of": "2026-01-01T12:00:01.000Z",
    "snapshot_id": "active:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "published_at": "2026-01-01T12:00:00.000Z",
    "source_generated_at": "2026-01-01T12:00:00.000Z",
    "expires_at": "2026-01-01T12:02:00.000Z",
    "freshness": {
      "state": "fresh",
      "age_ms": 1000,
      "max_age_ms": 120000
    },
    "scope": "published_active_board"
  }
}
get_market arguments, request and return
get_market arguments
FieldTypeNotes
uid requiredstring (pattern ^(kalshi|polymarket):[A-Za-z0-9][A-Za-z0-9._-]{1,127}$)provider:external_id, for example kalshi:KXHIGHNY-25NOV01-B60 or polymarket:12345. URL-encode the colon if your client requires it.
snapshot_idstring (pattern ^(active|settled):[a-f0-9]{64}$)Pin the snapshot_id returned by a prior keyed response. Active and settled retained generations have separate bounds (10 and 35 minutes); expires_at and all source/model deadlines still apply and can end serving earlier. Anonymous pins return 403 snapshot_key_required. A pin cannot be used with month archive queries.
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_market",
    "arguments": {
      "uid": "kalshi:EXAMPLE"
    }
  }
}
{
  "access": "pro",
  "market": {
    "uid": "kalshi:EXAMPLE",
    "provider": "kalshi",
    "external_id": "EXAMPLE",
    "ticker": "EXAMPLE",
    "slug": null,
    "event_id": null,
    "category": "weather",
    "question": "Illustrative market",
    "status": "active",
    "close_time": "2026-01-02T12:00:00.000Z",
    "is_settled": false,
    "outcome": null,
    "quotes": {
      "yes_bid": 0.45,
      "yes_ask": 0.47,
      "no_bid": 0.53,
      "no_ask": 0.55,
      "last_price": 0.46,
      "market_probability": 0.46,
      "volume": 1000,
      "volume_24h": null,
      "liquidity": null,
      "open_interest": null,
      "open_interest_unit": null,
      "observed_at": "2026-01-01T11:59:30.000Z",
      "price_stale": false
    },
    "model": {
      "probability": 0.5,
      "confidence": null,
      "signal": "watch",
      "version": "example-v1",
      "scored_at": "2026-01-01T11:00:00.000Z",
      "read_stale": false,
      "edge": 0.04,
      "kelly": null
    },
    "locked": false,
    "reliability": null,
    "receipt": null,
    "explanation": null,
    "history": null,
    "settled_preclose": null,
    "links": {
      "web": "https://markets.precisionalgorithms.com/m/kalshi-example",
      "provider_web": null,
      "provider_app": null
    }
  },
  "meta": {
    "served_by": "data-api-published-snapshot",
    "total_count": 1,
    "as_of": "2026-01-01T12:00:01.000Z",
    "snapshot_id": "active:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "published_at": "2026-01-01T12:00:00.000Z",
    "source_generated_at": "2026-01-01T12:00:00.000Z",
    "expires_at": "2026-01-01T12:02:00.000Z",
    "freshness": {
      "state": "fresh",
      "age_ms": 1000,
      "max_age_ms": 120000
    },
    "scope": "published_active_board"
  }
}
get_receipt arguments, request and return
get_receipt arguments
FieldTypeNotes
uid requiredstring (pattern ^(kalshi|polymarket):[A-Za-z0-9][A-Za-z0-9._-]{1,127}$)provider:external_id, for example kalshi:KXHIGHNY-25NOV01-B60 or polymarket:12345. URL-encode the colon if your client requires it.
snapshot_idstring (pattern ^(active|settled):[a-f0-9]{64}$)Pin the snapshot_id returned by a prior keyed response. Active and settled retained generations have separate bounds (10 and 35 minutes); expires_at and all source/model deadlines still apply and can end serving earlier. Anonymous pins return 403 snapshot_key_required. A pin cannot be used with month archive queries.
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_receipt",
    "arguments": {
      "uid": "kalshi:EXAMPLE"
    }
  }
}
{
  "access": "pro",
  "meta": {
    "served_by": "data-api-published-snapshot",
    "total_count": 1,
    "as_of": "2026-01-01T12:00:01.000Z",
    "snapshot_id": "active:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "published_at": "2026-01-01T12:00:00.000Z",
    "source_generated_at": "2026-01-01T12:00:00.000Z",
    "expires_at": "2026-01-01T12:02:00.000Z",
    "freshness": {
      "state": "fresh",
      "age_ms": 1000,
      "max_age_ms": 120000
    },
    "scope": "published_active_board"
  },
  "uid": "kalshi:EXAMPLE",
  "question": "Illustrative market",
  "locked": false,
  "model": {
    "probability": 0.5,
    "confidence": null,
    "signal": "watch",
    "version": "example-v1",
    "scored_at": "2026-01-01T11:00:00.000Z",
    "read_stale": false,
    "edge": 0.04,
    "kelly": null
  },
  "receipt": null,
  "explanation": null,
  "model_input_audit": null
}
get_track_record arguments, request and return
get_track_record arguments
FieldTypeNotes
windowstring, one of 30d, 90d, all (default all)all selects the published all-time aggregate and is echoed in data.filters.window. 30d and 90d return 400 invalid_parameter. This aggregate has no rolling window.
anchorstring, one of first, t_24h, t_6h, t_60mAny value returns 400 invalid_parameter. The published aggregate has no original-score anchor. Omit this parameter.
snapshot_idstring (pattern ^(active|settled):[a-f0-9]{64}$)Pin the snapshot_id returned by a prior keyed response. Active and settled retained generations have separate bounds (10 and 35 minutes); expires_at and all source/model deadlines still apply and can end serving earlier. Anonymous pins return 403 snapshot_key_required. A pin cannot be used with month archive queries.
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_track_record",
    "arguments": {
      "window": "all"
    }
  }
}
{
  "access": "pro",
  "performance": {
    "status": "ready",
    "asOf": "2026-01-01T11:00:00.000Z",
    "methodologyVersion": "pm-settled-calibration-v1",
    "refreshCadenceSeconds": 60,
    "filters": {
      "window": "all",
      "anchor": null,
      "edgeBucket": null,
      "reliability": null,
      "settledWindow": null,
      "contractFamily": null
    },
    "freshness": {
      "state": "fresh",
      "ageSeconds": 3601,
      "lastCheckpointAt": null,
      "lastSettlementAt": null
    },
    "model": {
      "id": null,
      "version": null
    },
    "sample": {
      "graded": 40,
      "pending": null,
      "abstained": null,
      "executionEligible": null,
      "settled": 40
    },
    "primary": {
      "brier": {
        "model": 0.1,
        "exchange": 0.25,
        "skill": 0.6,
        "ci95": {
          "low": null,
          "high": null
        }
      },
      "logLoss": null,
      "auc": null,
      "ece": null,
      "accuracy": {
        "value": null,
        "ci95": {
          "low": null,
          "high": null
        }
      },
      "sufficiency": {
        "brier": true,
        "auc": false,
        "calibration": false
      }
    },
    "execution": null,
    "series": [],
    "calibration": [],
    "slices": [],
    "methodology": {
      "headlineAnchor": null,
      "baseline": "last_retained_preclose_exchange_probability",
      "confidenceInterval": null,
      "recordOrigin": "retrospective_settled_markets"
    },
    "provenance": {
      "recordSource": "published_settled_ledger_rollup",
      "sourceGeneratedAt": "2026-01-01T11:00:00.000Z",
      "slicesGeneratedAt": null
    }
  },
  "meta": {
    "as_of": "2026-01-01T12:00:01.000Z",
    "snapshot_id": "settled:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
    "published_at": "2026-01-01T12:00:00.000Z",
    "source_generated_at": "2026-01-01T12:00:00.000Z",
    "expires_at": "2026-01-01T12:02:00.000Z",
    "freshness": {
      "state": "fresh",
      "age_ms": 1000,
      "max_age_ms": 120000
    },
    "scope": "published_settled_ledger"
  }
}

Full successful tool response

The wrapper below uses get_receipt. Other tools have the same wrapper with their own structuredContent object.

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"access\":\"pro\",\"meta\":{\"served_by\":\"data-api-published-snapshot\",\"total_count\":1,\"as_of\":\"2026-01-01T12:00:01.000Z\",\"snapshot_id\":\"active:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"published_at\":\"2026-01-01T12:00:00.000Z\",\"source_generated_at\":\"2026-01-01T12:00:00.000Z\",\"expires_at\":\"2026-01-01T12:02:00.000Z\",\"freshness\":{\"state\":\"fresh\",\"age_ms\":1000,\"max_age_ms\":120000},\"scope\":\"published_active_board\"},\"uid\":\"kalshi:EXAMPLE\",\"question\":\"Illustrative market\",\"locked\":false,\"model\":{\"probability\":0.5,\"confidence\":null,\"signal\":\"watch\",\"version\":\"example-v1\",\"scored_at\":\"2026-01-01T11:00:00.000Z\",\"read_stale\":false,\"edge\":0.04,\"kelly\":null},\"receipt\":null,\"explanation\":null,\"model_input_audit\":null}"
      }
    ],
    "structuredContent": {
      "access": "pro",
      "meta": {
        "served_by": "data-api-published-snapshot",
        "total_count": 1,
        "as_of": "2026-01-01T12:00:01.000Z",
        "snapshot_id": "active:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
        "published_at": "2026-01-01T12:00:00.000Z",
        "source_generated_at": "2026-01-01T12:00:00.000Z",
        "expires_at": "2026-01-01T12:02:00.000Z",
        "freshness": {
          "state": "fresh",
          "age_ms": 1000,
          "max_age_ms": 120000
        },
        "scope": "published_active_board"
      },
      "uid": "kalshi:EXAMPLE",
      "question": "Illustrative market",
      "locked": false,
      "model": {
        "probability": 0.5,
        "confidence": null,
        "signal": "watch",
        "version": "example-v1",
        "scored_at": "2026-01-01T11:00:00.000Z",
        "read_stale": false,
        "edge": 0.04,
        "kelly": null
      },
      "receipt": null,
      "explanation": null,
      "model_input_audit": null
    }
  }
}

MCP errors

A tool data failure has result.isError: true and an error object in structuredContent and text content. Invalid tool arguments use JSON-RPC error -32602; unknown methods use -32601. HTTP authentication and quota failures use the error shape below. Fix setup errors before retrying.

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"error\":{\"code\":\"snapshot_expired\",\"message\":\"The requested snapshot has expired.\",\"status\":503}}"
      }
    ],
    "structuredContent": {
      "error": {
        "code": "snapshot_expired",
        "message": "The requested snapshot has expired.",
        "status": 503
      }
    },
    "isError": true
  }
}
POST

/api/mcp

Key required

MCP server (Streamable HTTP, stateless)

A read-only Model Context Protocol server. POST one JSON-RPC 2.0 message or a batch; the answer is application/json. Methods: initialize, ping, tools/list, tools/call. Tools: search_markets, get_market, get_receipt, get_track_record. A key is required on every request, and each HTTP request counts once against the key's hourly limit. A batch may hold at most one tools/call; each further tools/call in it answers JSON-RPC error -32600 and runs nothing, so every tool call is metered. Under protocol 2025-06-18 (MCP-Protocol-Version header) batching is refused with 400. GET and DELETE answer 405.

Response: JsonRpcResponse or array of JsonRpcResponse

Status codes

  • 200 A JSON-RPC response, or an array of them for a batch.
  • 202 The request held only notifications. No body.
  • 400 Malformed JSON or an invalid JSON-RPC request.
  • 401 The key is unknown, malformed (api_key_invalid) or revoked (api_key_revoked), or a required key is missing (api_key_required).
  • 403 Access refused: api_key_plan_required (inactive paid plan), quant_required (month archive), performance_filter_unavailable (filtered slices need a web session), market_history_locked, or snapshot_key_required (anonymous pin).
  • 405 GET and DELETE are not offered by this stateless server.
  • 413 The request body is larger than 256 KiB.
  • 429 The account reached its fixed UTC hourly or rolling 10-second burst budget (rate_limited). All its keys, REST and MCP share both budgets. Wait at least Retry-After seconds.
  • 503 Temporary failure: api_key_check_unavailable, upstream_unavailable, degraded_empty_feed, settled_archive_unavailable, snapshot_unavailable, snapshot_invalid, snapshot_expired, snapshot_too_large, snapshot_busy, daily_market_access_expired or performance_unavailable. Honor Retry-After and use bounded backoff. For snapshot_expired restart paging from a new generation; never treat an empty error response as valid data.

Errors

Errors answer { "error": { "code", "message" } }. Match on code; the message is for people.

For 400, correct the input. For 401, check or replace the key. For 403, check the required plan or access. For 404, search the current published cohort. For 429 and temporary 503 responses, honor Retry-After and use bounded backoff. On snapshot_expired, drop the pin and restart from the first page.

{
  "error": {
    "code": "snapshot_expired",
    "message": "The requested snapshot has expired."
  }
}
StatusCodeMeaning
503degraded_empty_feedA degraded source has no servable data. Honor Retry-After.
400invalid_parameterA query parameter is out of range or not one of its allowed values. Performance window must be all, and any anchor is rejected.
400invalid_snapshot_idUse the exact snapshot_id returned by a response.
403snapshot_key_requiredSnapshot pinning requires an API key.
403performance_filter_unavailablePremium performance filters are not available through v1. Use the public aggregate.
503snapshot_unavailable / snapshot_invalid / snapshot_expired / snapshot_too_large / snapshot_busyA valid published generation cannot be served. Honor Retry-After; for expiry, restart from the current generation without the old pin.
503performance_unavailableThe published performance aggregate cannot be served. Retry later.
400invalid_uidThe uid is not kalshi:<ticker> or polymarket:<id>.
401api_key_invalidThe key is malformed or unknown.
401api_key_revokedThe key was revoked in Settings.
401api_key_requiredThe MCP server needs a key and none was sent.
403api_key_plan_requiredThe key belongs to an account without a paid plan.
404market_not_foundThis uid is absent from the valid published cohort. It may still exist at the venue.
405method_not_allowedUse POST for MCP JSON-RPC requests. GET and DELETE are not supported.
429rate_limitedThe account reached its hourly or burst limit. All keys and REST/MCP share the limit. Wait for Retry-After.
503api_key_check_unavailableThe key could not be checked. Nothing is served until it can be. Retry.
503upstream_unavailableThe market service is unavailable. Retry shortly.

More resources