TNT-Likely/PanWatch

▲ 735 stars today★ 1,857⑂ 336

PanWatch — AI stock monitoring for A-shares, HK & US markets, powered by TradingAgents. Portfolio insights, real-time alerts & automated reports.|盯盘侠:覆盖 A股/港股/美股的 AI 盯盘、持仓分析、实时提醒与自动报告。

About TNT-Likely/PanWatch

TNT-Likely/PanWatch is an open-source project on GitHub, mainly written in Python. PanWatch — AI stock monitoring for A-shares, HK & US markets, powered by TradingAgents. It currently holds 1,857 stars and 336 forks with 81 open issues, and was last pushed on 2026-09-28 (repository created 2026-01-23).

Project Overview

Git Homed tracks it on the Today's Trending board.

GitHub Repository Details

Repository TNT-Likely/PanWatch · default branch main · size 17686 KB · watchers 18 · source: GitHub REST API and repository README

README

PanWatch — Self-hosted AI stock monitoring

English | 简体中文

Turn your watchlist and portfolio into an always-on AI research desk. PanWatch combines real-time monitoring, portfolio management, automated analysis, and multi-channel alerts for China A-shares, Hong Kong, and U.S. markets—all on infrastructure you control.

Powered by TradingAgents for multi-agent investment research, including specialist analysis, bull/bear debate, risk review, and a portfolio-manager decision.

🌐 Available in English and Simplified Chinese. On first visit, PanWatch follows the browser language; a manual selection is remembered.

Quick start · Feature overview · Core features · Development · Support · Contributing

GitHub stars Docker Pulls License: MIT Last commit PWA

https://github.com/TNT-Likely/PanWatch/blob/HEAD/GitHub Trending Repository of the Day

PanWatch TradingAgents deep-analysis demo
🧠 Start from a portfolio holding → let a nine-agent TradingAgents research team analyze it → follow the bull/bear debate and risk review → receive a PM decision memo and the complete reasoning trail in your messaging app within 3–5 minutes.

Why PanWatch?

📸 Feature Overview

The screenshots below use the English interface; Simplified Chinese is available throughout the same product surfaces.

| Portfolio · Multi-account overview | Opportunities · AI-scored ideas | |:---:|:---:| | Portfolio management | AI-scored opportunities | | Paper trading · Equity curve and performance | Deep stock analysis | | Paper trading | Stock details | | Technical confluence · MACD/RSI/KDJ at a glance | Price alerts · Combined conditions | | Technical indicators | Price alerts |

Mobile screenshots
📱 PanWatch is an installable PWA and can be added to your mobile home screen like a native app.

💡 If PanWatch is useful to you, please consider giving the project a ⭐ Star. It is the best way to support the project and help more people discover it.

🧠 Deep Analysis with TradingAgents

PanWatch integrates TradingAgents, the multi-agent investment decision framework with more than 76k stars. Select the 🧠 icon next to a portfolio holding to start an analysis:

Core Features

Intelligent agent system

| Agent | Trigger | Purpose | |-------|---------|---------| | Pre-market outlook | Before each market session | Combines overnight U.S. market moves, news, and technical structure into an action plan for the day. | | Intraday monitor | During trading hours | Watches unusual moves and sends alerts when indicators such as RSI, KDJ, and MACD align. | | Daily report | After market close | Reviews the session, analyzes capital flows, and prepares a plan for the next trading day. |

Professional technical analysis
  • Trend indicators: moving-average alignment, MACD crosses, and Bollinger Band breakouts.
  • Momentum indicators: RSI overbought/oversold conditions and KDJ saturation or divergence.
  • Price and volume: volume-ratio anomalies, low-volume pullbacks, and high-volume breakouts.
  • Pattern recognition: hammer, engulfing, doji, and other candlestick patterns.
  • Support and resistance: automatic calculation of multiple support and resistance levels.
Multiple markets and accounts
  • Markets: real-time quotes for China A-shares, Hong Kong stocks, and U.S. stocks.
  • Account management: manage brokerage accounts independently while viewing consolidated total assets.
  • Trading styles: set short-term, swing, or long-term preferences for more relevant AI suggestions.
Multi-channel notifications

Telegram / WeCom / DingTalk / Feishu / Bark / custom webhooks

Price alerts
  • Combine price, percentage change, turnover, volume ratio, and other conditions with AND/OR logic.
  • Limit rules to market hours or keep them active all day; configure cooldowns, daily trigger limits, and repeat behavior.
  • Set an expiration date and HH:mm time in the rule dialog, or leave it empty so the rule never expires.
  • Choose notification channels per rule, or use the system default when none is selected.

Quick Start

docker run -d \
  --name panwatch \
  --restart unless-stopped \
  -p 8000:8000 \
  -v panwatch_data:/app/data \
  sunxiao0721/panwatch:latest

Open http://localhost:8000, create your username and password, and connect an OpenAI-compatible provider. PanWatch selects English or Simplified Chinese from the browser language on first visit.

The image includes the system dependencies required by Playwright. Chromium is downloaded and installed into the mounted volume (by default /app/data/playwright) on the first container startup. This can take a few minutes and requires network access.

If you do not need browser-based features such as screenshots, set PLAYWRIGHT_SKIP_BROWSER_INSTALL=1 when starting the container to skip the initial Chromium installation.

Docker Compose
services:
  panwatch:
    image: sunxiao0721/panwatch:latest
    container_name: panwatch
    ports:
  • "8000:8000"
volumes:
  • panwatch_data:/app/data
restart: unless-stopped

volumes: panwatch_data:

docker compose up -d

Environment variables

| Variable | Description | Default | |----------|-------------|---------| | AUTH_USERNAME | Preconfigured login username | Set on first visit | | AUTH_PASSWORD | Preconfigured login password | Set on first visit | | JWT_SECRET | Secret used to sign JWTs | Generated automatically | | DATA_DIR | Data storage directory | ./data | | TZ | Application timezone used for agent schedules and displayed times | Asia/Shanghai | | PLAYWRIGHT_SKIP_BROWSER_INSTALL | Skip the initial Chromium installation when browser features are not required | Not set | | LOG_LEVEL | Console log level. INFO prints business events and errors; use DEBUG for scheduler heartbeats, collection steps, and other diagnostics. The UI log panel always retains the complete log. | INFO | | HTTP_PROXY / HTTPS_PROXY / http_proxy | Outbound HTTP proxy. Configure it through an external environment variable, http_proxy=http://host:port in .env, or Settings → Global HTTP Proxy. Priority: external environment variables > UI > .env. NO_PROXY includes localhost,127.0.0.1 by default. | Not set | | OTEL_EXPORTER_OTLP_ENDPOINT | OpenTelemetry OTLP endpoint, such as http://jaeger:4318. Export remains completely disabled when this is empty. The optional dependencies in requirements-otel.txt are also required. | Not set (disabled) |

Initial setup

1. Open the web interface and create your login credentials. 2. Go to Settings → AI Services and configure an OpenAI-compatible API, such as OpenAI, Zhipu AI, DeepSeek, or Ollama. 3. Go to Settings → Notification Channels and add Telegram or another delivery channel. 4. Go to Portfolio → Add Stock, add a symbol to your watchlist, and enable the relevant agents.

Local development

Requirements: Python 3.10+ / Node.js 24.14.0 / pnpm 9.15.9

# One-command development setup (recommended)
make dev-api          # Backend with automatic venv/dependencies on :8000
make dev-web          # Frontend with automatic pnpm install on :5183

Or start each service manually

python -m venv venv && source venv/bin/activate pip install -r requirements.txt python server.py # Backend on :8000

cd frontend && pnpm install && pnpm dev # Frontend on :5183

The frontend development server runs at http://localhost:5183 and proxies /api to 127.0.0.1:8000.

Port 5183 is used instead of Vite's default 5173 to avoid conflicts with other locally running projects such as BeeCount-Cloud.

Technology stack

Backend: FastAPI / SQLAlchemy / APScheduler / OpenAI SDK

Frontend: React 18 / TypeScript / Tailwind CSS / shadcn/ui

OpenTelemetry export (optional and disabled by default)

PanWatch includes a built-in observability stack with structured logs, end-to-end trace_id correlation, the agent_runs table, and node-level TradingAgents progress and cost reporting. It works without any external service.

You can optionally add standard OpenTelemetry export and send traces to Jaeger, Tempo, Langfuse, or another compatible APM. PanWatch maps three types of spans:

  • One agent run → a root span correlated with the trace_id from agent_runs.
  • One LLM call → a gen_ai child span following the OpenTelemetry GenAI semantic conventions, including gen_ai.system, gen_ai.request.model, input/output token usage, and gen_ai.operation.name.
  • One TradingAgents node → a child span that reuses the node-level progress callback.
Export is a complete no-op when the optional dependencies are not installed and no endpoint is configured.

Enable it in three steps:

# 1. Install the optional dependencies
pip install -r requirements-otel.txt

2. Configure your collector or APM endpoint

export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318 export OTEL_SERVICE_NAME=panwatch # Optional; defaults to panwatch

3. Start PanWatch normally. The startup log will confirm that OTel export is enabled.

python server.py

Run a local Jaeger instance to verify the integration:

docker run -d --name jaeger -p 16686:16686 -p 4318:4318 \
  jaegertracing/all-in-one:latest

Trigger an agent, open http://localhost:16686, and select service=panwatch.

Langfuse and Tempo work the same way: point OTEL_EXPORTER_OTLP_ENDPOINT to their OTLP endpoint.

Publishing Docker images

The repository includes a GitHub Actions release workflow:

  • Pushing a tag such as 0.2.3 automatically builds and publishes:
  • sunxiao0721/panwatch:0.2.3
  • sunxiao0721/panwatch:latest
  • The workflow can also be started manually with workflow_dispatch and an explicit version.
Configure these repository secrets before publishing:
  • DOCKERHUB_USERNAME
  • DOCKERHUB_TOKEN

Support the Project

PanWatch is free and open source. If it saves you time or improves your workflow, you can support continued development:

PayPal

USDT (TRC20)

Address: TKBV69B2AoU67p3vDhnJUbMJtZ1DxuUF5C

https://github.com/TNT-Likely/PanWatch/blob/HEAD/Binance USDT TRC20 QR code

Alipay / WeChat Pay

| Alipay | WeChat Pay | |:---:|:---:| | https://github.com/TNT-Likely/PanWatch/blob/HEAD/Alipay QR code | https://github.com/TNT-Likely/PanWatch/blob/HEAD/WeChat Pay QR code |

Contributing

Issues and pull requests are welcome. See the contribution guide for setup, validation, internationalization, custom agents, and market-data sources.

Community chat (Telegram): t.me/panwatch

License

MIT

GitHub Stars & Activity

1,857Stars
336Forks
81Open issues
PythonLanguage

GitHub Popularity

GitHub stars1,857
Forks336
Open issues81
Primary languagePython
LicenseMIT
Stars gained today735
Created2026-01-23
Last pushed2026-09-28

Trending History

Weekly boardrank #47 · ▲ 735 stars

Related GitHub Projects

1

harry0703 / MoneyPrinterTurbo

Python★ 127,006⑂ 19,845▲ 325 stars
→
2

bytedance / deer-flow

Python★ 83,223⑂ 11,547▲ 79 stars
→
3

mem0ai / mem0

Python★ 66,319⑂ 7,809▲ 119 stars
→
4

rohitg00 / ai-engineering-from-scratch

Python★ 61,180⑂ 10,517▲ 855 stars
→
5

debpalash / VoiceStudio

Python★ 47,551⑂ 5,354▲ 4,712 stars
→
6

MadsLorentzen / ai-job-search

Python★ 44,462⑂ 15,316▲ 138 stars
→
7

vectorize-io / hindsight

Python★ 42,653⑂ 5,758▲ 2,541 stars
→
8

VectifyAI / PageIndex

Python★ 37,166⑂ 3,250▲ 822 stars
→

More Trending Repositories