fix: 当API URL为空时使用默认币种列表,避免循环请求失败

- 添加默认主流币种列表(BTC、ETH、SOL、BNB、XRP、DOGE、ADA、HYPE)
- 在GetCoinPool()中检查coin_pool_api_url,为空时直接返回默认列表
- 在GetOITopPositions()中检查oi_top_api_url,为空时跳过OI Top数据
- 更新README文档,说明API URL可选配置和默认币种列表
- 修复:避免空URL导致的循环请求和"unsupported protocol scheme"错误
This commit is contained in:
nobody
2025-10-29 12:23:29 +08:00
parent deadd2e437
commit 7a0612b2db
3 changed files with 54 additions and 8 deletions

View File

@@ -250,8 +250,11 @@ Create `config.json` file (use `config.json.example` as template):
- `binance_api_key/secret_key`: Each trader uses independent Binance account
- `initial_balance`: Initial balance (for calculating P/L%)
- `scan_interval_minutes`: Decision cycle (recommended 3-5 minutes)
- `coin_pool_api_url`: AI500 coin pool API (optional)
- `oi_top_api_url`: OI Top open interest API (optional)
- `coin_pool_api_url`: AI500 coin pool API (optional, if empty, uses default mainstream coins)
- `oi_top_api_url`: OI Top open interest API (optional, if empty, OI Top data is skipped)
**Default Coin List** (used when APIs are not configured):
- BTC, ETH, SOL, BNB, XRP, DOGE, ADA, HYPE
### 5. Run the System