mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-07 04:50:57 +08:00
feat: migrate timestamps to int64 and security improvements
- Convert all time.Time fields to int64 Unix milliseconds (UTC) - Add PostgreSQL migration to convert timestamp columns to bigint - Reduce Binance sync window from 7 days to 24 hours - Fix dashboard trader name visibility (add nofx-text-main color) - Add position value column to history table - Remove hardcoded API keys from test files
This commit is contained in:
@@ -303,6 +303,11 @@ function PositionRow({ position }: { position: HistoricalPosition }) {
|
||||
{displayQty.toFixed(4)}
|
||||
</td>
|
||||
|
||||
{/* Position Value (Entry Price * Quantity) */}
|
||||
<td className="py-3 px-4 text-right font-mono" style={{ color: '#EAECEF' }}>
|
||||
{formatNumber(entryPrice * displayQty)}
|
||||
</td>
|
||||
|
||||
{/* P&L */}
|
||||
<td className="py-3 px-4 text-right">
|
||||
<div className="font-mono font-semibold" style={{ color: pnlColor }}>
|
||||
@@ -764,6 +769,12 @@ export function PositionHistory({ traderId }: PositionHistoryProps) {
|
||||
>
|
||||
{t('positionHistory.qty', language)}
|
||||
</th>
|
||||
<th
|
||||
className="py-3 px-4 text-right text-xs font-semibold uppercase tracking-wider"
|
||||
style={{ color: '#848E9C' }}
|
||||
>
|
||||
{t('positionHistory.value', language)}
|
||||
</th>
|
||||
<th
|
||||
className="py-3 px-4 text-right text-xs font-semibold uppercase tracking-wider"
|
||||
style={{ color: '#848E9C' }}
|
||||
|
||||
@@ -1134,6 +1134,7 @@ export const translations = {
|
||||
entry: 'Entry',
|
||||
exit: 'Exit',
|
||||
qty: 'Qty',
|
||||
value: 'Value',
|
||||
lev: 'Lev',
|
||||
pnl: 'P&L',
|
||||
duration: 'Duration',
|
||||
@@ -2280,6 +2281,7 @@ export const translations = {
|
||||
entry: '开仓价',
|
||||
exit: '平仓价',
|
||||
qty: '数量',
|
||||
value: '仓位价值',
|
||||
lev: '杠杆',
|
||||
pnl: '盈亏',
|
||||
duration: '持仓时长',
|
||||
|
||||
@@ -361,7 +361,7 @@ export function TraderDashboardPage({
|
||||
<div className="absolute -bottom-1 -right-1 w-4 h-4 bg-nofx-green rounded-full border-2 border-[#0B0E11] shadow-[0_0_8px_rgba(14,203,129,0.8)] animate-pulse" />
|
||||
</div>
|
||||
<div className="flex flex-col">
|
||||
<span className="text-3xl tracking-tight bg-clip-text text-transparent bg-gradient-to-r from-nofx-text-main to-nofx-text-muted">
|
||||
<span className="text-3xl tracking-tight text-nofx-text font-semibold">
|
||||
{selectedTrader.trader_name}
|
||||
</span>
|
||||
<span className="text-xs font-mono text-nofx-text-muted opacity-60 flex items-center gap-2">
|
||||
|
||||
Reference in New Issue
Block a user