whatisgithub

What is kalshi-trading-bot?

openfi-dao/kalshi-trading-bot — explained in plain English

Analysis updated 2026-05-18

114TypeScriptAudience · developerComplexity · 4/5Setup · moderate

In one sentence

A TypeScript trading bot that uses five AI agents to debate and place bets on Kalshi, a regulated prediction market, with built in risk limits.

Mindmap

mindmap
  root((Kalshi trading bot))
    What it does
      Five AI agents debate
      Weighted trade decision
    Tech stack
      TypeScript
      SQLite
      OpenRouter
    Use cases
      Paper trading
      Live trading with limits
    Audience
      Developers
      Traders

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Automatically analyze Kalshi markets using multiple AI agents before placing a bet

USE CASE 2

Run the bot in paper mode to test strategies without risking real money

USE CASE 3

Size positions using the Kelly criterion with daily loss limits applied

USE CASE 4

Review past trades and agent performance through a command line dashboard

What is it built with?

TypeScriptNode.jsSQLiteOpenRouter

How does it compare?

openfi-dao/kalshi-trading-botmetavault-fi/solana-pumpfun-bundleramanayayatu-tech/alaya
Stars114114113
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderatehardmoderate
Complexity4/54/54/5
Audiencedeveloperdeveloperpm founder

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Needs Node.js 22.5+, a Kalshi account with API credentials, and an OpenRouter account for the AI agents.

License terms are not described in the explanation.

So what is it?

This is a TypeScript bot that trades on Kalshi, a US-regulated prediction market where people bet on the outcomes of real-world events such as election results, economic indicators, or weather. The bot uses five AI agents working in parallel to analyze each available market, debate the outcome, and agree on whether to place a bet and how large it should be. The five agents each play a different role: one produces a baseline probability estimate, one analyzes recent news, one argues the case for a market going up, one argues the case for it going down, and one manages risk and can veto any position. Their outputs are combined using a weighted formula, and if fewer than three agents agree or confidence is too low, no trade is placed. Position sizes are calculated using the Kelly criterion, a well-known mathematical approach to sizing bets based on estimated probability and payoff, with hard daily loss limits applied on top. The bot runs in two modes. Paper mode executes the full analysis and decision pipeline but does not place real trades, which is the recommended starting point. Live mode requires explicitly setting a flag in the configuration file. Every decision is logged to a local SQLite database so trades can be reviewed or debugged later. A command-line dashboard lets the user check current status, agent performance scores, and trade history. Setup requires Node.js 22.5 or newer, a Kalshi account with API credentials, and an OpenRouter account for LLM access. Configuration is done through a single environment file that also sets safety limits like a daily cap on AI API spending. Four trading strategies are included with different approaches: one focused on compounding conservative positions, one that quotes on both sides of a market, one for short-hold directional bets, and one that scores markets by category. The README advises treating LLM outputs as probabilistic rather than reliable predictions and consulting local regulations before trading.

Copy-paste prompts

Prompt 1
Explain how the five AI agents combine their outputs into one trading decision
Prompt 2
Help me configure the daily AI spending cap and loss limits in the environment file
Prompt 3
Walk me through switching this bot from paper mode to live trading safely
Prompt 4
Which of the four included strategies fits a conservative, low risk approach?

Frequently asked questions

What is kalshi-trading-bot?

A TypeScript trading bot that uses five AI agents to debate and place bets on Kalshi, a regulated prediction market, with built in risk limits.

What language is kalshi-trading-bot written in?

Mainly TypeScript. The stack also includes TypeScript, Node.js, SQLite.

What license does kalshi-trading-bot use?

License terms are not described in the explanation.

How hard is kalshi-trading-bot to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is kalshi-trading-bot for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.