Kalshi occupies a unique position in the prediction market landscape: it is the only CFTC-regulated prediction market exchange in the United States. This regulatory status means fiat settlement, institutional-grade infrastructure, and legal clarity for U.S.-based traders and agents — but it also means KYC requirements, geographic restrictions, and a more controlled ecosystem than crypto-native alternatives like Polymarket.
For bot builders and agent developers, Kalshi offers familiar patterns. REST APIs over HTTPS, WebSocket streaming, RSA-based authentication, and even FIX 4.4 for institutional connectivity. If you have built trading bots for traditional financial exchanges, Kalshi will feel like home. If you are coming from the crypto/Polymarket world, expect a different (and in some ways simpler) authentication model, but fewer community tools and less open-source infrastructure.
This directory catalogs every significant agent, bot, SDK, and automation tool for Kalshi that we have identified as of March 2026. It is organized by category with comparison tables, code examples, and guidance on choosing the right approach.
For a deep-dive API tutorial, see the Kalshi API Guide. For cross-platform comparisons, see Polymarket Bot Ecosystem Map.
Kalshi’s Exchange Model: What Makes It Different
Understanding Kalshi’s regulatory and technical architecture is essential context for evaluating the tools in this directory.
CFTC-Regulated Event Contracts
Kalshi operates as a Designated Contract Market (DCM) under the Commodity Futures Trading Commission. This means:
- Legal clarity for U.S. entities. Banks, funds, and corporations can trade on Kalshi without the legal ambiguity that surrounds crypto-native platforms.
- Event contracts, not tokens. Kalshi positions are regulated contracts, not blockchain tokens. You cannot transfer them to another wallet or trade them on a secondary market.
- Fiat settlement. All deposits and withdrawals are in USD through traditional banking (ACH, wire transfer). No crypto wallets required.
- Zero trading fees. As of 2026, Kalshi charges 0% trading fees, making it cost-competitive with Polymarket for most strategies.
- CFTC-approved categories. Kalshi can only list markets in categories approved by the CFTC. This means fewer total markets than Polymarket, but each market has regulatory backing.
Technical Architecture
Kalshi’s API is simpler than Polymarket’s because it is a single, unified system rather than a set of independent services.
┌──────────────────────────────────────────────┐
│ Your Bot / Agent │
│ Signs requests with RSA-PSS private key │
├──────────────────────────────────────────────┤
│ Kalshi API Gateway │
│ REST API v2: Markets, orders, account │
│ WebSocket: Real-time data streaming │
│ FIX 4.4: Low-latency institutional trading │
├──────────────────────────────────────────────┤
│ Kalshi Matching Engine │
│ Central limit order book │
│ Price-time priority matching │
├──────────────────────────────────────────────┤
│ Kalshi Settlement System │
│ Binary event resolution (Yes/No) │
│ Fiat USD settlement to bank accounts │
└──────────────────────────────────────────────┘
| Interface | URL | Purpose | Latency |
|---|---|---|---|
| REST API v2 | trading-api.kalshi.com/trade-api/v2 | Markets, orders, account, history | 50-200ms |
| WebSocket | trading-api.kalshi.com/trade-api/ws/v2 | Real-time orderbook, tickers, trades, fills | <50ms |
| FIX 4.4 | Contact Kalshi for endpoint | Institutional-grade order execution | <10ms |
| Demo REST | demo-api.kalshi.co/trade-api/v2 | Sandbox for testing (fake money) | 50-200ms |
| Demo WebSocket | demo-api.kalshi.co/trade-api/ws/v2 | Sandbox real-time data | <50ms |
Authentication: RSA-PSS Signatures
Every authenticated Kalshi API request requires a cryptographic signature using RSA-PSS. This is fundamentally different from Polymarket’s EIP-712 wallet-based signing.
import time
import base64
from cryptography.hazmat.primitives import hashes, serialization
from cryptography.hazmat.primitives.asymmetric import padding
def sign_kalshi_request(private_key_path, timestamp, method, path):
"""Sign a Kalshi API request with RSA-PSS."""
with open(private_key_path, "rb") as f:
private_key = serialization.load_pem_private_key(f.read(), password=None)
# Kalshi signs: timestamp + method + path
message = f"{timestamp}{method}{path}".encode()
signature = private_key.sign(
message,
padding.PSS(
mgf=padding.MGF1(hashes.SHA256()),
salt_length=padding.PSS.AUTO
),
hashes.SHA256()
)
return base64.b64encode(signature).decode()
# Usage in a request
timestamp = str(int(time.time()))
method = "GET"
path = "/trade-api/v2/markets"
signature = sign_kalshi_request("kalshi_private_key.pem", timestamp, method, path)
headers = {
"KALSHI-ACCESS-KEY": "your_api_key_id",
"KALSHI-ACCESS-SIGNATURE": signature,
"KALSHI-ACCESS-TIMESTAMP": timestamp,
}
This authentication pattern means that Kalshi bots do not need blockchain wallets, gas tokens, or any crypto infrastructure. A PEM file and an API key are all you need.
Official Tools
Kalshi provides a compact but well-documented set of official tools for automated trading.
Kalshi REST API v2
The primary interface for most bot developers. Covers market data, order management, account operations, and settlement history.
Key endpoints:
| Endpoint | Method | Description |
|---|---|---|
/markets | GET | List and filter all available markets |
/markets/{ticker} | GET | Get details for a specific market |
/markets/{ticker}/orderbook | GET | Full orderbook with bids and asks |
/portfolio/orders | POST | Place a new order (limit or market) |
/portfolio/orders/{order_id} | DELETE | Cancel an open order |
/portfolio/positions | GET | Get all current positions |
/portfolio/balance | GET | Check account balance |
/portfolio/settlements | GET | Historical settlement data |
import requests
BASE_URL = "https://trading-api.kalshi.com/trade-api/v2"
# Get active markets in the "Economics" category
response = requests.get(
f"{BASE_URL}/markets",
headers=headers, # RSA-PSS signed headers
params={
"status": "open",
"series_ticker": "ECON",
"limit": 50
}
)
markets = response.json()["markets"]
for market in markets:
print(f"{market['ticker']}: {market['title']}")
print(f" Yes: {market['yes_ask']}c / No: {market['no_ask']}c")
print(f" Volume: {market['volume']} contracts")
Kalshi WebSocket API
Real-time data streaming for orderbook updates, trade prints, ticker changes, and fill notifications.
import websocket
import json
def on_message(ws, message):
data = json.loads(message)
msg_type = data.get("type")
if msg_type == "orderbook_delta":
print(f"Orderbook update: {data['market_ticker']}")
print(f" Bids: {data.get('yes_bids', [])}")
print(f" Asks: {data.get('yes_asks', [])}")
elif msg_type == "trade":
print(f"Trade: {data['market_ticker']} @ {data['yes_price']}c")
elif msg_type == "fill":
print(f"Your order filled: {data['order_id']}")
ws = websocket.WebSocketApp(
"wss://trading-api.kalshi.com/trade-api/ws/v2",
header=headers, # RSA-PSS signed headers
on_message=on_message
)
# Subscribe to a market's orderbook and trades
ws.on_open = lambda ws: ws.send(json.dumps({
"id": 1,
"cmd": "subscribe",
"params": {
"channels": ["orderbook_delta", "trade"],
"market_tickers": ["ECON-GDP-Q1-2026"]
}
}))
ws.run_forever()
Best for: Real-time strategies, market-making, and any bot that needs immediate reaction to price changes.
Kalshi FIX 4.4 Protocol
FIX (Financial Information eXchange) 4.4 is the institutional standard for low-latency trading. Kalshi supports it for order execution, giving institutional traders the connectivity they are accustomed to from traditional exchanges.
| Attribute | Detail |
|---|---|
| Protocol | FIX 4.4 |
| Latency | Sub-10ms |
| Use case | Market-making, HFT, institutional desks |
| Access | Contact Kalshi for FIX endpoint and credentials |
Who should use FIX: If you have existing FIX infrastructure from trading equities, futures, or other instruments, and you need the lowest possible latency on Kalshi. For most individual developers, the REST API is sufficient.
Official Kalshi Python SDK (kalshi-python)
Kalshi maintains an official Python SDK that wraps the REST API with authentication handling.
| Attribute | Detail |
|---|---|
| Repository | Kalshi/kalshi-python on GitHub |
| Language | Python |
| License | MIT |
| Install | pip install kalshi-python |
| Maintenance | Active (Kalshi team) |
from kalshi_python import ApiInstance
from kalshi_python.models import CreateOrderRequest
# Initialize the client
api = ApiInstance(
host="https://trading-api.kalshi.com/trade-api/v2",
key_id="your_api_key_id",
private_key_path="kalshi_private_key.pem"
)
# Get your portfolio balance
balance = api.get_balance()
print(f"Available balance: ${balance.balance / 100:.2f}")
# Place a limit order (prices in cents)
order = api.create_order(CreateOrderRequest(
ticker="ECON-GDP-Q1-2026",
action="buy",
side="yes",
type="limit",
yes_price=45, # 45 cents
count=10 # 10 contracts
))
print(f"Order placed: {order.order_id}")
Strengths: Official support, handles RSA-PSS signing internally, type-safe models for requests and responses.
Weaknesses: Python-only, documentation can be sparse on edge cases, does not include WebSocket support (you need to implement that separately).
Open-Source Tools and Community Libraries
The Kalshi open-source ecosystem is smaller than Polymarket’s, reflecting Kalshi’s more recent API availability and its narrower (U.S.-only) user base. However, several useful tools exist.
Community SDK Wrappers
| Project | Language | Description | Status |
|---|---|---|---|
| kalshi-python (official) | Python | Full REST API wrapper with auth handling | Active |
| kalshi-go | Go | Community Go wrapper for REST API | Active |
| kalshi-ts | TypeScript | Community TypeScript/Node.js wrapper | Active |
| kalshi-rust | Rust | Community Rust client for REST + WebSocket | Early stage |
kalshi-go
A Go-based wrapper popular with developers deploying Kalshi bots as compiled binaries for performance.
package main
import (
"fmt"
"github.com/community/kalshi-go"
)
func main() {
client := kalshi.NewClient(
"your_api_key_id",
"kalshi_private_key.pem",
)
markets, err := client.GetMarkets(kalshi.MarketFilter{
Status: "open",
Limit: 20,
})
if err != nil {
panic(err)
}
for _, m := range markets {
fmt.Printf("%s: %s (Vol: %d)\n", m.Ticker, m.Title, m.Volume)
}
}
Open-Source Bot Projects
| Project | Description | Language | Focus |
|---|---|---|---|
| Kalshi News Bot | Claude-powered bot that detects mispriced Kalshi markets and trades automatically | Python | AI-driven edge detection, one-click Railway deploy |
| kalshi-market-maker | Simple market-making bot for Kalshi | Python | Spread capture, inventory management |
| kalshi-scanner | Scans Kalshi markets for mispriced contracts | Python | Value detection |
| kalshi-arb | Cross-platform arbitrage between Kalshi and Polymarket | Python | Arb detection and (optional) execution |
| kalshi-portfolio-tracker | Portfolio analytics and P&L tracking | Python | Monitoring, not trading |
These projects vary in maturity and maintenance. Always review the code and test in the demo environment before connecting to production.
Commercial Agents and Platforms
The commercial ecosystem for Kalshi automation is nascent compared to Polymarket’s, partly because Kalshi’s U.S.-only restriction limits the developer pool.
PredictEngine (Kalshi Integration)
PredictEngine is the only major commercial platform with native Kalshi support alongside Polymarket.
| Attribute | Detail |
|---|---|
| Kalshi features | Order placement, portfolio tracking, cross-platform arbitrage detection |
| Pricing | $149/mo (Pro) or $299/mo (Enterprise) for Kalshi access |
| Type | Hosted SaaS |
What it offers for Kalshi:
- Unified dashboard showing Kalshi and Polymarket positions side by side
- Cross-platform arbitrage alerts when the same event is priced differently on Kalshi and Polymarket
- Template strategies adapted for Kalshi’s cent-based pricing model
- Portfolio rebalancing across both platforms
Limitations: Kalshi integration is newer and less feature-rich than PredictEngine’s Polymarket support. Some advanced Polymarket features (batch orders, specific strategy templates) are not yet available for Kalshi.
Custom Development Services
Several development shops and freelancers offer custom Kalshi bot development. Before engaging one, review our Buyer’s Guide for evaluation criteria and our Marketplace for vetted agents.
Data Tools and Analytics
Kalshi Market Data
Kalshi provides market data through its API, but the ecosystem of third-party analytics is thinner than Polymarket’s.
Available through the Kalshi API:
| Data Type | Endpoint | Auth Required | Notes |
|---|---|---|---|
| Market listings | /markets | No | All active and settled markets |
| Orderbook snapshots | /markets/{ticker}/orderbook | No | Current bids and asks |
| Trade history | /markets/{ticker}/trades | No | Recent trades for a market |
| Your positions | /portfolio/positions | Yes | Current holdings |
| Settlement history | /portfolio/settlements | Yes | Historical resolution data |
| Candlestick data | /markets/{ticker}/candlesticks | No | OHLC price data at various intervals |
# Fetch candlestick data for a Kalshi market
response = requests.get(
f"{BASE_URL}/markets/ECON-GDP-Q1-2026/candlesticks",
headers=headers,
params={
"period_interval": 60, # 1-hour candles (in minutes)
}
)
candles = response.json()["candlesticks"]
for candle in candles[-5:]: # Last 5 candles
print(f"Time: {candle['end_period_ts']}")
print(f" Open: {candle['open']}c Close: {candle['close']}c")
print(f" High: {candle['high']}c Low: {candle['low']}c")
print(f" Volume: {candle['volume']} contracts")
Historical Data and Backtesting
Kalshi does not offer a public bulk historical data download. Options for building a historical dataset:
- API polling: Capture data over time by polling the candlestick and trade endpoints. Store locally in a database.
- Third-party aggregators: Some prediction market data aggregators (Metaculus API, prediction market research databases) include Kalshi data.
- Custom scraping: Build a data collection pipeline that captures orderbook snapshots and trade prints via the WebSocket API.
import sqlite3
import time
# Simple data collector for Kalshi market snapshots
db = sqlite3.connect("kalshi_data.db")
db.execute("""
CREATE TABLE IF NOT EXISTS snapshots (
timestamp INTEGER,
ticker TEXT,
yes_bid INTEGER,
yes_ask INTEGER,
volume INTEGER
)
""")
def collect_snapshot(ticker):
response = requests.get(
f"{BASE_URL}/markets/{ticker}",
headers=headers
)
market = response.json()["market"]
db.execute(
"INSERT INTO snapshots VALUES (?, ?, ?, ?, ?)",
(int(time.time()), ticker, market["yes_bid"],
market["yes_ask"], market["volume"])
)
db.commit()
# Run every 5 minutes via cron or scheduler
collect_snapshot("ECON-GDP-Q1-2026")
Analytics Platforms
| Tool | Coverage | Notes |
|---|---|---|
| Kalshi.com native charts | All Kalshi markets | Built into the Kalshi web interface, not API-accessible |
| PredictEngine dashboards | Kalshi + Polymarket | Requires PredictEngine subscription |
| Custom Dune/SQL | On-chain Polymarket only | Kalshi is off-chain — no Dune equivalent |
| Kalshi portfolio tracker | Open-source, your account only | Community project for P&L tracking |
Note the key difference from Polymarket: because Kalshi is a centralized, off-chain exchange, there is no blockchain data to query. All analytics must come through the Kalshi API or through your own data collection.
Regulatory Considerations
Kalshi’s regulated status creates unique constraints and opportunities for bot builders. Ignoring these can result in account termination or legal issues.
KYC Requirements
Every Kalshi account requires full Know Your Customer (KYC) verification:
- Required information: Full legal name, date of birth, Social Security Number, U.S. residential address, government-issued photo ID.
- Verification timeline: Typically 1-3 business days for new accounts.
- Bot accounts: Each bot needs its own verified account, or the bot operates under your personal account. There is no separate “bot account” type.
- Multiple accounts: Kalshi prohibits multiple accounts per individual. If you run multiple bots, they must all operate under your single verified account using separate API keys.
CFTC Oversight
As a CFTC-regulated DCM, Kalshi must comply with federal commodity trading regulations:
- Market manipulation prohibition. Wash trading, spoofing, and other manipulative practices are illegal under the Commodity Exchange Act. Bots must be designed to avoid these patterns.
- Position limits. Some Kalshi markets have position limits. Your bot must respect these limits or orders will be rejected.
- Reporting requirements. Large traders may be subject to CFTC reporting requirements.
- Market categories. Kalshi can only offer markets in CFTC-approved categories. Some event types available on Polymarket (like certain political markets) may not exist on Kalshi.
U.S.-Only Restriction
Kalshi is restricted to U.S. residents. This means:
- VPN usage to access Kalshi from outside the U.S. violates the terms of service.
- Cloud-hosted bots must be deployed on U.S.-based infrastructure (or at minimum, your account must be verified as U.S.-based).
- International developers who want to build Kalshi tools can use the demo environment for development and testing, but cannot trade on production.
Tax Implications
Kalshi issues 1099 tax forms for U.S. users. Bot-generated trading activity is taxable:
- Profits from event contracts are generally taxed as ordinary income.
- Kalshi provides settlement data that simplifies tax reporting.
- High-frequency bot trading can generate hundreds or thousands of taxable events per year — consult a tax professional.
For a broader treatment of legal considerations, see the Legal Guide to Selling AI Agents.
Integration Patterns
Kalshi + Coinbase Wallets
While Kalshi uses fiat settlement (not crypto), Coinbase Agentic Wallets are still relevant for agents that operate across both Kalshi and Polymarket.
A cross-platform agent might use:
- Coinbase Agentic Wallet for Polymarket (USDC on Polygon)
- Traditional bank account for Kalshi (USD via ACH)
- Shared intelligence layer that analyzes both platforms and routes trades to whichever offers better pricing
class CrossPlatformAgent:
def __init__(self, kalshi_client, polymarket_client):
self.kalshi = kalshi_client
self.polymarket = polymarket_client
def find_arbitrage(self, event_query):
"""Find the same event on both platforms and compare prices."""
# Search both platforms
kalshi_markets = self.kalshi.search_markets(event_query)
poly_markets = self.polymarket.search_markets(event_query)
# Match events across platforms (simplified)
for km in kalshi_markets:
for pm in poly_markets:
if self.events_match(km, pm):
kalshi_yes = km["yes_ask"] / 100 # Convert cents to decimal
poly_yes = pm["best_ask"]
spread = abs(kalshi_yes - poly_yes)
if spread > 0.05: # 5% spread threshold
print(f"Arb opportunity: {km['title']}")
print(f" Kalshi YES: {kalshi_yes:.2f}")
print(f" Polymarket YES: {poly_yes:.2f}")
print(f" Spread: {spread:.2f}")
For a full cross-platform setup, see the Cross-Market Arbitrage Guide and the Agent Betting Stack.
Kalshi + Agent Frameworks
Integrating Kalshi into LLM-based agent frameworks follows the same pattern as Polymarket but with Kalshi’s authentication model.
from langchain.agents import Tool
# Define Kalshi tools for a LangChain agent
kalshi_tools = [
Tool(
name="kalshi_search_markets",
description="Search Kalshi for event contract markets matching a query",
func=lambda q: kalshi_client.search_markets(q)
),
Tool(
name="kalshi_get_price",
description="Get the current YES/NO prices for a Kalshi market ticker",
func=lambda ticker: kalshi_client.get_market(ticker)
),
Tool(
name="kalshi_place_order",
description="Place a limit order on Kalshi. Args: ticker, side (yes/no), price (cents), count",
func=lambda args: kalshi_client.create_order(**args)
),
Tool(
name="kalshi_get_positions",
description="Get all current Kalshi positions and P&L",
func=lambda _: kalshi_client.get_positions()
),
]
Kalshi + Moltbook Identity
For agents that need portable reputation across platforms, Moltbook identity provides a verification layer. A Kalshi agent can:
- Register on Moltbook to establish agent identity.
- Publish its Kalshi trading performance to build verifiable reputation.
- Use Moltbook identity tokens when interacting with data providers, other agents, or the Agent Marketplace.
Comparing Kalshi Automation to Polymarket
If you are deciding which platform to build for, or considering cross-platform strategies, this comparison helps clarify the tradeoffs.
Side-by-Side Comparison
| Dimension | Kalshi | Polymarket |
|---|---|---|
| Regulation | CFTC-regulated DCM | Unregulated (crypto-native) |
| Settlement | Fiat USD (bank account) | USDC on Polygon (crypto wallet) |
| Authentication | RSA-PSS signatures | EIP-712 wallet signatures |
| Price format | Cents as integers (65 = $0.65) | Decimals (0.65) |
| Trading fees | 0% (as of 2026) | ~1-2% (maker/taker) |
| Demo environment | Full sandbox (demo-api.kalshi.co) | None |
| Geographic access | U.S. only | Global (except U.S. for some features) |
| Total markets | Hundreds (CFTC-approved categories) | Thousands (open creation) |
| Daily volume | Lower | Higher (largest by volume) |
| Open-source ecosystem | Smaller | Much larger |
| FIX protocol | Supported | Not supported |
| On-chain data | None (centralized) | Full (Polygon blockchain) |
Which Platform for Which Strategy?
| Strategy | Better Platform | Reason |
|---|---|---|
| Market-making | Kalshi | Zero fees, FIX protocol, simpler orderbook |
| Cross-platform arb | Both | Need accounts on both to exploit spreads |
| Sentiment-based trading | Polymarket | More markets, more volume, more data sources |
| Institutional/compliance | Kalshi | CFTC regulation, fiat settlement, familiar infra |
| High-frequency trading | Kalshi | FIX 4.4 support, lower latency |
| Copy-trading | Polymarket | On-chain transparency lets you track wallets |
| LLM agent experiments | Polymarket | Larger ecosystem of tools and frameworks |
| Safe testing/development | Kalshi | Official demo sandbox with fake money |
For a deeper comparison, see the Unified API Comparison.
How to Get Started Building a Kalshi Agent
This section provides a concrete path from zero to a working Kalshi agent. Follow these steps in order.
Step 1: Set Up Your Kalshi Account
- Create a Kalshi account at kalshi.com (U.S. residents only).
- Complete KYC verification (1-3 business days).
- Generate API keys in your account settings. Download the private key PEM file.
- Also create a demo account at demo.kalshi.co and generate separate demo API keys.
Step 2: Install the SDK and Test in Demo
pip install kalshi-python requests
from kalshi_python import ApiInstance
# ALWAYS start with the demo environment
demo_api = ApiInstance(
host="https://demo-api.kalshi.co/trade-api/v2",
key_id="your_demo_api_key",
private_key_path="demo_private_key.pem"
)
# Verify connectivity
balance = demo_api.get_balance()
print(f"Demo balance: ${balance.balance / 100:.2f}")
# Browse markets
markets = demo_api.get_markets(status="open", limit=10)
for m in markets.markets:
print(f"{m.ticker}: {m.title}")
Step 3: Build a Simple Strategy
Start with the simplest possible strategy to validate your infrastructure before adding complexity.
class ThresholdStrategy:
"""Buy YES when price drops below a threshold, sell when it rises above."""
def __init__(self, api, ticker, buy_threshold=30, sell_threshold=70, size=5):
self.api = api
self.ticker = ticker
self.buy_threshold = buy_threshold # Buy YES below this price (cents)
self.sell_threshold = sell_threshold # Sell YES above this price (cents)
self.size = size # Number of contracts per order
def evaluate(self):
market = self.api.get_market(self.ticker)
yes_ask = market.market.yes_ask
yes_bid = market.market.yes_bid
if yes_ask and yes_ask <= self.buy_threshold:
print(f"BUY signal: {self.ticker} YES @ {yes_ask}c")
return self.api.create_order({
"ticker": self.ticker,
"action": "buy",
"side": "yes",
"type": "limit",
"yes_price": yes_ask,
"count": self.size,
})
elif yes_bid and yes_bid >= self.sell_threshold:
print(f"SELL signal: {self.ticker} YES @ {yes_bid}c")
return self.api.create_order({
"ticker": self.ticker,
"action": "sell",
"side": "yes",
"type": "limit",
"yes_price": yes_bid,
"count": self.size,
})
else:
print(f"HOLD: {self.ticker} YES bid={yes_bid}c ask={yes_ask}c")
return None
Step 4: Add Risk Management
Before moving to production, implement risk controls.
class KalshiRiskManager:
def __init__(self, max_position=50, max_daily_orders=100, max_loss_cents=5000):
self.max_position = max_position # Max contracts per market
self.max_daily_orders = max_daily_orders # Max orders per day
self.max_loss_cents = max_loss_cents # Max daily loss in cents
self.daily_orders = 0
self.daily_pnl = 0
def approve_order(self, current_position, order_size, order_price):
# Check position limit
if abs(current_position) + order_size > self.max_position:
raise ValueError(f"Position limit: {current_position} + {order_size} > {self.max_position}")
# Check daily order count
if self.daily_orders >= self.max_daily_orders:
raise ValueError(f"Daily order limit reached: {self.daily_orders}")
# Check daily P&L
if self.daily_pnl < -self.max_loss_cents:
raise ValueError(f"Daily loss limit reached: {self.daily_pnl}c")
self.daily_orders += 1
return True
Step 5: Move to Production
When your strategy is validated in demo:
- Switch the API host from
demo-api.kalshi.cototrading-api.kalshi.com. - Use production API keys (different from demo keys).
- Fund your account via ACH or wire transfer.
- Start with minimal position sizes and gradually increase as you gain confidence.
- Monitor closely for the first 24-48 hours.
import os
# Environment-based configuration for demo vs. production
ENV = os.environ.get("KALSHI_ENV", "demo")
if ENV == "production":
HOST = "https://trading-api.kalshi.com/trade-api/v2"
KEY_ID = os.environ["KALSHI_PROD_KEY_ID"]
KEY_PATH = os.environ["KALSHI_PROD_KEY_PATH"]
else:
HOST = "https://demo-api.kalshi.co/trade-api/v2"
KEY_ID = os.environ["KALSHI_DEMO_KEY_ID"]
KEY_PATH = os.environ["KALSHI_DEMO_KEY_PATH"]
api = ApiInstance(host=HOST, key_id=KEY_ID, private_key_path=KEY_PATH)
Complete Ecosystem Summary Table
| Category | Tool | Type | Language | License | Status |
|---|---|---|---|---|---|
| Official | Kalshi REST API v2 | REST API | Any | N/A | Active |
| Official | Kalshi WebSocket | WebSocket | Any | N/A | Active |
| Official | Kalshi FIX 4.4 | FIX protocol | Any | N/A | Active (institutional) |
| Official | Kalshi Demo Environment | Sandbox | Any | N/A | Active |
| SDK | kalshi-python (official) | Python SDK | Python | MIT | Active |
| SDK | kalshi-go | Go wrapper | Go | MIT | Community |
| SDK | kalshi-ts | TypeScript wrapper | TypeScript | MIT | Community |
| SDK | kalshi-rust | Rust client | Rust | MIT | Early stage |
| Open Source | kalshi-market-maker | Bot | Python | MIT | Community |
| Open Source | kalshi-scanner | Scanner | Python | MIT | Community |
| Open Source | kalshi-arb | Arb tool | Python | MIT | Community |
| Open Source | kalshi-portfolio-tracker | Analytics | Python | MIT | Community |
| Commercial | PredictEngine (Kalshi) | Hosted SaaS | N/A | Proprietary | Active |
| Data | Kalshi API (market data) | REST API | Any | N/A | Active |
| Data | Kalshi candlesticks | REST API | Any | N/A | Active |
What’s Next
The Kalshi automation ecosystem is still early. With zero trading fees, a full demo sandbox, and increasing market coverage, expect more tools and agents to emerge throughout 2026 — particularly as cross-platform strategies between Kalshi and Polymarket become more sophisticated.
To go deeper:
- Learn the API in detail: Follow the Kalshi API Guide for a complete tutorial with advanced patterns.
- Compare with Polymarket: See the Polymarket Bot Ecosystem Map for the other major prediction market ecosystem.
- Understand the full stack: Read The Agent Betting Stack for the complete architecture of autonomous prediction market agents.
- Find cross-platform opportunities: See the Cross-Market Arbitrage Guide for strategies that span both platforms.
- Browse agents: Visit the Agent Marketplace for pre-built agents, including some with Kalshi support.
- Buy a Kalshi agent: Read the Buyer’s Guide for what to evaluate before purchasing.
- Check API compatibility: The Prediction Market API Reference covers both Kalshi and Polymarket endpoints side by side.