Skip to main content

kalshiwatch

Get pinged the second a Kalshi market moves.

Polymarket-side preview (live, no install): https://creampig666.github.io/prediction-markets-live/

Tiny Python CLI that polls Kalshi's public market API, watches the tickers you care about, and fires alerts to your console / Telegram / Discord the moment a market's implied probability crosses a threshold you set.

No keys, no auth, no signup. Just a YAML file and a wallet for tips.

[kalshiwatch] Elon to Mars in lifetime [UP] 0.080 -> 0.095 (+18.75%)
[kalshiwatch] Mamdani president by 45  [DN] 0.098 -> 0.080 (-18.37%)

Family of tools (same author, same wallet, same UX):


Why

Kalshi is the regulated US-side counterpart to Polymarket. The trading day moves fast — political markets in particular can pop 5-15% within a few minutes after news drops, and the only "alerts" Kalshi gives you are weak email digests. This is one Python file's worth of logic that runs anywhere, MIT, and pings you on whatever channel you're already using.

Built to use alongside polywatch for cross-venue divergence trading.

Install

pip install git+https://github.com/creampig666/kalshiwatch.git

Or clone:

git clone https://github.com/creampig666/kalshiwatch.git
cd kalshiwatch && pip install -e .

60-second start

kalshiwatch init           # writes config.yaml
$EDITOR config.yaml        # change the tickers to ones you care about
kalshiwatch test-alert     # verify your Telegram / Discord wiring
kalshiwatch run            # go

Sample config.yaml:

poll_interval_sec: 30

markets:
  - ticker: KXELONMARS-99
    name: Elon to Mars in lifetime
    threshold_pct: 5       # alert when price moves >= 5% from last poll
    direction: any         # up | down | any

  - ticker: KXPERSONPRESMAM-45
    name: Mamdani president by 45
    threshold_pct: 3
    direction: up          # only on upward crossings

alerts:
  console: true
  # telegram:
  #   bot_token: ${TELEGRAM_BOT_TOKEN}   # env vars supported
  #   chat_id: ${TELEGRAM_CHAT_ID}
  # discord:
  #   webhook: https://discord.com/api/webhooks/.../...

The ticker is the Kalshi market identifier shown on each market page (e.g. KXELONMARS-99, KXNEWPOPE-70-PPAR). You can find it in the Kalshi URL or in the page metadata.

How it works

  1. Every poll_interval_sec seconds, fetch each configured market from api.elections.kalshi.com.
  2. Compare each market's last_price_dollars (0.0 – 1.0, the implied probability) to the price seen last tick.
  3. If the change ≥ threshold (and direction matches), build an AlertEvent and dispatch to every enabled channel.
  4. Failed channels log the error and don't break the loop.

State is in-memory — restart resets the comparison baseline, no DB.

Kalshi vs Polymarket

If you trade both, you probably want both polywatch and kalshiwatch running side by side — same alert channels, same UX. Divergence between a Polymarket "Yes" price and a Kalshi "Yes" price on the same underlying event is one of the simplest live arb signals.

Run as a service

systemd (Linux):

[Unit]
Description=kalshiwatch
After=network.target

[Service]
Type=simple
WorkingDirectory=/home/you/kalshiwatch
ExecStart=/usr/bin/kalshiwatch run -c /home/you/kalshiwatch/config.yaml
Restart=on-failure
Environment=TELEGRAM_BOT_TOKEN=xxx
Environment=TELEGRAM_CHAT_ID=yyy

[Install]
WantedBy=multi-user.target

cron mode (one-shot):

* * * * * /usr/bin/kalshiwatch run --once -c /home/you/kalshiwatch/config.yaml

Roadmap (PRs welcome)

  • Bid/ask alerts once an auth mode is added (orderbook-aware)
  • Cross-venue divergence alerts (Polymarket vs Kalshi on matched underlyings)
  • State persistence so restarts don't reset baselines
  • Per-rule cooldown to avoid noisy markets

If any of these would change your workflow, open an issue.

Tip jar

This is free and stays free. If kalshiwatch saved you a bad fill or a refresh tic, tips are welcome:

0x17Fb06dE9D5945eaFf6FBBf4c264E505D38182A4   # EVM (ETH / USDC / any EVM L2)

License

MIT. See LICENSE.

Release files for kalshiwatch 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kalshiwatch 0.1.0
File Size Uploaded
kalshiwatch-0.1.0.tar.gz 14.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kalshiwatch 0.1.0
File Interpreter ABI Platform
kalshiwatch-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 26.8 kB

Release files / kalshiwatch-0.1.0.tar.gz

Download URL kalshiwatch-0.1.0.tar.gz
Size 14.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e02d735a610d470800e21b6a2a0122a68eed1bba1be34139e0ffb69480422311
BLAKE2b-256 checksum
How to use checksums
e24e5efa068a3d10ac3ef9233c7d3d9ddadc3851c7b6722eaf148f3e456bdb2c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / kalshiwatch-0.1.0-py3-none-any.whl

Download URL kalshiwatch-0.1.0-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f030bafc9b72d24d0d53036bf7595d2d342f3061c2ffa77e78a666309e7210c
BLAKE2b-256 checksum
How to use checksums
002adac411e24ebc4b29757ae1bbb737f83e0d4f353bc0f5137fd58d7453400e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page