API + MCP live · talk to us

// BLOG

Trading prediction markets, from a developer's seat.

APIs, execution quality, AI agents, and quant strategy on Kalshi and Polymarket. Written by the team building Mithril.

// PREDICTION-MARKET APIS

Kalshi and Polymarket from a developer's seat: auth, order placement, market data, and the differences that bite.

PILLAR GUIDE

The complete guide to prediction market APIs (Kalshi + Polymarket)

How to trade Kalshi and Polymarket programmatically: auth, market data, order placement, rate limits, and the architectural differences between the two APIs.

Read →
kalshi

Kalshi API guide: place your first order

A practical walkthrough of the Kalshi trade API: API-key auth and request signing, markets and orderbook endpoints, placing your first order, and the gotchas.

Read →
polymarket

Polymarket CLOB API guide

How Polymarket's API actually works: Gamma vs CLOB services, L1/L2 auth, token_id vs condition_id, a py-clob-client walkthrough, and settlement on Polygon.

Read →
kalshi

Kalshi API vs Polymarket API: the differences that bite

A side-by-side of Kalshi and Polymarket APIs: auth, market IDs, price formats, fees, order lifecycle, rate limits, and error semantics — with a comparison table.

Read →
python

How to build a prediction-market trading bot in Python

Architecture for a Python prediction-market bot: market data loop, signal-to-order pipeline, risk checks, and idempotent retries — venue-agnostic, with code.

Read →
kalshi

Rate limits, order types, and websockets on Kalshi and Polymarket

The operational layer of trading Kalshi and Polymarket: order types, WebSocket channels, rate limits, and the backoff patterns that keep your bot connected.

Read →
kalshi

Unified market IDs: mapping the same event across Kalshi and Polymarket

Kalshi tickers and Polymarket condition IDs share no common key. Why matching markets across venues is hard, where it goes wrong, and how unified IDs enable routing.

Read →

// EXECUTION & FEES

What a fill actually costs: fee schedules, slippage in thin books, routing, and how to measure execution.

PILLAR GUIDE

Execution quality in prediction markets: fees, slippage, and routing

The total cost of a fill on Kalshi and Polymarket: displayed price, fees, spread, and market impact — and how routing and order-working reduce it.

Read →
kalshi

Kalshi fees explained (with worked examples)

How Kalshi's taker fee formula 0.07 × price × (1−price) actually works: round-up rules, maker treatment, and worked examples at 10¢, 50¢, and 90¢.

Read →
polymarket

Polymarket fees and gas explained

Polymarket charges no exchange trading fee on most markets — but execution isn't free. Spread, price impact, Polygon gas, and USDC bridging, with a worked example.

Read →
kalshi

Kalshi vs Polymarket fees: the total cost of a fill

Side-by-side worked examples of Kalshi's taker fee vs Polymarket's fee-free-but-not-costless model — and when the displayed-cheaper venue is net-more-expensive.

Read →
routing

What is smart order routing? Applied to prediction markets

Smart order routing, translated from equities to Kalshi and Polymarket: net-price-after-fees comparison, split fills, and what to do with single-venue markets.

Read →
slippage

Slippage in thin prediction markets and how to avoid it

Why market orders in thin Kalshi and Polymarket books cost more than any fee — and how slicing, pacing, passive posting, and slippage caps contain it.

Read →
best-execution

Execution receipts: what best execution means in prediction markets

Best execution, imported from tradfi: arrival-mid benchmarks, naive-sweep comparisons, and fee itemization — why every prediction-market fill deserves a receipt.

Read →

// AI AGENTS THAT TRADE

Letting Claude, GPT, or your own agent trade prediction markets — with custody and risk limits done right.

// QUANT STRATEGIES

Arbitrage, market making, sizing, and backtesting on binary contracts.