Player of Games – Master Controller for PoG Trading Microservices. A real-time portfolio oversight dashboard that aggregates data from multiple trading services and exchanges.
PoGPM is the central command and control hub for the PoG trading ecosystem. It provides:
- Real-time PnL Tracking – 1-second updates for mission-critical position monitoring
- Multi-Exchange Aggregation – Combines data from HyperLiquid, Lighter, and manual accounts
- Service Management – Start, stop, restart, and monitor all trading services
- Equity Tracking – Historical equity curves with full history back to genesis
- Risk Management – Centralized control over strategy risk parameters
- Watchdog – Automatic service health monitoring and restart capabilities
+------------------+
| PoGPM | <- Master Controller (Port 9004)
| (This Service) |
+--------+---------+
|
+----+----+----+----+
| | |
+---v---+ +---v---+ +---v---+
|PoGUCB | |Trader | |Trader |
| :9001 | | HL | |Lighter|
+-------+ | :9002 | | :9102 |
+-------+ +-------+
| |
+---v---+ +---v---+
| HL | |Lighter|
| API | | API |
+-------+ +-------+
- Summary cards showing total equity, open PnL, positions, and orders
- Account-level breakdowns for each trading source
- Real-time unrealized PnL charts (1-second updates)
- Combined equity curves with full historical data
- Fixed-height streaming window showing last 20 closed trades
- Real-time WebSocket push when trades close
- Risk:Reward (R:R) ratio calculation
- PnL highlighting (green for wins)
- Flash animation for new trade notifications
- Start/stop/restart individual services
- Start/stop all services
- Watchdog with automatic health checks and restarts
- Service uptime and restart count tracking
- View and modify strategy risk settings
- Enable/disable strategies
- Kill switch status and reset
- Per-strategy PnL tracking
- Backend: Python, FastAPI, asyncio
- Frontend: Vanilla JavaScript, Chart.js
- Real-time: WebSocket for 1-second PnL updates
- Database: SQLite (equity snapshots)
- Process Management: Built-in watchdog with health checks
# Install dependencies
pip install -r requirements.txt
# Run the service
python run.py
The dashboard will be available at http://localhost:9004
GET /api/positions– All open positionsGET /api/orders– All open ordersGET /api/trades– Trade historyGET /api/analytics– Combined analytics
GET /api/equity– Equity snapshotsGET /api/equity/curves– Equity curves for chartsPOST /api/equity/backfill– Import historical data
GET /api/services– Service statusPOST /api/services/{id}/start– Start servicePOST /api/services/{id}/stop– Stop servicePOST /api/services/{id}/restart– Restart service
GET /api/risk/strategies– All strategy risk settingsPUT /api/risk/{source}/{strategy}/{symbol}– Update settings
WS /ws– Real-time updatesrealtime_pnl– 1-second PnL updatestrade_closed– Closed trade notificationspositions_update– Position changes
Configuration is managed via backend/config.py:
# Service ports
PM_PORT = 9004
UCB_PORT = 9001
TRADER_PORT = 9002
TRADER_LIGHTER_PORT = 9102
# Watchdog
WATCHDOG_ENABLED = True
HEALTH_CHECK_INTERVAL = 30 # seconds
- Reliability First – Graceful degradation when services are unavailable
- Low Latency – Real-time data where it matters (PnL, positions)
- Fail-Safe – Watchdog ensures services stay running
- Memory Bounded – All caches and buffers have limits
Proprietary – PoG Trading Systems