fix: use strategy symbol in strategy detail views
This commit is contained in:
parent
ca87e77ada
commit
e6ab2f113f
@ -239,29 +239,30 @@ export default function StrategyDetailPage() {
|
|||||||
try {
|
try {
|
||||||
// Try new /api/strategies/{id} first for full detail
|
// Try new /api/strategies/{id} first for full detail
|
||||||
const r = await authFetch(`/api/strategies/${strategyId}`);
|
const r = await authFetch(`/api/strategies/${strategyId}`);
|
||||||
if (r.ok) {
|
if (r.ok) {
|
||||||
const d = await r.json();
|
const d = await r.json();
|
||||||
const s = d.strategy;
|
const s = d.strategy;
|
||||||
setSummary({
|
setSummary({
|
||||||
strategy_id: s.strategy_id,
|
strategy_id: s.strategy_id,
|
||||||
display_name: s.display_name,
|
display_name: s.display_name,
|
||||||
status: s.status,
|
status: s.status,
|
||||||
started_at: s.started_at || s.created_at || Date.now(),
|
started_at: s.started_at || s.created_at || Date.now(),
|
||||||
initial_balance: s.initial_balance,
|
initial_balance: s.initial_balance,
|
||||||
current_balance: s.current_balance,
|
current_balance: s.current_balance,
|
||||||
net_usdt: s.net_usdt || 0,
|
net_usdt: s.net_usdt || 0,
|
||||||
net_r: s.net_r || 0,
|
net_r: s.net_r || 0,
|
||||||
trade_count: s.trade_count || 0,
|
trade_count: s.trade_count || 0,
|
||||||
win_rate: s.win_rate || 0,
|
win_rate: s.win_rate || 0,
|
||||||
avg_win_r: s.avg_win_r || 0,
|
avg_win_r: s.avg_win_r || 0,
|
||||||
avg_loss_r: s.avg_loss_r || 0,
|
avg_loss_r: s.avg_loss_r || 0,
|
||||||
open_positions: s.open_positions || 0,
|
open_positions: s.open_positions || 0,
|
||||||
pnl_usdt_24h: s.pnl_usdt_24h || 0,
|
pnl_usdt_24h: s.pnl_usdt_24h || 0,
|
||||||
pnl_r_24h: s.pnl_r_24h || 0,
|
pnl_r_24h: s.pnl_r_24h || 0,
|
||||||
cvd_fast_window: s.cvd_fast_window,
|
cvd_fast_window: s.cvd_fast_window,
|
||||||
cvd_slow_window: s.cvd_slow_window,
|
cvd_slow_window: s.cvd_slow_window,
|
||||||
description: s.description,
|
description: s.description,
|
||||||
});
|
symbol: s.symbol,
|
||||||
|
});
|
||||||
setDetail({
|
setDetail({
|
||||||
weight_direction: s.weight_direction,
|
weight_direction: s.weight_direction,
|
||||||
weight_env: s.weight_env,
|
weight_env: s.weight_env,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user