mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-17 09:24:36 +08:00
feat: cream terminal redesign, English-only UI, autopilot launch fixes
- Redesign dashboard into a cream-paper + vermilion IBM Plex Mono terminal (live L2 order book, cost/liq map, WS K-line, signal matrix, orchestration topology, risk radar, execution log, current positions, equity curve) - Convert all user-facing UI and backend strings/prompts from Chinese to English (multi-language retained, default English) - Add /api/statistics/full endpoint + full-stats frontend wiring - Fix Autopilot launch: reuse the existing trader instead of creating duplicates (eliminates repeat ~35s create cost and stale-trader 404s); launch sends 5m scan interval - Fix unreadable toasts: cream theme with high-contrast text + per-type accent - Silence background dashboard polls (getTraderConfig) to stop error-toast spam
This commit is contained in:
@@ -27,10 +27,10 @@ func TestKlineDaily(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
t.Log("=== BTCUSDT 日线 K线数据 (coinank_api 免费接口) ===")
|
||||
t.Log("=== BTCUSDT daily K-line data (coinank_api free endpoint) ===")
|
||||
for i, k := range resp {
|
||||
startTime := time.UnixMilli(k.StartTime).Format("2006-01-02 15:04:05")
|
||||
t.Logf("\n[%d] 时间: %s", i, startTime)
|
||||
t.Logf("\n[%d] Time: %s", i, startTime)
|
||||
t.Logf(" Open: %.2f", k.Open)
|
||||
t.Logf(" High: %.2f", k.High)
|
||||
t.Logf(" Low: %.2f", k.Low)
|
||||
@@ -39,15 +39,15 @@ func TestKlineDaily(t *testing.T) {
|
||||
t.Logf(" Quantity: %.4f (k[7])", k.Quantity)
|
||||
t.Logf(" Count: %.0f (k[8])", k.Count)
|
||||
|
||||
// 计算验证
|
||||
// Calculation verification
|
||||
if k.Close > 0 && k.Volume > 0 {
|
||||
t.Logf(" --- 验证 ---")
|
||||
t.Logf(" --- verification ---")
|
||||
t.Logf(" Volume × Close = %.2f", k.Volume*k.Close)
|
||||
t.Logf(" Quantity / Close = %.4f", k.Quantity/k.Close)
|
||||
}
|
||||
}
|
||||
|
||||
// 打印原始 JSON
|
||||
// Print raw JSON
|
||||
res, _ := json.MarshalIndent(resp, "", " ")
|
||||
fmt.Printf("\n原始 JSON:\n%s\n", res)
|
||||
fmt.Printf("\nRaw JSON:\n%s\n", res)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user