Metadata-Version: 2.4
Name: manifold-watch
Version: 0.1.0
Summary: Get pinged the second a Manifold Markets prediction moves. Tiny Python CLI, multi-channel alerts.
Author: creampig666
License: MIT
Project-URL: Homepage, https://github.com/creampig666/manifold-watch
Project-URL: Issues, https://github.com/creampig666/manifold-watch/issues
Keywords: manifold,manifold-markets,prediction-markets,alerts,trading,cli
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click>=8.0
Requires-Dist: httpx>=0.25
Requires-Dist: PyYAML>=6.0
Provides-Extra: dev
Requires-Dist: pytest>=7; extra == "dev"
Dynamic: license-file

# manifold-watch

> Get pinged the second a Manifold Markets prediction moves.

Tiny Python CLI that polls Manifold's public API, watches the BINARY markets 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.

```
[manifold-watch] BTC $65k in June  [UP] 0.890 -> 0.992 (+11.46%)
[manifold-watch] BTC $100k EOM Jun [DN] 0.040 -> 0.014 (-65.00%)
```

> **Family of tools** (same author, same wallet, same UX):
> - 🟢 [**polywatch**](https://github.com/creampig666/polywatch) — Polymarket alert CLI
> - 🟢 [**kalshiwatch**](https://github.com/creampig666/kalshiwatch) — Kalshi alert CLI
> - 🟢 **manifold-watch** — you're here (Manifold Markets)
> - 🟢 [**polywatch-presets**](https://github.com/creampig666/polywatch-presets) — ready-made polywatch configs
> - 🟢 [**prediction-market-mcp**](https://github.com/creampig666/prediction-market-mcp) — MCP server for Claude/LLMs, covering all three venues with cross-venue arb discovery
> - 🟢 [**prediction-markets-live**](https://github.com/creampig666/prediction-markets-live) — read-only dashboard

---

## Why

Manifold Markets is the play-money cousin of Polymarket / Kalshi — fewer dollars at stake, but a much wider catalogue (5k+ active markets at any given time) and weirder long-tail topics that don't show up on the regulated venues. Useful as a "what is the smart money thinking about X?" sensor, and great for cross-venue divergence trading against Polymarket / Kalshi.

This is the same `polywatch` / `kalshiwatch` UX, ported to Manifold's API.

## Install

```bash
pip install git+https://github.com/creampig666/manifold-watch.git
```

Or clone:

```bash
git clone https://github.com/creampig666/manifold-watch.git
cd manifold-watch && pip install -e .
```

## 60-second start

```bash
manifold-watch init           # writes config.yaml
$EDITOR config.yaml           # change the slugs to ones you care about
manifold-watch test-alert     # verify your Telegram / Discord wiring
manifold-watch run            # go
```

Sample `config.yaml`:

```yaml
poll_interval_sec: 60

markets:
  - slug: bitcoin-65k-in-june
    name: BTC $65k in June
    threshold_pct: 5
    direction: any         # up | down | any

  - slug: bitcoin-100k-before-end-of-june-202
    name: BTC $100k EOM Jun
    threshold_pct: 5
    direction: any

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 `slug` is the final URL segment of a Manifold market page (e.g. `bitcoin-65k-in-june` from `https://manifold.markets/...market.../bitcoin-65k-in-june`).

Only **BINARY** markets are supported in v1 (the ones with a single probability). MULTIPLE_CHOICE and free-response markets are skipped with a warning.

## How it works

1. Every `poll_interval_sec` seconds, fetch each configured market from `api.manifold.markets/v0/slug/{slug}`.
2. Compare `probability` (0.0 – 1.0) to the value 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.

## Manifold + Polymarket + Kalshi = triangulation

Running all three watchers side by side gives you a cheap, real-time view of "where do the smart money, the regulated money, and the play money disagree?" The [prediction-market-mcp](https://github.com/creampig666/prediction-market-mcp) server exposes all three to Claude with a single `find_arb_opportunities` query.

## Roadmap (PRs welcome)

- [ ] MULTIPLE_CHOICE support (per-answer probability tracking)
- [ ] Volume-spike alerts (not just price)
- [ ] Cross-venue divergence alerts (vs Polymarket / Kalshi)
- [ ] State persistence

## Tip jar

Free and stays free. If it saved you a refresh tic:

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

## License

MIT. See [LICENSE](./LICENSE).
