papertrade-alerts

Live app · Docs · Issues · Discussions · Papertrade · Toolkit
Unofficial, self-hostable alerts for Papertrade wallets. Know before the liquidation: get a Telegram, Discord or signed-webhook message when a position nears its bust price, opens, closes, is liquidated, when a session key is about to expire, or when staking rewards pile up.
Unofficial, not affiliated with Papertrade. High leverage can lose your whole margin. Alerts are best effort and can be late or missed.
Runs entirely on Cloudflare: one Worker (API + per-minute cron), D1 for state, and a static management UI served by the same Worker. Free-tier friendly for a handful of wallets (see Limits).
Screenshot: a dark dashboard with wallet cards (own and followed), channel cards with a "Send test" button and status chips, protocol alert switches, a recent-alerts feed with per-channel delivery badges, and a failed-deliveries view.
Quick start
npm install
cp .dev.vars.example .dev.vars
npm run dev:site # builds the UI, applies local D1 migrations, serves on :8796
# trigger a poll by hand (the cron fires every minute on its own in production):
curl localhost:8796/cdn-cgi/handler/scheduled
Open http://localhost:8796, press "Create my subscription", save the token, add a wallet and a channel, then "Send test".
MCP server and AI connectors
The Worker hosts a stateless MCP server (Streamable HTTP) at /mcp: https://papertrade-alerts.ninabrekkerese.workers.dev/mcp. Ten tools: get_service_status, list_alert_types, preview_wallet_alerts (live read of any wallet, no account needed), validate_destination, create_subscription, add_destination, test_destination, create_alert_rule, list_alert_rules, delete_alert_rule. No tool signs, sends funds or places orders. Destinations are SSRF-guarded (https only, public hosts only), writes are rate limited per client and secrets are never logged.
claude mcp add --transport http papertrade-alerts https://papertrade-alerts.ninabrekkerese.workers.dev/mcp
codex mcp add papertrade-alerts --url https://papertrade-alerts.ninabrekkerese.workers.dev/mcp
gemini mcp add --transport http papertrade-alerts https://papertrade-alerts.ninabrekkerese.workers.dev/mcp
Cursor, VS Code, Windsurf, Zed, Cline, Goose, Continue, Claude Desktop, claude.ai, ChatGPT and the Claude and OpenAI APIs: see Connect your AI.
Discovery: /.well-known/mcp/server-card.json, /.well-known/agent-card.json, /.well-known/api-catalog, /openapi.json, /llms.txt, /llms-full.txt. Registry metadata: server.json.
Documentation
Markdown sources live in docs/ and are rendered by npm run build:docs (part of build:site) to /docs/ with search, a .md twin per page, llms.txt and llms-full.txt.
Embedding
/?embed=1 hides the marketing sections and shows only the product. The home page allows framing by https://papertrade-os.pages.dev and other *.pages.dev origins. "Open in Papertrade OS" links to https://papertrade-os.pages.dev/?open=alerts.
Features