Sponsor this directory: one slot per week. Details
Get the weekly digest

How to build a Kalshi bot

A practical outline for building a bot on the Kalshi API, with links to the official docs and to public Kalshi bots you can study.

Last updated . Facts below come from the official documentation linked at the end, checked Oct 13, 2026. This is not financial advice; check that the platform is available to you and read its terms.

Steps

  1. Read the API docs. Kalshi publishes REST and WebSocket APIs at docs.kalshi.com.
  2. Start in the demo environment. Kalshi offers a demo environment with mock funds at demo.kalshi.co. Its REST root is https://external-api.demo.kalshi.co/trade-api/v2. Demo and production credentials are separate.
  3. Create an API key. In account settings, create a key pair (Ed25519 by default, or RSA). Save the private key immediately: Kalshi does not store it and it cannot be shown again.
  4. Sign each request. Send KALSHI-ACCESS-KEY, KALSHI-ACCESS-TIMESTAMP (ms) and KALSHI-ACCESS-SIGNATURE. The signature covers timestamp + HTTP method + path, without query parameters.
  5. Read market data, then place small orders. Pull markets and order books, log everything, and test order logic in demo before using real funds.
  6. Study working code. The public examples below show how others structured market makers, arbitrage scanners and forecasting agents.

Public examples to learn from (37 on this site)

See all Kalshi examples → · Glossary

FAQ

Does Kalshi have a test environment?

Yes. Kalshi documents a demo environment with mock funds; its credentials are separate from production.

How are Kalshi API requests authenticated?

Each request is signed with your private key and sent with the key ID, a millisecond timestamp and the signature, per Kalshi’s API key docs.

What language should I use?

Kalshi’s docs show Python and JavaScript samples. Most public Kalshi examples on this site use Python.

Official documentation

Get the weekly digest

New public Kalshi & Polymarket builds, each with a source. No spam.

Form not loading? Subscribe on beehiiv. Handled by beehiiv; see privacy. Unsubscribe any time.