@vibetechnologies/mkt-alerts
v1.0.2
Published
CLI to manage price alerts on a self-hosted mkt daemon
Downloads
74
Maintainers
Readme
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).
# Subscribe — get your ntfy push URL (open in ntfy app on phone)
npx -y @vibetechnologies/mkt-alerts subscribe
# Add a price alert
npx -y @vibetechnologies/mkt-alerts add \
--symbol BTC-USD \
--condition below --value 90000 \
--reason "Support break — invalidates bull thesis" \
--link "https://notion.so/my-analysis"
# Add a compound alert (RSI + price)
npx -y @vibetechnologies/mkt-alerts add \
--symbol AAPL \
--condition rsi_below --value 30 \
--condition below --value 200 \
--reason "Oversold at key support" \
--desk stocks
# List active alerts
npx -y @vibetechnologies/mkt-alerts list
# Remove an alert
npx -y @vibetechnologies/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 -yOr manually copy .claude/skills/mkt-alerts/SKILL.md into ~/.claude/skills/mkt-alerts/.
Deploy your own instance
Prerequisites (local):
gcloudCLI 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.shThat'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/metricsresponds
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
# → https://ntfy.sh/mkt-a3f9c1e72d4b8e3f
# Open ntfy app on your phone and subscribe to that URLAdd an alert:
bun mkt-alerts.ts add \
--symbol BTC-USD \
--condition below \
--value 90000 \
--reason "Support break — exit signal" \
--link "https://your-analysis-url"
# channel defaults to your ntfy topic — no --channel neededList active alerts:
bun mkt-alerts.ts listRemove 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
| Condition | Meaning |
|---|---|
| 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.tscallsapi.telegram.org/bot{TOKEN}/sendMessagewithchat_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
@CryptoAiInvestorin Telegram - Channel Info → Administrators → Add Admin → search
@OpenClawBotSupport_Bot - Grant "Post Messages" permission → Save
--channel telegram-bot:@CryptoAiInvestorTo post to a private chat instead (no admin needed — just start the bot):
--channel telegram-bot:@yourusername # username
--channel telegram-bot:-1001234567890 # numeric chat IDMessage format:
🔔 BTC-USD crossed below 90000
Support break — exit signal
📊 https://your-analysis-urlTo use a different bot: create one via @BotFather, add the token to Bitwarden as mkt-daemon/telegram-bot-token, redeploy.
Not yet wired. To add: set RESEND_API_KEY in Bitwarden as mkt-daemon/resend-api-key, then use:
--channel email:[email protected]Requires a free Resend account (3,000 emails/month free).
ntfy (no account needed)
--channel ntfy:your-topic-name
# subscribe on phone: https://ntfy.sh/your-topic-nameAPI
| Endpoint | Description |
|---|---|
| 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-USDLogs
gcloud --configuration=bisonte compute ssh mkt-daemon \
--zone=us-central1-a --project=mkt-daemon-alerts \
--command="sudo journalctl -u mkt-daemon -f"