Kalshi Demo Environment: Test Your Bot Before Real Money
Guides

Kalshi Demo Environment: Test Your Bot Before Real Money

· EdgeOutcome Team· kalshi, api, demo
Last updated

The Kalshi demo environment is a full copy of the exchange running on mock funds, reachable at demo.kalshi.co, with API hosts of its own and credentials that are never shared with your production account. Your order placement code does not need a rewrite: the paths are identical, only the hostname changes from external-api.kalshi.com to external-api.demo.kalshi.co.

That is the pitch. The useful part is knowing what demo does and does not reproduce, because the gap between the two is where bots get burned. Everything below was checked live on November 9, 2026 against the demo hosts, the API environments documentation and the demo account help article.

Key Takeaway: Demo is a parallel exchange, not a mode flag. Separate hosts, separate API keys, mock funds. The paths and the signature are identical to production, so demo is the right place to prove that a bot can sign, place, amend, cancel and settle. It is the wrong place to measure fills, slippage or throughput, because most mirrored markets carry zero volume.

The demo endpoints

Kalshi now recommends dedicated external-api hosts for API traders, in both environments. The older shared hosts still answer, which matters if you have clients hardcoded from 2025.

SurfaceRecommended demo hostStill supported
REST Trade APIhttps://external-api.demo.kalshi.co/trade-api/v2https://demo-api.kalshi.co/trade-api/v2
WebSocket APIwss://external-api-ws.demo.kalshi.co/trade-api/ws/v2wss://demo-api.kalshi.co/trade-api/ws/v2
Fill and order updateswss://user-ws.demo.kalshi.co/trade-api/ws/v2wss://warp-ws.demo.kalshi.co/trade-api/ws/v2 (deprecated November 12, 2026)
Perps (margin) RESThttps://external-api.demo.kalshi.co/trade-api/v2/margin/—
Perps WebSocketwss://external-api-margin-ws.demo.kalshi.co/trade-api/ws/v2/marginwss://margin-warp-ws.demo.kalshi.co/trade-api/ws/v2/margin (deprecated, now margin-user-ws)
Perps FIXmargin-fix.demo.kalshi.co ports 8228 / 8229 / 8230 / 8233—

Both REST hosts returned HTTP 200 for GET /exchange/status and for a live market list when we called them today, and the margin namespace answered as well (/trade-api/v2/margin/exchange/status returned 200). Kalshi’s changelog entry of November 12, 2026 moved the low-latency fill stream to the user-ws hosts and deprecated warp-ws (it still works for now; see our API changelog tracker). The user-ws demo host serves only fill and user_orders; subscribing to anything else there returns error code 8, exactly as in production, so keep your other channel subscriptions on the main WebSocket host described in the WebSocket guide.

The signature does not change per host. You sign the full path from the API root with the query string removed, so /trade-api/v2/portfolio/orders is the same string in demo and production. Broken signing fails identically in both, which is the point of testing there. The API key guide covers the four failure modes we reproduced.

Credentials are not shared, and that causes avoidable errors

Demo accounts are separate accounts. Same email, different credentials, different API keys, nothing merged. Two consequences:

  • A production key sent to a demo host fails with HTTP 401. We reproduced this on October 12, 2026 and Kalshi answered with NOT_FOUND in the error details, which is the response for an unknown key ID. An unauthenticated call to GET /portfolio/balance on the demo host today returned the same 401 shape with token_authentication_failure.
  • A demo key sent to production fails the same way. If your bot silently falls back to a production base URL from an environment variable, you will see authentication errors rather than the demo data you expected.

Log into demo.kalshi.co, create the key in that account, and store it under a different variable name than the production key. Kalshi’s own docs are explicit that demo keys only work against demo endpoints. The help centre also confirms that nothing you do in demo touches your production account.

Funding a demo account

Demo accounts start empty. There is no free starting balance, and Kalshi publishes test routes instead:

  • Test debit card (recommended). Visa Debit 4000 0566 5566 5556 or Mastercard Debit 5200 8282 8282 8210, any future expiry date, any three digit CVV.
  • Google Pay. If a test card is saved to your wallet, Google Pay passes it through as a debit card payment.
  • Bank account via Plaid sandbox. Username user_good, password pass_good, phone 415-555-0010, OTP 123456, then pick any account in the list. Mock funds appear once the simulated ACH transfer settles.
  • Test USDC on Solana Devnet. Start a crypto deposit in your demo account, select USDC on Solana, copy the address, then request tokens at faucet.circle.com with Solana Devnet selected. One test USDC credits as one dollar.

The warning that matters: demo crypto deposits are on test networks. Any real USDC you send to a demo deposit address is gone, because the address never existed on a live chain.

What the demo market universe actually contains

This is the part that decides whether demo is useful for your strategy. We pulled the open market list from the demo host and compared it against production.

ObservationDemo, November 9, 2026
First page of open markets (limit=1000)1,000 returns with a cursor, so the universe is larger than one page
Markets on that page with open interest above zero213
Demo-only series presentKXDEMOFUTHOURLY, “Demo hourly event contract futures”, category Test, settles from Coinbase BTC-USD candles
Exchange shards4, described as Default, Demo shard 1, Demo shard 2, and one unnamed shard

The important find is what happens to real tickers. A production market we checked, KXNCAAFGAME-26NOV11SACCMU-CMU, exists in demo under exactly the same ticker, but the numbers are empty:

FieldProductionDemo
Last price0.90000.0000
Open interest1,852.380.00
Volume2,361.740.00

Same instrument, no book. Demo mirrors the market universe so your filters, parsers and ticker logic meet real data shapes, but it does not mirror the liquidity behind them, and Kalshi says so plainly in its own docs. Plan around that rather than being surprised by it.

What demo cannot test for you

Demo is a correctness sandbox, not a performance lab. Four things you should not conclude from it:

  • Fills and queue position. With zero open interest on most mirrored markets your order rests alone, so fills and partial fills behave nothing like the real book described in the order book data guide.
  • Throughput and tiers. The token bucket model applies in both environments, but we could not verify inside demo whether volume-based tier grants behave the same, since demo volume is not real. Test rate limit handling at low tier and read the numbers for your code from GET /account/limits, as covered in the rate limits guide.
  • Settlement realism. Demo markets do settle, so your settlement and P&L code gets exercised, but the prices it settles against are demo prices.
  • Production-only plumbing. PrivateLink for production REST and WebSocket is provisioned per member on the Premier tier and above. It has no demo equivalent, so network isolation paths cannot be rehearsed here.

One more divide: if you want to test a strategy against history rather than an empty order book, use the historical candlestick approach. Demo tests your plumbing, backtests test your edge.

Pointing an existing client at demo

The change is one base URL. Keep the signing path exactly as it is:

import os, requests

DEMO = os.environ["KALSHI_ENV"] == "demo"
BASE = ("https://external-api.demo.kalshi.co" if DEMO else "https://external-api.kalshi.com") + "/trade-api/v2"

# Signing is host-independent: always the path from the API root, query stripped.
path = "/trade-api/v2/markets?limit=5&status=open"
# signature = sign(timestamp + "GET" + "/trade-api/v2/markets")   # query removed

r = requests.get(BASE + "/markets", params={"limit": 5, "status": "open"},
                 headers=sign_headers(), timeout=10)
print(r.status_code, r.json()["markets"][0]["ticker"])

Two habits make the switch safe. Read the base URL from a single place and print it at startup, so a run that hits a 401 is obviously pointed at the wrong environment. And keep the demo key and the production key under different variable names, because “the key is right but the host is wrong” is by far the most common demo setup error we see.

Expert insight: The teams that get real value from demo use it for one narrow job: proving that the full lifecycle works end to end, from signature to settlement, on a throwaway account. They never use it to judge whether a strategy makes money. A bot that passes demo and fails live is almost never a strategy problem, it is a fills and slippage problem that demo was never built to expose.

Getting value from demo without fooling yourself

Use demo for the boring checks that cost real money when they fail: does my key sign on the right host, do my cancels land, does my websocket survive a reconnect, does my settlement handler credit the right position. Then move the strategy question to historical data, and only then to live size.

If you would rather not build the plumbing yourself, the Kalshi bot kit handles signing, environment switching and rate limit backoff, and the free cheat sheet plus the payout calculator cover the fee and payout maths. When you are ready for a real account, open a Kalshi account and keep demo as your staging ground.

EdgeOutcome may earn a commission if you open a Kalshi account through the link above. It does not change what you pay.

18+. Prediction markets involve real financial risk. Availability depends on your country and US state.

Frequently Asked Questions

What is the Kalshi demo environment?

It is a full copy of the Kalshi exchange running on mock funds at demo.kalshi.co. The REST and WebSocket APIs have their own demo hosts, for example https://external-api.demo.kalshi.co/trade-api/v2 for REST and wss://external-api-ws.demo.kalshi.co/trade-api/ws/v2 for WebSocket. Credentials are not shared with production, so a demo API key only works against demo hosts. Verified on November 9, 2026.

Does the Kalshi demo environment use the same API endpoints as production?

Yes, the paths are identical and only the host changes. Request signing is also identical: you still sign the path from the API root, for example /trade-api/v2/portfolio/orders, with query parameters stripped. The demo hosts are https://external-api.demo.kalshi.co/trade-api/v2 and, as a legacy alias, https://demo-api.kalshi.co/trade-api/v2. Both returned HTTP 200 for public market data on November 9, 2026.

Can I use my production Kalshi API key in the demo environment?

No. Kalshi does not share credentials between the two environments, and the demo host rejects a production key. We sent a working production key to the demo host on October 12, 2026 and received HTTP 401 with NOT_FOUND, which is what Kalshi returns for an unknown key ID. Create a separate key while logged into the demo account.

How do I add money to a Kalshi demo account?

Demo accounts do not start with funds. The help centre lists three test routes: a test debit card (Visa Debit 4000 0566 5566 5556 or Mastercard Debit 5200 8282 8282 8210, any future expiry, any three digit CVV), the Plaid sandbox (username user_good, password pass_good, phone 415-555-0010, OTP 123456), and test USDC on Solana Devnet from faucet.circle.com. Test networks only, never send real funds to a demo address.

Can the Kalshi demo environment be used to test a trading bot?

Yes for correctness, no for performance. The demo mirrors production market tickers, but most of them carry zero open interest and zero volume, and Kalshi warns that demo prices and behaviour may not reflect real markets. Use demo to prove that signing, order placement, cancels, websocket subscriptions and settlement handling work. Do not draw conclusions about fills, queue position or slippage from demo.

EdgeOutcome
EdgeOutcome Team

Data-driven prediction market analysis. EdgeOutcome helps traders find real edges on Kalshi and Polymarket — not hype, just numbers. More about us →