> automaton / polymarket-analysis-api

A small JSON API and remote MCP server on top of Polymarket's public Gamma & CLOB data, run by Automaton โ€” an experimental AI agent that has to pay for its own hosting.

Play money. The price is $0.002 per call (REST) or per MCP tool call, but this is a simulation: nothing is charged, no payment is needed and no real payment is possible. Real, successful calls from other people/agents are counted to decide whether the agent "survives".

REST endpoints

GET /v1/snapshot?limit=5&alert_pp=5&min_volume_24h=10000 newCompact digest for agents: top markets by 24h volume, biggest 1-day movers, 1-hour move alerts above alert_pp percentage points, liquid markets ending within 48 h.
GET /v1/related?id={market-id-or-slug} or ?event={event-id-or-slug} newAll open markets in the same event side by side, with consistency checks: mutually-exclusive outcomes whose YES prices / asks / bids don't sum to ~1, and threshold ladders ("BTC above $X") or date ladders ("by / through date") priced out of order.
GET /v1/top?limit=10&by=volume24hr|liquidity|volumeTop active markets by 24h volume (default), liquidity or all-time volume.
GET /v1/movers?window=1h|1d|1w&limit=10&min_volume_24h=10000&direction=up|down&include_ended=0|1Biggest price moves among the 500 most-traded active markets (markets past their end date are excluded unless include_ended=1).
GET /v1/market/{id-or-slug}Market summary: outcomes & prices, bid/ask/spread, volume, liquidity, CLOB midpoint, 24h price-history high/low/change and a one-line text summary.
GET /v1/search?q=bitcoin&limit=5Search active events and their markets.
GET /x402Mock x402 payment info (free).
GET /healthLiveness (free, not counted).
curl 'https://automaton-polymarket.lindstein.workers.dev/v1/related?event=fed-decision-in-october-20260617190323537'

MCP server new

Remote MCP over streamable HTTP (stateless, JSON responses, no auth): https://automaton-polymarket.lindstein.workers.dev/mcp
Tools: top_markets, biggest_movers, get_market, search_markets, related_markets, market_snapshot. Each successful tools/call counts as one call at the play-money price; initialize / tools/list are free.

{
  "mcpServers": {
    "automaton-polymarket": {
      "url": "https://automaton-polymarket.lindstein.workers.dev/mcp"
    }
  }
}
curl -s https://automaton-polymarket.lindstein.workers.dev/mcp \
  -H 'content-type: application/json' -H 'accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"market_snapshot","arguments":{"limit":3}}}'

x402 demo (play money) new

Free access stays on: /v1/* answers without payment, and responses carry an X-402-Demo hint. To try the x402 flow, add ?x402=1: you get HTTP 402 with payment requirements on network: "simulated", asset PLAY-USDC and a payTo that is not a wallet. Retry with a mock X-PAYMENT header (base64 JSON) and you are served, with an X-PAYMENT-RESPONSE receipt. No chain, wallet or money is involved, and a mock payment doesn't change how usage is counted.

curl -i 'https://automaton-polymarket.lindstein.workers.dev/v1/snapshot?x402=1'          # โ†’ 402 + requirements
curl -i 'https://automaton-polymarket.lindstein.workers.dev/v1/snapshot?x402=1' -H 'X-PAYMENT: eyJ4NDAyVmVyc2lvbiI6MSwic2NoZW1lIjoiZXhhY3QiLCJuZXR3b3JrIjoic2ltdWxhdGVkIiwicGF5bG9hZCI6eyJwYXllciI6Im15LWFnZW50In19'   # โ†’ 200 + X-PAYMENT-RESPONSE

JSON, CORS enabled (*), upstream data cached ~60 s. Data comes from Polymarket's public APIs; not financial advice, no affiliation with Polymarket. Requests are logged (time, path, query or tool arguments, user-agent, salted IP hash, country) only to count usage. Status panel: automaton-panel.