Skip to content

Run a Kalshi bot

The repository's Kalshi runner publishes signed signals. HiveTrade places the Captain order through the operator's connected Kalshi account, and launches eligible Member orders in the same wave. The runner never places a second Kalshi order or reports a local fill.

Before you start

You need repository access, Node.js 24+, pnpm 10.33.2, and an eligible, funded Kalshi account. Funding and withdrawals happen in Kalshi. There is no Polygon wallet, token wrapping, relayer, gas, or Kalshi demo mode in this path.

  1. Generate a platform signing key.
  2. Sign in at Create a bot Hive, choose Kalshi, and register only the public address. Save the Hive ID.
  3. In HiveTrade Settings, connect the operator's trade-only Kalshi credential and complete the required execution consent. HiveTrade stores this venue credential encrypted; it is separate from the platform signing key.
  4. Check the Hive's stake cap, allocation/consent state, and trading pauses.

Configure the runner

Install with pnpm install --frozen-lockfile from the repository root. Start from apps/bot/.env.kalshi.example, with these service values:

dotenv
VENUE=kalshi
BOT_NAME=btcStreak
BOT_PRIVATE_KEY=<your-platform-signing-key>
BOT_INDEX=0
BOT_HIVE_ID=<your-hive-id>
BOT_API_URL=https://api.hivetrade.com
BOT_LIVE_TRADING_ENABLED=false
BOT_SIGNAL_STRENGTH=25
BOT_MIN_ENTRY_PRICE_CENTS=46
BOT_MAX_ENTRY_PRICE_CENTS=52
BOT_TICK_MS=30000

Use the dev API only with a dev Hive. BOT_NAME supports btcStreak and btc5mEdge; both operate on verified BTC/ETH/SOL 15-minute directional markets. The Captain order is one whole contract. Signal strength accepts 10, 25, 50, or 100. It does not change that Captain contract count.

Do not put KALSHI_API_KEY_ID, KALSHI_PRIVATE_KEY, or a Kalshi API base in the runner. Its only secret is the platform signer; the API uses the connected operator credential for venue execution.

For Railway, use the repository root, build pnpm install, start pnpm --filter @hivetrade/bot start, healthcheck /health, and an empty pre-deploy command. See hosting configuration.

Verify, then enable

Check /health, the selected venue, signing address, Hive ID, and strategy logs with live trading disabled. A healthy process can skip for many windows because no signal meets its entry rules. Health alone does not prove trading works.

When you intend to place real orders, set BOT_LIVE_TRADING_ENABLED=true and redeploy. Check the venue order/fill and the matching Hive Call. The signed kalshi-v2 intent includes execution: "hivetrade-v1"; the API returns the execution outcome. An ambiguous order remains submitted for reconciliation; do not send another order to compensate for an unknown result.

At resolution Kalshi credits cash automatically. HiveTrade reconciles its records; there is no on-chain redemption step.

HiveTrade — signal-sharing technology for Polymarket and Kalshi. Not a trading platform, exchange, broker, or custodian.