Polymarket vs Kalshi API: Quick Reference Guide 2025
Polymarket and Kalshi are the two dominant prediction market platforms for API-driven traders — and choosing the right one (or using both) depends on your use case, regulatory needs, and technical stack. This guide gives you a side-by-side breakdown of their APIs, covering authentication, endpoints, rate limits, data formats, and trading mechanics so you can build or optimize your strategy without wading through hours of documentation.
Whether you're an algo trader, a data scientist building signals, or a developer integrating prediction markets into a larger system, this reference will save you significant setup time. Let's get into it.
Why API Access Matters for Prediction Market Traders
Prediction markets move fast. Political events, sports outcomes, economic data releases — odds shift in minutes, sometimes seconds. If you're manually clicking around a web interface, you're already behind.
API access lets you:
- Pull real-time market data and orderbook depth programmatically
- Execute trades automatically based on model signals or price thresholds
- Monitor positions and manage risk across dozens of markets simultaneously
- Backtest strategies using historical contract data
Platforms like PredictEngine are purpose-built to layer on top of these APIs — giving traders structured tools to interpret, execute, and automate without writing everything from scratch. But if you want to go deeper into the raw infrastructure, here's what each platform actually offers.
Platform Overview: Polymarket vs Kalshi at a Glance
Before diving into the technical details, it helps to understand the fundamental difference between the two platforms.
Polymarket is a decentralized prediction market built on the Polygon blockchain. It uses USDC as its settlement currency and relies on the CLOB (Central Limit Order Book) architecture managed by a separate infrastructure layer called Gamma for market data and CLOB API for trading.
Kalshi is a federally regulated prediction market exchange in the United States, operating under CFTC oversight. It uses USD directly, offers a traditional REST API, and is structured more like a conventional financial exchange.
| Feature | Polymarket | Kalshi |
|---|---|---|
| Regulatory Status | Decentralized / offshore | CFTC-regulated (US) |
| Base Currency | USDC (Polygon) | USD |
| API Type | REST + WebSocket (CLOB) | REST + WebSocket |
| Authentication | L1/L2 ECDSA key signing | JWT / API Key |
| Order Book | Yes (CLOB) | Yes |
| Market Types | Binary outcome | Binary + multi-outcome |
| Historical Data | Via Gamma API | Via REST endpoints |
| Rate Limits | ~100 req/min (varies) | Tiered, up to 500 req/min |
| Sandbox / Testnet | No official sandbox | Yes (demo environment) |
| Settlement | Automated on-chain | Manual/automated USD |
| US Access | Restricted (geo-blocked) | Open to US users |
Kalshi API: Key Endpoints and Authentication
Getting Started with Kalshi Auth
Kalshi uses API key-based authentication. After registering and enabling API access in your account settings, you receive an API_KEY_ID and API_KEY_SECRET. Authentication is done via HMAC-SHA256 signing of requests.
Here's the standard authentication flow:
- Generate your API key in the Kalshi dashboard under Settings > API Access
- Store your
API_KEY_IDandAPI_KEY_SECRETsecurely (environment variables, not hardcoded) - For each request, generate a timestamp (Unix milliseconds)
- Construct the signature string:
timestamp + method + path + body - Sign with HMAC-SHA256 using your
API_KEY_SECRET - Pass
KALSHI-ACCESS-KEY,KALSHI-ACCESS-TIMESTAMP, andKALSHI-ACCESS-SIGNATUREas headers
The base URL for production is https://trading-api.kalshi.com/trade-api/v2.
Core Kalshi Endpoints
| Endpoint | Method | Description |
|---|---|---|
/markets |
GET | List all available markets |
/markets/{ticker} |
GET | Single market details |
/markets/{ticker}/orderbook |
GET | Current orderbook depth |
/portfolio/orders |
GET/POST | Fetch or place orders |
/portfolio/positions |
GET | Current open positions |
/portfolio/balance |
GET | Account balance |
/events |
GET | Browse event categories |
/series/{series_ticker} |
GET | Market series details |
Kalshi's WebSocket feed is available at wss://trading-api.kalshi.com/trade-api/ws/v2 and supports real-time orderbook updates and trade notifications.
Kalshi Rate Limits
Kalshi uses a tiered rate limit system. Free API access typically allows 100-150 requests per minute. Verified or institutional accounts can access higher tiers, up to 500 requests per minute. Rate limit headers (X-RateLimit-Remaining, X-RateLimit-Reset) are included in every response.
Polymarket API: Key Endpoints and Authentication
Understanding Polymarket's Two-Layer Architecture
Polymarket's API is more complex than Kalshi's because it has two distinct layers:
- Gamma API — for market discovery, metadata, and historical data (
https://gamma-api.polymarket.com) - CLOB API — for order placement, cancellation, and live orderbook data (
https://clob.polymarket.com)
This split exists because Polymarket is decentralized. Trading happens via smart contracts on Polygon, while market data is aggregated off-chain.
Polymarket Authentication Steps
Authentication on Polymarket requires Ethereum-compatible wallet signing:
- Create or import an Ethereum wallet (MetaMask, or programmatically via
ethers.js/web3.py) - Fund the wallet with USDC on Polygon and a small amount of MATIC for gas
- Approve the CLOB contract to spend your USDC
- Generate a Level 1 (L1) API key by signing a message with your wallet private key
- Optionally generate Level 2 (L2) keys for sub-accounts or automated trading
- Use L1/L2 keys to sign all CLOB API requests
This setup is more involved than Kalshi but gives you full custody of funds and no KYC requirement (though US users are geo-blocked).
Core Polymarket CLOB Endpoints
| Endpoint | Method | Description |
|---|---|---|
/markets |
GET | Active markets list |
/orderbook |
GET | Orderbook by condition ID |
/orders |
POST | Place an order |
/orders/{order_id} |
DELETE | Cancel an order |
/positions |
GET | Open positions |
/trades |
GET | Trade history |
/last-trade-price |
GET | Most recent trade price |
/midpoint |
GET | Mid-market price |
The Gamma API supplements this with:
/markets?active=true&closed=false— filtered market lists/markets/{condition_id}— detailed market metadata, resolution criteria/prices-history— historical price series for backtesting
WebSocket Streams on Polymarket
Polymarket's CLOB WebSocket (wss://ws-subscriptions-clob.polymarket.com/ws/) supports three channel types:
market— price and trade updatesuser— personal order/fill notificationsbook— full orderbook snapshots and diffs
For anyone building automated strategies, these streams are essential. Check out our guide on LLM-powered trade signals for ideas on layering model outputs on top of these real-time feeds.
Placing and Managing Orders: Side-by-Side Comparison
Order Types Supported
| Order Type | Polymarket | Kalshi |
|---|---|---|
| Market Order | Yes | Yes |
| Limit Order | Yes | Yes |
| GTC (Good Till Cancelled) | Yes | Yes |
| GTD (Good Till Date) | No | Yes |
| IOC (Immediate or Cancel) | Yes | Yes |
| FOK (Fill or Kill) | Yes | Yes |
Both platforms support YES/NO binary contracts as the core instrument. Kalshi additionally supports some ranged/tiered markets (e.g., "Will inflation be above 3%, 4%, or 5%?").
Settlement and Resolution
Kalshi settles directly in USD to your Kalshi account balance. Resolution is managed by Kalshi's internal team, typically within 24 hours of an event resolving. The process is straightforward for US traders since there's no crypto conversion step.
Polymarket settles on-chain via the UMA optimistic oracle. Resolved contracts pay out in USDC to your Polygon wallet. The resolution process can take 2-7 days for complex events, and there's a dispute window where token holders can challenge resolutions.
If you're trading political or macroeconomic markets specifically, our breakdown of automating economics prediction markets in 2026 covers how these settlement differences affect automated strategies significantly.
Data Structures and Response Formats
Kalshi Market Object (Simplified)
{
"ticker": "PRES-2024-REP",
"title": "Will the Republican win the 2024 Presidential Election?",
"status": "active",
"yes_bid": 0.52,
"yes_ask": 0.54,
"last_price": 0.53,
"volume": 1284500,
"open_interest": 430200,
"close_time": "2024-11-05T23:59:00Z"
}
Polymarket Market Object (Simplified)
{
"condition_id": "0xabc123...",
"question": "Will the Republican win the 2024 Presidential Election?",
"tokens": [
{"token_id": "YES_TOKEN_ID", "outcome": "Yes"},
{"token_id": "NO_TOKEN_ID", "outcome": "No"}
],
"best_bid": 0.51,
"best_ask": 0.53,
"last_trade_price": 0.52,
"volume_24hr": 85200.50,
"active": true,
"end_date_iso": "2024-11-06T00:00:00Z"
}
The most notable structural difference: Polymarket identifies contracts by blockchain condition IDs (hex strings), while Kalshi uses human-readable tickers. This matters when building cross-platform tools or arbitrage systems — you'll need a mapping layer.
Speaking of which, the AI agents in trading and prediction markets arbitrage guide covers exactly how to build those mapping layers at scale.
Liquidity, Fees, and Spread Considerations
Fee Structures
| Fee Type | Polymarket | Kalshi |
|---|---|---|
| Maker Fee | 0% | 0% |
| Taker Fee | 0% | ~0% (Kalshi earns on spread) |
| Withdrawal Fee | Polygon gas (~$0.01) | Varies by method |
| Minimum Order | $1 | $1 |
Both platforms technically have zero explicit trading fees, but liquidity costs differ:
- Polymarket typically has tighter spreads on high-volume political markets but wider spreads on niche topics
- Kalshi markets can have wider spreads overall but benefit from deeper institutional liquidity on regulated products
For a deeper look at how liquidity affects your fills and strategy, the prediction market liquidity sourcing quick reference is worth bookmarking.
Volume Benchmarks (2024-2025)
- Polymarket processed over $1 billion in monthly volume during the 2024 US election cycle
- Kalshi crossed $500 million in cumulative trading volume following its legal victory against the CFTC in 2024
- Average bid-ask spread on top Polymarket political markets: 1-3 cents
- Average spread on comparable Kalshi markets: 2-5 cents
Choosing the Right Platform for Your Use Case
| Use Case | Best Platform | Reason |
|---|---|---|
| US-based retail trader | Kalshi | Regulated, no VPN needed |
| Crypto-native / DeFi user | Polymarket | USDC, on-chain settlement |
| High-frequency trading | Polymarket (CLOB) | More flexible order API |
| Compliance-sensitive institution | Kalshi | CFTC oversight, audit trail |
| Niche/exotic markets | Polymarket | More market variety |
| Sports prediction trading | Both | Overlap exists |
| Arbitrage across platforms | Both | Price divergence opportunity |
For sports-specific API strategies, check out our NFL season predictions via API risk analysis guide for a real-world example of how these endpoints behave under event-driven volatility.
Setting Up Your First API Connection: Step-by-Step
For Kalshi:
- Register at kalshi.com and complete identity verification
- Navigate to Settings > API Access and generate your API key pair
- Store credentials in a
.envfile:KALSHI_API_KEY_IDandKALSHI_API_KEY_SECRET - Install the official Python SDK:
pip install kalshi-pythonor use raw HTTP requests - Test with a
GET /portfolio/balancecall to confirm connectivity - Pull
/marketsto explore available contracts - Place a test order using
/portfolio/orderswith a limit order at a non-executable price to verify order flow without filling
For Polymarket:
- Set up an Ethereum wallet — use a dedicated wallet, not your personal one
- Fund with USDC on Polygon via bridge or direct purchase
- Add a small amount of MATIC for gas (0.5 MATIC is usually sufficient)
- Install
py-clob-client(official Polymarket Python client):pip install py-clob-client - Generate API keys by calling the key derivation endpoint with your wallet signature
- Test connectivity with
GET /marketson the CLOB API - Fetch an orderbook with
GET /orderbook?token_id={token_id}to confirm data flow - Place a test limit order far from the market price to verify the signing and submission flow
Frequently Asked Questions
Can I use both Polymarket and Kalshi APIs simultaneously?
Yes, and many sophisticated traders do exactly this. Running both APIs in parallel enables cross-platform arbitrage when prices diverge on the same underlying event. You'll need separate authentication systems and a mapping layer to match equivalent markets across platforms.
Is Polymarket legal in the United States?
Polymarket is geo-blocked for US users and has faced regulatory scrutiny. US residents using VPNs to access Polymarket do so at their own legal risk. For US-compliant prediction market trading, Kalshi is the recommended alternative as it operates under CFTC regulation.
What programming languages work best with these APIs?
Both APIs are language-agnostic REST interfaces, but official SDKs exist for Python (both platforms) and JavaScript (Polymarket). Most algo traders use Python due to its data science ecosystem. Kalshi also has a Go SDK maintained by the community.
How do I handle Polymarket's on-chain settlement in an automated system?
You'll need to integrate a Polygon RPC provider (Alchemy, Infura, or QuickNode) and monitor contract resolution events on-chain. When a market resolves, your YES or NO tokens automatically convert to $1 or $0 USDC. Automate USDC withdrawal using the redeemPositions smart contract call.
What are the rate limits on the free tier for each platform?
Kalshi allows approximately 100-150 requests per minute on standard accounts. Polymarket's CLOB API is less formally documented but practically limits to around 100 requests per minute before throttling. Both platforms offer higher limits for institutional or high-volume accounts on request.
Do these APIs support paper trading or sandboxes?
Kalshi has an official demo environment at demo-api.kalshi.co with simulated funds. Polymarket does not offer a sandbox — you'll need to test with real funds using very small orders, or fork the contracts locally using a Polygon testnet setup.
Start Trading Smarter with PredictEngine
Understanding the API differences between Polymarket and Kalshi is just the first step — building a profitable, automated strategy on top of them is where the real work begins. PredictEngine brings together market data, AI-powered signals, and execution tools so you can trade prediction markets without reinventing the infrastructure every time. Whether you're running arbitrage across both platforms, backtesting political market strategies, or building a fully automated bot, PredictEngine gives you the foundation to move fast and trade confidently. Explore our pricing options and AI trading bot features to see how quickly you can go from API keys to live strategy.
Run your own quant desk
Felix lets you research, backtest and run automated trading strategies, with risk controls built in.
Try Felix