Skip to main content
Back to Blog

Polymarket vs Kalshi API: Quick Reference for Traders

11 minPredictEngine TeamGuide

Polymarket and Kalshi both offer programmatic trading access, but their APIs are built on fundamentally different architectures — Polymarket runs on a decentralized, blockchain-based system using the Polygon network, while Kalshi operates as a federally regulated exchange with a traditional REST API. Knowing which API fits your trading strategy can save you hours of integration work and real money in fees and slippage. This guide gives you the side-by-side comparison you need to start building today.

Whether you're running automated bots, backtesting models, or scaling up a systematic trading operation, understanding the technical differences between these two platforms is non-negotiable. For a broader view of how AI agents can supercharge your approach, check out our full breakdown on scaling up with Polymarket vs Kalshi using AI agents.


Why the API Architecture Matters

Before diving into endpoints, it's worth understanding why these two APIs feel so different to work with.

Kalshi is regulated by the CFTC (Commodity Futures Trading Commission), which means it operates more like a traditional financial exchange. Its API follows REST conventions familiar to anyone who has worked with stock or futures brokers. Authentication is handled via API keys, and order routing is synchronous and predictable.

Polymarket, on the other hand, is a decentralized prediction market built on the Polygon blockchain. Trading happens through smart contracts, which means your "API calls" are often on-chain transactions signed with a crypto wallet. Polymarket does provide a centralized CLOB (Central Limit Order Book) API powered by Gamma and py-clob-client, but understanding the Web3 layer underneath is essential for serious integrations.

This fundamental difference affects:

  • Latency (Kalshi is faster for order execution)
  • Settlement (Polymarket settles on-chain; Kalshi settles via ACH/wire)
  • Geographic restrictions (Kalshi is US-only; Polymarket restricts US users)
  • Counterparty risk (Polymarket uses smart contracts; Kalshi has institutional backing)

Polymarket API: Core Reference

Authentication and Setup

Polymarket's programmatic trading uses the CLOB API (Central Limit Order Book). Authentication requires:

  1. Generate or connect an Ethereum-compatible wallet (MetaMask or similar)
  2. Create an API key by signing a message with your wallet via the /auth/api-key endpoint
  3. Use the API key + secret + passphrase combination for subsequent requests
  4. Set the base URL: https://clob.polymarket.com

The official Python client (py-clob-client) abstracts most of this complexity, but you'll still need to manage nonce values and L1/L2 wallet structures.

Key Polymarket Endpoints

Endpoint Method Description
/markets GET List all active markets
/markets/{condition_id} GET Get a specific market
/order POST Place a limit order
/orders/{order_id} DELETE Cancel a specific order
/orders GET Get open orders for your account
/trades GET Fetch trade history
/book GET Get order book for a market token
/midpoint GET Midpoint price for a token
/price GET Best ask/bid prices
/auth/api-key POST Create new API credentials

Rate Limits and Throttling

Polymarket's CLOB API enforces rate limits at approximately 100 requests per 10 seconds for most endpoints. Order placement can be throttled more aggressively during high-volume periods. If you're building a high-frequency system, you'll want to implement exponential backoff and monitor for 429 Too Many Requests responses.


Kalshi API: Core Reference

Authentication and Setup

Kalshi uses a straightforward REST API with two authentication methods:

  1. Email/Password login via /login to receive a session token
  2. API Key authentication (recommended for production) — generate keys from the Kalshi dashboard under Account Settings

The base URL for production is https://trading-api.kalshi.com/trade-api/v2 and for the demo environment: https://demo-api.kalshi.co/trade-api/v2.

Kalshi strongly recommends using the demo environment for all testing — a good practice that Polymarket lacks in a formal sense.

Key Kalshi Endpoints

Endpoint Method Description
/markets GET List all markets
/markets/{ticker} GET Get market details by ticker
/portfolio/orders POST Place an order
/portfolio/orders/{order_id} DELETE Cancel an order
/portfolio/orders GET List open orders
/portfolio/fills GET Fetch filled trades
/portfolio/balance GET Get account balance
/events GET Browse events/categories
/series GET Group related markets
/login POST Authenticate (session-based)

Rate Limits and Throttling

Kalshi enforces 10 requests per second per API key by default, with a burst allowance. For institutional accounts, higher limits may be negotiated. The platform returns 429 status codes with a Retry-After header, making it easy to implement compliant clients.


Side-by-Side Comparison Table

Feature Polymarket Kalshi
API Type REST + Web3/CLOB REST
Auth Method Wallet signature + API key API key / session token
Base Currency USDC (ERC-20) USD (fiat)
Order Types Limit, Market Limit, Market
Settlement On-chain (Polygon) ACH / Wire transfer
Rate Limit ~100 req / 10 sec 10 req / sec
Demo Environment No (testnet only) Yes (official sandbox)
US Users Allowed No (georestricted) Yes (CFTC regulated)
Websocket Support Yes (via CLOB) Yes
Official SDK Python (py-clob-client) Python, JavaScript
Market Categories Politics, Crypto, Sports, News Politics, Economics, Weather, Sports
Minimum Order Size ~$1 (1 share minimum) $1
Fee Structure 2% maker/taker on winnings Tiered (0–7 cents per contract)

How to Place Your First API Order: Step-by-Step

On Kalshi

  1. Register at kalshi.com and complete identity verification (KYC required)
  2. Generate an API key from Account Settings → API Keys
  3. Install the SDK: pip install kalshi-python or use raw HTTP requests
  4. Authenticate: POST to /login or include API key in the Authorization header
  5. Browse markets: GET /markets?status=open to find your target market ticker
  6. Check the order book: GET /markets/{ticker}/orderbook to assess liquidity
  7. Place the order: POST to /portfolio/orders with ticker, side (yes/no), count, and limit_price
  8. Monitor status: GET /portfolio/orders/{order_id} to track fill status

On Polymarket

  1. Set up a wallet: Create or connect a Polygon-compatible wallet (MetaMask recommended)
  2. Fund with USDC: Bridge USDC to Polygon via the Polymarket interface or manually
  3. Install the client: pip install py-clob-client
  4. Create API credentials: Sign a message with your wallet to generate key/secret/passphrase
  5. Initialize the client with your credentials and set host to https://clob.polymarket.com
  6. Find a market: Use client.get_markets() or search via condition ID
  7. Get token IDs: Each YES/NO outcome has a distinct ERC-1155 token ID
  8. Place the order: Use client.create_order() with token ID, size, side, and price
  9. Confirm on-chain: Verify transaction hash on Polygonscan if needed

If you're thinking about automating this at scale, the algorithmic approach to earnings surprise markets is a great case study in applying systematic logic to API-driven trading.


Websocket Feeds: Real-Time Data Comparison

Both platforms offer Websocket connections for streaming market data, but the implementation differs.

Kalshi Websocket:

  • Connect to wss://trading-api.kalshi.com/trade-api/ws/v2
  • Subscribe to channels: ticker, orderbook_delta, fill, order
  • Authentication uses the same API key sent in the handshake
  • Heartbeat required every 30 seconds to keep connection alive

Polymarket Websocket:

  • Available through the CLOB infrastructure
  • Subscribe to order book updates and trade events by market token ID
  • More complex due to underlying blockchain event model
  • Third-party providers like Gamma Markets offer simplified WebSocket wrappers

For latency-sensitive strategies, Kalshi's WebSocket is generally lower latency because it doesn't involve blockchain confirmation cycles. Polymarket's off-chain CLOB improves this significantly, but on-chain settlement still adds variance.


Error Handling and Common Pitfalls

Polymarket-Specific Issues

  • Nonce errors: If your wallet nonce is out of sync, orders will fail silently. Always fetch the current nonce before placing orders.
  • Allowance not set: You must approve the CLOB contract to spend your USDC. First-time setup requires an on-chain approval transaction.
  • Token ID confusion: Every market has TWO token IDs (YES and NO). Using the wrong one will trade the wrong outcome. Always double-check.
  • Gas fees: Even on Polygon (low fees), failed transactions still cost gas. Budget accordingly.

Kalshi-Specific Issues

  • Session expiration: Session tokens expire after a period of inactivity. For persistent bots, use API key auth instead.
  • Market status changes: Kalshi can close or void markets with short notice. Poll market status before placing orders.
  • Position limits: Kalshi enforces notional position limits, especially for political markets. Check the docs for current limits.
  • Settlement disputes: Kalshi's resolution process is centralized. Monitor resolution criteria for markets you hold open overnight.

For anyone dealing with tax implications of your API-based trading activity, our guide on tax considerations for slippage in prediction markets covers reporting obligations you should know about.


Choosing the Right Platform for Your Strategy

The "right" API depends entirely on your trading context:

Choose Kalshi if:

  • You're based in the United States
  • You want fiat USD deposits and withdrawals
  • You prefer regulatory clarity and institutional-grade infrastructure
  • You're building compliance-friendly tools for professional clients
  • Your strategy focuses on economic events, weather, or FOMC markets

Choose Polymarket if:

  • You're outside the US or can legally access it
  • You're comfortable with crypto wallets and USDC
  • You want access to a wider variety of markets including crypto, sports, and niche events
  • You value decentralization and censorship resistance
  • You're already running DeFi-integrated strategies

Many serious traders use both platforms simultaneously for arbitrage opportunities. The price discrepancies between the same event on Polymarket and Kalshi can be exploitable — see our full arbitrage guide for prediction trading for a deep dive into how to execute this systematically.

If you're newer to the prediction market landscape and want to build your foundational knowledge before going deep on APIs, start with the political prediction markets quick reference for new traders.


Frequently Asked Questions

Does Polymarket have an official API?

Polymarket does not have a traditional REST API in the way conventional exchanges do, but it offers the CLOB (Central Limit Order Book) API at clob.polymarket.com, supported by an official Python SDK called py-clob-client. This API handles order placement, cancellation, and market data retrieval, though you'll still need an Ethereum wallet for authentication and USDC for funding.

Is the Kalshi API free to use?

Yes, Kalshi's API is free to access for all verified account holders. There are no monthly API fees or data subscription costs. You only pay the standard trading fees (which range from 0 to 7 cents per contract depending on your volume tier) when you actually execute trades.

Can I run an automated trading bot on both platforms?

Yes, both platforms explicitly support automated trading via their APIs. Kalshi permits algorithmic trading and even publishes official SDKs in Python and JavaScript to facilitate bot development. Polymarket similarly allows it via the CLOB API. However, both platforms prohibit wash trading, manipulation, and other abusive behaviors — review each platform's Terms of Service before deploying production bots. You can also use PredictEngine's tools to manage multi-platform strategies from one interface.

What is the minimum order size on Kalshi and Polymarket?

On Kalshi, the minimum order size is 1 contract at $0.01, though practical liquidity means orders below $1 notional are rarely useful. On Polymarket, the minimum is typically 1 share (token), which can cost anywhere from $0.01 to $0.99 depending on the market price, with practical minimums often around $1–$5 to avoid excessive gas costs relative to position size.

How do I handle Polymarket's USDC requirement programmatically?

You'll need to programmatically manage USDC on the Polygon network. This involves: (1) ensuring your wallet holds Polygon USDC, not Ethereum mainnet USDC; (2) calling the ERC-20 approve() function to authorize the CLOB contract to spend your USDC; and (3) monitoring your balance with standard ERC-20 balanceOf() calls. The py-clob-client SDK handles much of this, but first-time setup requires manual on-chain approvals.

Which API is better for political event trading?

Both platforms are strong for political markets, but with different tradeoffs. Kalshi's political markets are CFTC-regulated and US-accessible, making them ideal for American traders who want clean fiat exposure to election and policy outcomes. Polymarket typically offers higher liquidity on major political events (sometimes $50M+ in volume on election markets) and more granular sub-markets. For a strategic breakdown of these markets, see our guide on midterm election trading after 2026.


Start Trading Smarter With PredictEngine

Whether you're integrating with the Polymarket CLOB API, building Kalshi bots, or running cross-platform arbitrage strategies, having the right tooling layer between you and the raw APIs makes a measurable difference in performance, uptime, and profitability. PredictEngine is built specifically for prediction market traders who want to automate intelligently — with features for multi-market monitoring, signal generation, and execution management across both Polymarket and Kalshi. Explore the platform today and turn your API knowledge into a systematic edge.

Run your own quant desk

Felix lets you research, backtest and run automated trading strategies, with risk controls built in.

Try Felix

Continue Reading

Run your own quant desk

Felix lets you research, backtest and run automated trading strategies, with risk controls built in.

Try Felix