$ pricewatch
CLI daemon · desktop alerts · zero cloud

PriceWatch

Set a price. Walk away. Get pinged the second it crosses.

A background daemon that watches stocks and crypto simultaneously, fires a desktop notification the instant a threshold you set is crossed, and quietly builds a local price history you can chart — entirely on your own machine. No dashboard to host, no account to create, no subscription to cancel.

Python 3.8+yfinanceCoinGecko APIscheduleplyermatplotlibCSV logging.env configGPLv3
zsh — pricewatch.py
$ python pricewatch.py --asset BTC --target 60000 --direction above
$ python pricewatch.py --asset INFY --target 1800 --direction below
$ python pricewatch.py --report          # generate this week's chart

🔔 ALERT: BTC crossed ₹60,000 — Current: ₹60,412
📊 Weekly report saved to reports/week_49_2023.png▋
the x factor

Not just alerts — a passive price tracker with visual history

Most threshold-alert scripts throw away every price they check the moment they check it. PriceWatch doesn't.

  • ▸CSV price-history log — every single price check, not just crossings, is appended to data/history_<ASSET>.csv with a timestamp — a full record, built for free.
  • ▸Auto-generated weekly chart — real matplotlib reads that CSV and renders a price-over-time .png to /reports every Sunday at 23:00 — or on demand with --report. Every point on the chart comes from real logged history, never a placeholder.

Zero cloud. Zero subscription. A local CSV, a local PNG, and a daemon that never phones home.

reports/week_38_2026_BTC.pngmatplotlib · Agg
target
montuewedthufrisatsun
how it works

One daemon, every threshold you care about

Multi-asset watches

Register any number of stocks or crypto tickers at once. One shared polling loop, one watch-state file (data/watches.json) tracks every active threshold.

Edge-triggered alerts

A crossing fires once, not on every poll. The watch won't re-alert until price moves back across the threshold and crosses it again — no notification spam.

Background daemon

python pricewatch.py --run starts an interval-based polling loop via the schedule library and keeps tracking every registered asset until you stop it.

Desktop notifications, never silent

Alerts fire through plyer for a native popup, but the console/log line prints first and always — so headless boxes still get a reliable alert.

Live prices, mock fallback

CoinGecko for crypto, yfinance for everything else. If a live call fails for any reason, PriceWatch transparently falls back to a seeded mock generator instead of stalling.

Configurable via .env

Set PRICEWATCH_CURRENCY, PRICEWATCH_INTERVAL, and an optional COINGECKO_API_KEY without touching code.

run it

From clone to first alert in five commands

setup

$ python3 -m venv .venv
$ source .venv/bin/activate
$ pip install -r requirements.txt
$ cp .env.example .env

usage

$ python pricewatch.py --asset BTC \
    --target 60000 --direction above
$ python pricewatch.py --run
$ python pricewatch.py --report
$ python pricewatch.py --list

--run --mock forces the seeded synthetic price generator for offline demos or CI; omit it to hit CoinGecko and yfinance live.