Home โ€บ Guides

How to create a Kalshi API key for a trading bot

A Kalshi API key lets software place trades on your account. It cannot withdraw. Here is how to make one, what to allow, and how to shut it off.

What the key can and cannot do

An API key can read your balance and positions and place or cancel orders. It cannot withdraw funds or move money out of Kalshi. Kalshi does not offer that permission to keys at all. You can delete a key on Kalshi's side at any moment, and any software using it goes blind instantly.

Creating the key

  1. Log in to Kalshi on the web and open Settings โ†’ API (under your profile menu).
  2. Click Create key. Give it a name you will recognise, for example DirectionalBot.
  3. Choose the access level. A trading bot needs trade permissions. DirectionalBot asks for full access; it still cannot withdraw.
  4. Kalshi shows you a key ID and a private key (a long block of text starting with -----BEGIN). The private key is shown once. Copy both.
  5. Paste the key ID and the private key into the bot when it asks. On a phone, the easiest way is to send the downloaded key file to the bot as a file; it reads it and deletes the message straight away. DirectionalBot encrypts the key at rest and never displays it again.
Two minutes, start to finish. The step people get stuck on is copying the private key in full, including the BEGIN and END lines. If the bot says the key is invalid, that is almost always it.

Keeping it safe

Revoking access

Settings โ†’ API โ†’ the key โ†’ Delete. That is the whole off switch. The bot will report failed orders until you paste a new key, and nothing else happens.

Want to see it run instead of reading about it?
Free 1-hour trial, no card. Paper mode if you'd rather watch first.

Open the bot on Telegram โ†’

More guides

Kalshi's 15-minute crypto markets, explained โ†’Paper trading on Kalshi before you go live โ†’