mkt-alerts
Price and indicator alert daemon — self-hosted on a free GCP e2-micro VM, delivered via ntfy push to your phone.
Deploys mkt as a headless engine behind a Cloudflare Tunnel (no open firewall ports).
npx -y @vibebrowser/mkt-alerts subscribe
npx -y @vibebrowser/mkt-alerts add \
--symbol BTC-USD \
--condition below --value 90000 \
--reason "Support break — invalidates bull thesis" \
--link "https://notion.so/my-analysis"
npx -y @vibebrowser/mkt-alerts add \
--symbol AAPL \
--condition rsi_below --value 30 \
--condition below --value 200 \
--reason "Oversold at key support" \
--desk stocks
npx -y @vibebrowser/mkt-alerts list
npx -y @vibebrowser/mkt-alerts remove --id <id>
Install as a Claude Code skill
Agents (stocks-advisor, crypto-advisor, multi-lens-quorum) can set alerts automatically after analysis:
npx skills add github.com/dzianisv/mkt-alerts/ -s mkt-alerts -y
Or manually copy .claude/skills/mkt-alerts/SKILL.md into ~/.claude/skills/mkt-alerts/.
Deploy your own instance
Prerequisites (local):
gcloud CLI with a named config authenticated to your GCP account
- Bitwarden CLI (
bw) unlocked — source ~/.env.d/bitwarden.env
curl, python3
Deploy:
git clone https://github.com/dzianisv/mkt-alerts
cd mkt-alerts
bash deploy.sh
That's it. The script:
- Creates the GCP VM (or starts it if stopped)
- Upserts the Cloudflare DNS CNAME
- Installs Go, Bun, mkt binary, systemd services on the VM
- Verifies
https://mkt.agentlabs.cc/metrics responds
Re-run any time to redeploy — idempotent.
Setting alerts
Use the included CLI — no SSH needed after deploy.sh runs.
Get your subscribe URL:
bun mkt-alerts.ts subscribe
Add an alert:
bun mkt-alerts.ts add \
--symbol BTC-USD \
--condition below \
--value 90000 \
--reason "Support break — exit signal" \
--link "https://your-analysis-url"
List active alerts:
bun mkt-alerts.ts list
Remove an alert:
bun mkt-alerts.ts remove --id <id>
Alerts are checked every 15 minutes. When a condition fires you get a push notification with the reasoning and analysis link.
Alert conditions
above / below | price crosses threshold |
pct_up / pct_down | price moves X% from current |
rsi_above / rsi_below | RSI crosses value |
sma_cross_above / sma_cross_below | price crosses SMA |
macd_cross | MACD line crosses signal |
Supports stocks (AAPL, CRM) and crypto (BTC-USD, ETH-USD, AAVE-USD).
Delivery channels
Telegram
The bot (@OpenClawBotSupport_Bot, token in Bitwarden as mkt-daemon/telegram-bot-token) posts to the @CryptoAiInvestor channel using the Bot API.
How delivery works:
check.ts calls api.telegram.org/bot{TOKEN}/sendMessage with chat_id=@CryptoAiInvestor
- Telegram delivers the message to the channel
Requirement: the bot must be an admin of the channel.
Without admin rights the API returns Unauthorized and the alert is silently dropped.
To add the bot as admin:
- Open
@CryptoAiInvestor in Telegram
- Channel Info → Administrators → Add Admin → search
@OpenClawBotSupport_Bot
- Grant "Post Messages" permission → Save
--channel telegram-bot:@CryptoAiInvestor
To post to a private chat instead (no admin needed — just start the bot):
--channel telegram-bot:@yourusername
--channel telegram-bot:-1001234567890
Message format:
🔔 BTC-USD crossed below 90000
Support break — exit signal
📊 https://your-analysis-url
To use a different bot: create one via @BotFather, add the token to Bitwarden as mkt-daemon/telegram-bot-token, redeploy.
Email
Not yet wired. To add: set RESEND_API_KEY in Bitwarden as mkt-daemon/resend-api-key, then use:
--channel email:you@example.com
Requires a free Resend account (3,000 emails/month free).
ntfy (no account needed)
--channel ntfy:your-topic-name
API
GET /metrics | Uptime, symbol count, alert count |
GET /quotes | All cached prices |
GET /quotes/BTC-USD | Single symbol |
GET /alerts | Active mkt-native alert rules |
curl https://mkt.agentlabs.cc/quotes/BTC-USD
Logs
gcloud --configuration=bisonte compute ssh mkt-daemon \
--zone=us-central1-a --project=mkt-daemon-alerts \
--command="sudo journalctl -u mkt-daemon -f"