mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-14 16:26:57 +08:00
feat: add position history API and frontend integration
- Add /positions/history API endpoint - Add position history types and API client - Add translations for position history page - Integrate PositionHistory component in App
This commit is contained in:
@@ -1091,6 +1091,55 @@ export const translations = {
|
||||
privatekeyObfuscationFailed: 'Clipboard obfuscation failed',
|
||||
},
|
||||
|
||||
// Position History
|
||||
positionHistory: {
|
||||
title: 'Position History',
|
||||
loading: 'Loading position history...',
|
||||
noHistory: 'No Position History',
|
||||
noHistoryDesc: 'Closed positions will appear here after trading.',
|
||||
showingPositions: 'Showing {count} of {total} positions',
|
||||
totalPnL: 'Total P&L',
|
||||
// Stats
|
||||
totalTrades: 'Total Trades',
|
||||
winLoss: 'Win: {win} / Loss: {loss}',
|
||||
winRate: 'Win Rate',
|
||||
profitFactor: 'Profit Factor',
|
||||
profitFactorDesc: 'Total Profit / Total Loss',
|
||||
plRatio: 'P/L Ratio',
|
||||
plRatioDesc: 'Avg Win / Avg Loss',
|
||||
sharpeRatio: 'Sharpe Ratio',
|
||||
sharpeRatioDesc: 'Risk-adjusted Return',
|
||||
maxDrawdown: 'Max Drawdown',
|
||||
avgWin: 'Avg Win',
|
||||
avgLoss: 'Avg Loss',
|
||||
netPnL: 'Net P&L',
|
||||
netPnLDesc: 'After Fees',
|
||||
fee: 'Fee',
|
||||
// Direction Stats
|
||||
trades: 'Trades',
|
||||
avgPnL: 'Avg P&L',
|
||||
// Symbol Performance
|
||||
symbolPerformance: 'Symbol Performance',
|
||||
// Filters
|
||||
symbol: 'Symbol',
|
||||
allSymbols: 'All Symbols',
|
||||
side: 'Side',
|
||||
all: 'All',
|
||||
sort: 'Sort',
|
||||
latestFirst: 'Latest First',
|
||||
oldestFirst: 'Oldest First',
|
||||
highestPnL: 'Highest P&L',
|
||||
lowestPnL: 'Lowest P&L',
|
||||
// Table Headers
|
||||
entry: 'Entry',
|
||||
exit: 'Exit',
|
||||
qty: 'Qty',
|
||||
lev: 'Lev',
|
||||
pnl: 'P&L',
|
||||
duration: 'Duration',
|
||||
closedAt: 'Closed At',
|
||||
},
|
||||
|
||||
// Debate Arena Page
|
||||
debatePage: {
|
||||
title: 'Market Debate Arena',
|
||||
@@ -2188,6 +2237,55 @@ export const translations = {
|
||||
privatekeyObfuscationFailed: '剪贴板混淆失败',
|
||||
},
|
||||
|
||||
// Position History
|
||||
positionHistory: {
|
||||
title: '历史仓位',
|
||||
loading: '加载历史仓位...',
|
||||
noHistory: '暂无历史仓位',
|
||||
noHistoryDesc: '平仓后的仓位记录将显示在此处',
|
||||
showingPositions: '显示 {count} / {total} 条记录',
|
||||
totalPnL: '总盈亏',
|
||||
// Stats
|
||||
totalTrades: '总交易次数',
|
||||
winLoss: '盈利: {win} / 亏损: {loss}',
|
||||
winRate: '胜率',
|
||||
profitFactor: '盈利因子',
|
||||
profitFactorDesc: '总盈利 / 总亏损',
|
||||
plRatio: '盈亏比',
|
||||
plRatioDesc: '平均盈利 / 平均亏损',
|
||||
sharpeRatio: '夏普比率',
|
||||
sharpeRatioDesc: '风险调整收益',
|
||||
maxDrawdown: '最大回撤',
|
||||
avgWin: '平均盈利',
|
||||
avgLoss: '平均亏损',
|
||||
netPnL: '净盈亏',
|
||||
netPnLDesc: '扣除手续费后',
|
||||
fee: '手续费',
|
||||
// Direction Stats
|
||||
trades: '交易次数',
|
||||
avgPnL: '平均盈亏',
|
||||
// Symbol Performance
|
||||
symbolPerformance: '品种表现',
|
||||
// Filters
|
||||
symbol: '交易对',
|
||||
allSymbols: '全部交易对',
|
||||
side: '方向',
|
||||
all: '全部',
|
||||
sort: '排序',
|
||||
latestFirst: '最新优先',
|
||||
oldestFirst: '最早优先',
|
||||
highestPnL: '盈利最高',
|
||||
lowestPnL: '亏损最多',
|
||||
// Table Headers
|
||||
entry: '开仓价',
|
||||
exit: '平仓价',
|
||||
qty: '数量',
|
||||
lev: '杠杆',
|
||||
pnl: '盈亏',
|
||||
duration: '持仓时长',
|
||||
closedAt: '平仓时间',
|
||||
},
|
||||
|
||||
// Debate Arena Page
|
||||
debatePage: {
|
||||
title: '行情辩论大赛',
|
||||
|
||||
Reference in New Issue
Block a user