polyflup-ops
Operational commands, environment configuration, and deployment for PolyFlup.
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
Commands & Operations
Python Backend
uv run polyflup.py # Run bot
uv run check_db.py # Check database
uv run migrate_db.py # Run migrations
uv pip install -r requirements.txt
Svelte UI
cd ui && npm install
npm run dev # Dev mode
npm run build # Build
npm start # Start production
Docker
docker compose up -d --build
docker logs -f polyflup-bot
docker compose down
Environment Variables
-
PROXY_PK: Private key (Required, starts with 0x) -
BET_PERCENT: Position size (default 5.0) -
MIN_EDGE: Min confidence (default 0.565) -
ENABLE_STOP_LOSS,ENABLE_TAKE_PROFIT,ENABLE_REVERSAL: YES/NO -
MARKETS: Comma-separated symbols (e.g., BTC,ETH)
Debugging
Log Files
-
Master Log:
logs/trades_2025.log- All trading activity and monitoring -
Window Logs:
logs/window_YYYY-MM-DD_HH-mm.log- Specific 15-minute window history -
Error Log:
logs/errors.log- Dedicated error stack traces and exceptions
Database Operations
# Check database integrity
uv run check_db.py
# Run migrations manually
uv run migrate_db.py
# Check migration status
uv run check_migration_status.py
Production Sync
The bot includes specialized tools for syncing production data:
-
sync_db: Download production
trades.dbvia SSH - sync_logs: Update local logs from production server
Common Issues
Database Locked
- Ensure only one bot instance is running
- Check for zombie processes:
ps aux | grep polyflup - Database uses WAL mode for better concurrency
Balance API Issues
- XRP markets have known reliability issues (15m grace period configured)
- Enhanced balance validation with retry logic automatically handles this
- Check
ENABLE_ENHANCED_BALANCE_VALIDATION=YESin .env
Position Sync Issues
- Bot performs startup sync with exchange on launch
- Uses both CLOB order book and Data API for position validation
- Automatic self-healing logic corrects size mismatches
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-01-20
- 索引更新时间
- 2026-01-26
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!