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:
tinkle-community
2026-06-30 16:03:52 +08:00
parent eba28bcf0e
commit 110bf52908
149 changed files with 6835 additions and 3611 deletions

View File

@@ -27,6 +27,7 @@ const (
SignalRankingPath = "/api/v1/vergex/signal-ranking"
SignalLabPath = "/api/v1/vergex/signal-lab"
CostLiquidationHeatmapPath = "/api/v1/vergex/cost-liquidation-heatmap"
FlowMarketsPath = "/api/v1/vergex/flow-markets"
)
type Client struct {
@@ -128,6 +129,24 @@ func (c *Client) GetCostLiquidationHeatmap(ctx context.Context, q Query) (json.R
return c.doGET(ctx, CostLiquidationHeatmapPath, params)
}
// GetFlowMarkets fetches the Vergex net-flow market ranking via the paid
// claw402 x402 endpoint. Params mirror the public API: chain (e.g. "mainnet"),
// window (e.g. "1h"), and limit. The raw JSON is returned for the caller to
// pass through — the response shape is owned by Vergex.
func (c *Client) GetFlowMarkets(ctx context.Context, chain, window string, limit int) (json.RawMessage, error) {
params := url.Values{}
if v := strings.TrimSpace(chain); v != "" {
params.Set("chain", v)
}
if v := strings.TrimSpace(window); v != "" {
params.Set("window", v)
}
if limit > 0 {
params.Set("limit", fmt.Sprintf("%d", limit))
}
return c.doGET(ctx, FlowMarketsPath, params)
}
func addQueryDefaults(params url.Values, q Query, includeMarket bool) {
if includeMarket {
if q.MarketType != "" {