style: 全局将 USDC 展示替换为 $ 符号
前端所有金额展示从 "100.00 USDC" 改为 "$100.00" 格式, 后端 Telegram 通知模板和错误提示同步更新。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -267,7 +267,7 @@ class CryptoTailStrategyController(
|
||||
"当前周期已下单" -> ErrorCode.PARAM_ERROR
|
||||
"价格必须在 0~1 之间" -> ErrorCode.PARAM_ERROR
|
||||
"数量不能少于 1" -> ErrorCode.PARAM_ERROR
|
||||
"总金额不能少于 1 USDC" -> ErrorCode.PARAM_ERROR
|
||||
"总金额不能少于 $1" -> ErrorCode.PARAM_ERROR
|
||||
"总金额超过策略配置的投入金额" -> ErrorCode.PARAM_ERROR
|
||||
else -> ErrorCode.SERVER_ERROR
|
||||
}
|
||||
|
||||
+1
-1
@@ -702,7 +702,7 @@ class CryptoTailStrategyExecutionService(
|
||||
|
||||
val amountUsdc = priceRounded.multi(size).setScale(2, RoundingMode.HALF_UP)
|
||||
if (amountUsdc < BigDecimal.ONE) {
|
||||
return Result.failure(IllegalArgumentException("总金额不能少于 1 USDC"))
|
||||
return Result.failure(IllegalArgumentException("总金额不能少于 \$1"))
|
||||
}
|
||||
|
||||
val mutex = getTriggerMutex(strategy.id!!, request.periodStartUnix)
|
||||
|
||||
+8
-8
@@ -169,9 +169,9 @@ class NotificationTemplateService(
|
||||
• 方向: <b>{{side}}</b>
|
||||
• 价格: <code>{{price}}</code>
|
||||
• 数量: <code>{{quantity}}</code> shares
|
||||
• 金额: <code>{{amount}}</code> USDC
|
||||
• 金额: <code>${'$'}{{amount}}</code>
|
||||
• 账户: {{account_name}}
|
||||
• 可用余额: <code>{{available_balance}}</code> USDC
|
||||
• 可用余额: <code>${'$'}{{available_balance}}</code>
|
||||
|
||||
⏰ 时间: <code>{{time}}</code>
|
||||
""".trimIndent(),
|
||||
@@ -184,7 +184,7 @@ class NotificationTemplateService(
|
||||
• 方向: <b>{{side}}</b>
|
||||
• 价格: <code>{{price}}</code>
|
||||
• 数量: <code>{{quantity}}</code> shares
|
||||
• 金额: <code>{{amount}}</code> USDC
|
||||
• 金额: <code>${'$'}{{amount}}</code>
|
||||
• 账户: {{account_name}}
|
||||
|
||||
⚠️ <b>错误信息:</b>
|
||||
@@ -201,7 +201,7 @@ class NotificationTemplateService(
|
||||
• 方向: <b>{{side}}</b>
|
||||
• 价格: <code>{{price}}</code>
|
||||
• 数量: <code>{{quantity}}</code> shares
|
||||
• 金额: <code>{{amount}}</code> USDC
|
||||
• 金额: <code>${'$'}{{amount}}</code>
|
||||
• 账户: {{account_name}}
|
||||
|
||||
⚠️ <b>过滤类型:</b> <code>{{filter_type}}</code>
|
||||
@@ -222,7 +222,7 @@ class NotificationTemplateService(
|
||||
• 方向: <b>{{side}}</b>
|
||||
• 价格: <code>{{price}}</code>
|
||||
• 数量: <code>{{quantity}}</code> shares
|
||||
• 金额: <code>{{amount}}</code> USDC
|
||||
• 金额: <code>${'$'}{{amount}}</code>
|
||||
• 账户: {{account_name}}
|
||||
|
||||
⏰ 时间: <code>{{time}}</code>
|
||||
@@ -233,8 +233,8 @@ class NotificationTemplateService(
|
||||
📊 <b>赎回信息:</b>
|
||||
• 账户: {{account_name}}
|
||||
• 交易哈希: <code>{{transaction_hash}}</code>
|
||||
• 赎回总价值: <code>{{total_value}}</code> USDC
|
||||
• 可用余额: <code>{{available_balance}}</code> USDC
|
||||
• 赎回总价值: <code>${'$'}{{total_value}}</code>
|
||||
• 可用余额: <code>${'$'}{{available_balance}}</code>
|
||||
|
||||
⏰ 时间: <code>{{time}}</code>
|
||||
""".trimIndent(),
|
||||
@@ -246,7 +246,7 @@ class NotificationTemplateService(
|
||||
|
||||
• 账户: {{account_name}}
|
||||
• 交易哈希: <code>{{transaction_hash}}</code>
|
||||
• 可用余额: <code>{{available_balance}}</code> USDC
|
||||
• 可用余额: <code>${'$'}{{available_balance}}</code>
|
||||
|
||||
⏰ 时间: <code>{{time}}</code>
|
||||
""".trimIndent()
|
||||
|
||||
+12
-12
@@ -691,7 +691,7 @@ class TelegramNotificationService(
|
||||
• $sideLabel: <b>$sideDisplay</b>
|
||||
• $priceLabel: <code>$priceDisplay</code>
|
||||
• $quantityLabel: <code>$sizeDisplay</code> shares
|
||||
• $amountLabel: <code>$amountDisplay</code> USDC
|
||||
• $amountLabel: <code>${'$'}$amountDisplay</code>
|
||||
• $accountLabel: $escapedAccountInfo
|
||||
|
||||
⚠️ <b>$filterTypeLabel:</b> <code>$filterTypeDisplay</code>
|
||||
@@ -1169,9 +1169,9 @@ class TelegramNotificationService(
|
||||
} else {
|
||||
balanceDecimal.stripTrailingZeros()
|
||||
}
|
||||
"\n• $availableBalanceLabel: <code>${formatted.toPlainString()}</code> USDC"
|
||||
"\n• $availableBalanceLabel: <code>${'$'}${formatted.toPlainString()}</code>"
|
||||
} catch (e: Exception) {
|
||||
"\n• $availableBalanceLabel: <code>$availableBalance</code> USDC"
|
||||
"\n• $availableBalanceLabel: <code>${'$'}$availableBalance</code>"
|
||||
}
|
||||
} else {
|
||||
""
|
||||
@@ -1185,7 +1185,7 @@ class TelegramNotificationService(
|
||||
• $sideLabel: <b>$sideDisplay</b>
|
||||
• $priceLabel: <code>$priceDisplay</code>
|
||||
• $quantityLabel: <code>$sizeDisplay</code> shares
|
||||
• $amountLabel: <code>$amountDisplay</code> USDC
|
||||
• $amountLabel: <code>${'$'}$amountDisplay</code>
|
||||
• $accountLabel: $escapedAccountInfo$escapedCopyTradingInfo$availableBalanceDisplay
|
||||
|
||||
⏰ $timeLabel: <code>$time</code>"""
|
||||
@@ -1264,7 +1264,7 @@ class TelegramNotificationService(
|
||||
• $sideLabel: <b>$sideDisplay</b>
|
||||
• $priceLabel: <code>$priceDisplay</code>
|
||||
• $quantityLabel: <code>$sizeDisplay</code> shares
|
||||
• $amountLabel: <code>$amountDisplay</code> USDC
|
||||
• $amountLabel: <code>${'$'}$amountDisplay</code>
|
||||
• $accountLabel: $escapedAccountInfo
|
||||
|
||||
⏰ $timeLabel: <code>$time</code>"""
|
||||
@@ -1381,7 +1381,7 @@ class TelegramNotificationService(
|
||||
• $sideLabel: <b>$sideDisplay</b>
|
||||
• $priceLabel: <code>$priceDisplay</code>
|
||||
• $quantityLabel: <code>$sizeDisplay</code> shares
|
||||
• $amountLabel: <code>$amountDisplay</code> USDC
|
||||
• $amountLabel: <code>${'$'}$amountDisplay</code>
|
||||
• $accountLabel: $escapedAccountInfo
|
||||
|
||||
⚠️ <b>$errorInfo:</b>
|
||||
@@ -1515,7 +1515,7 @@ class TelegramNotificationService(
|
||||
} catch (e: Exception) {
|
||||
position.value
|
||||
}
|
||||
" • ${position.marketId.substring(0, 8)}... (${position.side}): $quantityDisplay shares = $valueDisplay USDC"
|
||||
" • ${position.marketId.substring(0, 8)}... (${position.side}): $quantityDisplay shares = ${'$'}$valueDisplay"
|
||||
}
|
||||
|
||||
// 格式化可用余额
|
||||
@@ -1527,9 +1527,9 @@ class TelegramNotificationService(
|
||||
} else {
|
||||
balanceDecimal.stripTrailingZeros()
|
||||
}
|
||||
"\n• $availableBalanceLabel: <code>${formatted.toPlainString()}</code> USDC"
|
||||
"\n• $availableBalanceLabel: <code>${'$'}${formatted.toPlainString()}</code>"
|
||||
} catch (e: Exception) {
|
||||
"\n• $availableBalanceLabel: <code>$availableBalance</code> USDC"
|
||||
"\n• $availableBalanceLabel: <code>${'$'}$availableBalance</code>"
|
||||
}
|
||||
} else {
|
||||
""
|
||||
@@ -1540,7 +1540,7 @@ class TelegramNotificationService(
|
||||
📊 <b>$redeemInfo:</b>
|
||||
• $accountLabel: $escapedAccountInfo
|
||||
• $transactionHashLabel: <code>$escapedTxHash</code>
|
||||
• $totalValueLabel: <code>$totalValueDisplay</code> USDC$availableBalanceDisplay
|
||||
• $totalValueLabel: <code>${'$'}$totalValueDisplay</code>$availableBalanceDisplay
|
||||
|
||||
📦 <b>$positionsLabel:</b>
|
||||
$positionsText
|
||||
@@ -1642,9 +1642,9 @@ $positionsText
|
||||
} else {
|
||||
balanceDecimal.stripTrailingZeros()
|
||||
}
|
||||
"\n• $availableBalanceLabel: <code>${formatted.toPlainString()}</code> USDC"
|
||||
"\n• $availableBalanceLabel: <code>${'$'}${formatted.toPlainString()}</code>"
|
||||
} catch (e: Exception) {
|
||||
"\n• $availableBalanceLabel: <code>$availableBalance</code> USDC"
|
||||
"\n• $availableBalanceLabel: <code>${'$'}$availableBalance</code>"
|
||||
}
|
||||
} else {
|
||||
""
|
||||
|
||||
@@ -525,7 +525,7 @@ const AccountImportForm: React.FC<AccountImportFormProps> = ({
|
||||
</Space>
|
||||
{!option.error && (
|
||||
<span style={{ fontSize: 13, fontWeight: 500, color: 'var(--ant-color-primary)' }}>
|
||||
{formatUSDC(option.totalBalance)} USDC
|
||||
${formatUSDC(option.totalBalance)}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -247,7 +247,7 @@ const AccountSetupStatusBlock: React.FC<AccountSetupStatusBlockProps> = ({
|
||||
const displayText = isUnlimited
|
||||
? t('accountSetup.approvalDetails.unlimited')
|
||||
: isApproved
|
||||
? `${parseFloat(allowance).toFixed(2)} USDC`
|
||||
? `$${parseFloat(allowance).toFixed(2)}`
|
||||
: t('accountSetup.approvalDetails.notApproved')
|
||||
return (
|
||||
<div
|
||||
|
||||
@@ -202,7 +202,7 @@ const AccountDetail: React.FC = () => {
|
||||
<Spin size="small" />
|
||||
) : balance ? (
|
||||
<span style={{ fontWeight: 'bold', color: '#1890ff' }}>
|
||||
{formatUSDC(balance)} USDC
|
||||
${formatUSDC(balance)}
|
||||
</span>
|
||||
) : (
|
||||
<span style={{ color: '#999' }}>-</span>
|
||||
@@ -274,7 +274,7 @@ const AccountDetail: React.FC = () => {
|
||||
fontWeight: 'bold',
|
||||
color: account.totalPnl.startsWith('-') ? '#ff4d4f' : '#52c41a'
|
||||
}}>
|
||||
{formatUSDC(account.totalPnl)} USDC
|
||||
${formatUSDC(account.totalPnl)}
|
||||
</span>
|
||||
</Descriptions.Item>
|
||||
)}
|
||||
|
||||
@@ -75,9 +75,9 @@ const BacktestChart: React.FC<BacktestChartProps> = ({ trades }) => {
|
||||
return `
|
||||
<div>
|
||||
<div>${t('backtest.tradeTime')}: ${param.name}</div>
|
||||
<div>${t('backtest.balanceAfter')}: ${value} USDC</div>
|
||||
<div>${t('backtest.balanceAfter')}: $${value}</div>
|
||||
<div style="color: ${color}">
|
||||
${t('backtest.profitLoss')}: ${diff} USDC (${diffPercent}%)
|
||||
${t('backtest.profitLoss')}: $${diff} (${diffPercent}%)
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
@@ -121,7 +121,7 @@ const BacktestChart: React.FC<BacktestChartProps> = ({ trades }) => {
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
name: 'USDC',
|
||||
name: '$',
|
||||
nameLocation: 'end',
|
||||
nameGap: 10,
|
||||
axisLabel: {
|
||||
|
||||
@@ -279,14 +279,14 @@ const BacktestDetail: React.FC = () => {
|
||||
render: (value: string) => parseFloat(value).toFixed(4)
|
||||
},
|
||||
{
|
||||
title: t('backtest.amount') + ' (USDC)',
|
||||
title: t('backtest.amount') + ' ($)',
|
||||
dataIndex: 'amount',
|
||||
key: 'amount',
|
||||
width: 120,
|
||||
render: (value: string) => formatUSDC(value)
|
||||
},
|
||||
{
|
||||
title: t('backtest.balanceAfter') + ' (USDC)',
|
||||
title: t('backtest.balanceAfter') + ' ($)',
|
||||
dataIndex: 'balanceAfter',
|
||||
key: 'balanceAfter',
|
||||
width: 120,
|
||||
@@ -346,14 +346,14 @@ const BacktestDetail: React.FC = () => {
|
||||
{task.leaderName || task.leaderAddress}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t('backtest.initialBalance')}>
|
||||
{formatUSDC(task.initialBalance)} USDC
|
||||
${formatUSDC(task.initialBalance)}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t('backtest.finalBalance')}>
|
||||
{task.finalBalance ? formatUSDC(task.finalBalance) + ' USDC' : '-'}
|
||||
{task.finalBalance ? '$' + formatUSDC(task.finalBalance) : '-'}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t('backtest.profitAmount')}>
|
||||
<span style={{ color: task.profitAmount && parseFloat(task.profitAmount) >= 0 ? '#52c41a' : '#ff4d4f' }}>
|
||||
{task.profitAmount ? formatUSDC(task.profitAmount) + ' USDC' : '-'}
|
||||
{task.profitAmount ? '$' + formatUSDC(task.profitAmount) : '-'}
|
||||
</span>
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t('backtest.profitRate')}>
|
||||
|
||||
@@ -461,14 +461,14 @@ const BacktestList: React.FC = () => {
|
||||
render: (value: string) => parseFloat(value).toFixed(4)
|
||||
},
|
||||
{
|
||||
title: t('backtest.amount') + ' (USDC)',
|
||||
title: t('backtest.amount') + ' ($)',
|
||||
dataIndex: 'amount',
|
||||
key: 'amount',
|
||||
width: 120,
|
||||
render: (value: string) => formatUSDC(value)
|
||||
},
|
||||
{
|
||||
title: t('backtest.balanceAfter') + ' (USDC)',
|
||||
title: t('backtest.balanceAfter') + ' ($)',
|
||||
dataIndex: 'balanceAfter',
|
||||
key: 'balanceAfter',
|
||||
width: 120,
|
||||
@@ -815,7 +815,7 @@ const BacktestList: React.FC = () => {
|
||||
<div>
|
||||
<div style={{ fontSize: '10px', color: '#8c8c8c' }}>{t('backtest.profitAmount')}</div>
|
||||
{task.profitAmount != null ? (
|
||||
<div style={{ fontSize: '14px', fontWeight: '600', color: parseFloat(task.profitAmount) >= 0 ? '#52c41a' : '#ff4d4f' }}>{formatUSDC(task.profitAmount)} USDC</div>
|
||||
<div style={{ fontSize: '14px', fontWeight: '600', color: parseFloat(task.profitAmount) >= 0 ? '#52c41a' : '#ff4d4f' }}>${formatUSDC(task.profitAmount)}</div>
|
||||
) : (
|
||||
<div style={{ fontSize: '14px', color: '#8c8c8c' }}>-</div>
|
||||
)}
|
||||
@@ -997,7 +997,7 @@ const BacktestList: React.FC = () => {
|
||||
<Row gutter={24}>
|
||||
<Col xs={24} sm={24} md={12}>
|
||||
<Form.Item
|
||||
label={t('backtest.initialBalance') + ' (USDC)'}
|
||||
label={t('backtest.initialBalance') + ' ($)'}
|
||||
name="initialBalance"
|
||||
rules={[
|
||||
{ required: true, message: t('backtest.initialBalanceRequired') || '请输入初始资金' },
|
||||
@@ -1082,7 +1082,7 @@ const BacktestList: React.FC = () => {
|
||||
|
||||
{copyMode === 'FIXED' && (
|
||||
<Form.Item
|
||||
label={t('backtest.fixedAmount') + ' (USDC)'}
|
||||
label={t('backtest.fixedAmount') + ' ($)'}
|
||||
name="fixedAmount"
|
||||
rules={[
|
||||
{ required: true, message: t('backtest.fixedAmountRequired') || '请输入固定金额' },
|
||||
@@ -1101,7 +1101,7 @@ const BacktestList: React.FC = () => {
|
||||
<Row gutter={24}>
|
||||
<Col xs={24} sm={24} md={12}>
|
||||
<Form.Item
|
||||
label={t('backtest.maxOrderSize') + ' (USDC)'}
|
||||
label={t('backtest.maxOrderSize') + ' ($)'}
|
||||
name="maxOrderSize"
|
||||
rules={[{ required: true }]}
|
||||
>
|
||||
@@ -1110,7 +1110,7 @@ const BacktestList: React.FC = () => {
|
||||
</Col>
|
||||
<Col xs={24} sm={24} md={12}>
|
||||
<Form.Item
|
||||
label={t('backtest.minOrderSize') + ' (USDC)'}
|
||||
label={t('backtest.minOrderSize') + ' ($)'}
|
||||
name="minOrderSize"
|
||||
rules={[{ required: true }]}
|
||||
>
|
||||
@@ -1122,7 +1122,7 @@ const BacktestList: React.FC = () => {
|
||||
<Row gutter={24}>
|
||||
<Col xs={24} sm={24} md={12}>
|
||||
<Form.Item
|
||||
label={t('backtest.maxDailyLoss') + ' (USDC)'}
|
||||
label={t('backtest.maxDailyLoss') + ' ($)'}
|
||||
name="maxDailyLoss"
|
||||
rules={[{ required: true }]}
|
||||
>
|
||||
@@ -1141,7 +1141,7 @@ const BacktestList: React.FC = () => {
|
||||
</Row>
|
||||
|
||||
<Form.Item
|
||||
label={t('backtest.maxPositionValue') + ' (USDC)'}
|
||||
label={t('backtest.maxPositionValue') + ' ($)'}
|
||||
name="maxPositionValue"
|
||||
>
|
||||
<InputNumber
|
||||
@@ -1316,14 +1316,14 @@ const BacktestList: React.FC = () => {
|
||||
{detailTask.leaderName || `Leader ${detailTask.leaderId}`}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t('backtest.initialBalance')}>
|
||||
{formatUSDC(detailTask.initialBalance)} USDC
|
||||
${formatUSDC(detailTask.initialBalance)}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t('backtest.finalBalance')}>
|
||||
{detailTask.finalBalance ? formatUSDC(detailTask.finalBalance) + ' USDC' : '-'}
|
||||
{detailTask.finalBalance ? '$' + formatUSDC(detailTask.finalBalance) : '-'}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t('backtest.profitAmount')}>
|
||||
<span style={{ color: detailTask.profitAmount && parseFloat(detailTask.profitAmount) >= 0 ? '#52c41a' : '#ff4d4f' }}>
|
||||
{detailTask.profitAmount ? formatUSDC(detailTask.profitAmount) + ' USDC' : '-'}
|
||||
{detailTask.profitAmount ? '$' + formatUSDC(detailTask.profitAmount) : '-'}
|
||||
</span>
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t('backtest.profitRate')}>
|
||||
@@ -1439,17 +1439,17 @@ const BacktestList: React.FC = () => {
|
||||
<Descriptions.Item label={t('backtest.copyMode')}>
|
||||
{detailConfig.copyMode === 'RATIO'
|
||||
? `${t('backtest.copyModeRatio')} ${parseFloat(detailConfig.copyRatio) * 100}%`
|
||||
: `${t('backtest.copyModeFixed')} ${formatUSDC(detailConfig.fixedAmount)} USDC`
|
||||
: `${t('backtest.copyModeFixed')} $${formatUSDC(detailConfig.fixedAmount)}`
|
||||
}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t('backtest.maxOrderSize')}>
|
||||
{formatUSDC(detailConfig.maxOrderSize)} USDC
|
||||
{'$' + formatUSDC(detailConfig.maxOrderSize)}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t('backtest.minOrderSize')}>
|
||||
{formatUSDC(detailConfig.minOrderSize)} USDC
|
||||
{'$' + formatUSDC(detailConfig.minOrderSize)}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t('backtest.maxDailyLoss')}>
|
||||
{formatUSDC(detailConfig.maxDailyLoss)} USDC
|
||||
{'$' + formatUSDC(detailConfig.maxDailyLoss)}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t('backtest.maxDailyOrders')}>
|
||||
{detailConfig.maxDailyOrders}
|
||||
@@ -1471,7 +1471,7 @@ const BacktestList: React.FC = () => {
|
||||
)}
|
||||
{detailConfig.maxPositionValue && (
|
||||
<Descriptions.Item label={t('backtest.maxPositionValue')}>
|
||||
{formatUSDC(detailConfig.maxPositionValue)} USDC
|
||||
{'$' + formatUSDC(detailConfig.maxPositionValue)}
|
||||
</Descriptions.Item>
|
||||
)}
|
||||
{(detailConfig.minPrice || detailConfig.maxPrice) && (
|
||||
|
||||
@@ -150,7 +150,7 @@ const CopyTradingBuyOrdersPage: React.FC = () => {
|
||||
const amount = (parseFloat(record.quantity) * parseFloat(record.price)).toString()
|
||||
return (
|
||||
<span style={{ fontSize: isMobile ? 12 : 14 }}>
|
||||
{isMobile ? formatUSDC(amount) : `${formatUSDC(amount)} USDC`}
|
||||
{isMobile ? formatUSDC(amount) : `$${formatUSDC(amount)}`}
|
||||
</span>
|
||||
)
|
||||
}
|
||||
@@ -305,7 +305,7 @@ const CopyTradingBuyOrdersPage: React.FC = () => {
|
||||
数量: {formatUSDC(order.quantity)} | 价格: {formatUSDC(order.price)}
|
||||
</div>
|
||||
<div style={{ fontSize: '14px', fontWeight: '500', marginTop: '4px' }}>
|
||||
金额: {formatUSDC(amount)} USDC
|
||||
金额: ${formatUSDC(amount)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -279,7 +279,7 @@ const CopyTradingList: React.FC = () => {
|
||||
fontSize: isMobile ? 12 : 14
|
||||
}}>
|
||||
{getPnlIcon(stats.totalPnl)}
|
||||
{isMobile ? formatUSDC(stats.totalPnl) : `${formatUSDC(stats.totalPnl)} USDC`}
|
||||
{isMobile ? formatUSDC(stats.totalPnl) : `$${formatUSDC(stats.totalPnl)}`}
|
||||
</div>
|
||||
{!isMobile && (
|
||||
<div style={{
|
||||
@@ -520,7 +520,7 @@ const CopyTradingList: React.FC = () => {
|
||||
<div style={{ fontSize: '12px', opacity: '0.9' }}>
|
||||
{record.copyMode === 'RATIO'
|
||||
? `${t('copyTradingList.ratioMode') || '比例'} ${(parseFloat(record.copyRatio || '0') * 100).toFixed(0).replace(/\.0+$/, '')}%`
|
||||
: `${t('copyTradingList.fixedAmountMode') || '固定'} ${formatUSDC(record.fixedAmount || '0')} USDC`
|
||||
: `${t('copyTradingList.fixedAmountMode') || '固定'} $${formatUSDC(record.fixedAmount || '0')}`
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
@@ -549,7 +549,7 @@ const CopyTradingList: React.FC = () => {
|
||||
gap: '4px'
|
||||
}}>
|
||||
{getPnlIcon(stats.totalPnl)}
|
||||
{formatUSDC(stats.totalPnl)} USDC
|
||||
${formatUSDC(stats.totalPnl)}
|
||||
</div>
|
||||
) : loadingStatistics.has(record.id) ? (
|
||||
<Spin size="small" />
|
||||
|
||||
@@ -130,7 +130,7 @@ const CopyTradingMatchedOrdersPage: React.FC = () => {
|
||||
fontWeight: 500,
|
||||
fontSize: isMobile ? 12 : 14
|
||||
}}>
|
||||
{isMobile ? formatUSDC(value) : `${formatUSDC(value)} USDC`}
|
||||
{isMobile ? formatUSDC(value) : `$${formatUSDC(value)}`}
|
||||
</span>
|
||||
)
|
||||
},
|
||||
@@ -262,7 +262,7 @@ const CopyTradingMatchedOrdersPage: React.FC = () => {
|
||||
fontWeight: 'bold',
|
||||
color: getPnlColor(order.realizedPnl)
|
||||
}}>
|
||||
{formatUSDC(order.realizedPnl)} USDC
|
||||
${formatUSDC(order.realizedPnl)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -518,7 +518,7 @@ const AddModal: React.FC<AddModalProps> = ({
|
||||
value={parseFloat(leaderAssetInfo.total)}
|
||||
precision={4}
|
||||
valueStyle={{ color: '#52c41a', fontWeight: 'bold', fontSize: '16px' }}
|
||||
suffix="USDC"
|
||||
prefix="$"
|
||||
formatter={(value) => formatUSDC(value?.toString() || '0')}
|
||||
/>
|
||||
</Col>
|
||||
@@ -528,7 +528,7 @@ const AddModal: React.FC<AddModalProps> = ({
|
||||
value={parseFloat(leaderAssetInfo.available)}
|
||||
precision={4}
|
||||
valueStyle={{ color: '#1890ff', fontSize: '14px' }}
|
||||
suffix="USDC"
|
||||
prefix="$"
|
||||
formatter={(value) => formatUSDC(value?.toString() || '0')}
|
||||
/>
|
||||
</Col>
|
||||
@@ -538,7 +538,7 @@ const AddModal: React.FC<AddModalProps> = ({
|
||||
value={parseFloat(leaderAssetInfo.position)}
|
||||
precision={4}
|
||||
valueStyle={{ color: '#722ed1', fontSize: '14px' }}
|
||||
suffix="USDC"
|
||||
prefix="$"
|
||||
formatter={(value) => formatUSDC(value?.toString() || '0')}
|
||||
/>
|
||||
</Col>
|
||||
@@ -606,7 +606,7 @@ const AddModal: React.FC<AddModalProps> = ({
|
||||
|
||||
{copyMode === 'FIXED' && (
|
||||
<Form.Item
|
||||
label={t('copyTradingAdd.fixedAmount') || '固定跟单金额 (USDC)'}
|
||||
label={t('copyTradingAdd.fixedAmount') || '固定跟单金额 ($)'}
|
||||
name="fixedAmount"
|
||||
rules={[
|
||||
{ required: true, message: t('copyTradingAdd.fixedAmountRequired') || '请输入固定跟单金额' },
|
||||
@@ -645,7 +645,7 @@ const AddModal: React.FC<AddModalProps> = ({
|
||||
{copyMode === 'RATIO' && (
|
||||
<>
|
||||
<Form.Item
|
||||
label={t('copyTradingAdd.maxOrderSize') || '单笔订单最大金额 (USDC)'}
|
||||
label={t('copyTradingAdd.maxOrderSize') || '单笔订单最大金额 ($)'}
|
||||
name="maxOrderSize"
|
||||
tooltip={t('copyTradingAdd.maxOrderSizeTooltip') || '比例模式下,限制单笔跟单订单的最大金额上限'}
|
||||
>
|
||||
@@ -665,7 +665,7 @@ const AddModal: React.FC<AddModalProps> = ({
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
label={t('copyTradingAdd.minOrderSize') || '单笔订单最小金额 (USDC)'}
|
||||
label={t('copyTradingAdd.minOrderSize') || '单笔订单最小金额 ($)'}
|
||||
name="minOrderSize"
|
||||
tooltip={t('copyTradingAdd.minOrderSizeTooltip') || '比例模式下,限制单笔跟单订单的最小金额下限,必须 >= 1'}
|
||||
rules={[
|
||||
@@ -700,7 +700,7 @@ const AddModal: React.FC<AddModalProps> = ({
|
||||
)}
|
||||
|
||||
<Form.Item
|
||||
label={t('copyTradingAdd.maxDailyLoss') || '每日最大亏损限制 (USDC)'}
|
||||
label={t('copyTradingAdd.maxDailyLoss') || '每日最大亏损限制 ($)'}
|
||||
name="maxDailyLoss"
|
||||
tooltip={t('copyTradingAdd.maxDailyLossTooltip') || '限制每日最大亏损金额,用于风险控制'}
|
||||
>
|
||||
@@ -709,7 +709,7 @@ const AddModal: React.FC<AddModalProps> = ({
|
||||
step={0.0001}
|
||||
precision={4}
|
||||
style={{ width: '100%' }}
|
||||
placeholder={t('copyTradingAdd.maxDailyLossPlaceholder') || '默认 10000 USDC(可选)'}
|
||||
placeholder={t('copyTradingAdd.maxDailyLossPlaceholder') || '默认 10000 $(可选)'}
|
||||
formatter={(value) => {
|
||||
if (!value && value !== 0) return ''
|
||||
const num = parseFloat(value.toString())
|
||||
@@ -767,7 +767,7 @@ const AddModal: React.FC<AddModalProps> = ({
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
label={t('copyTradingAdd.minOrderDepth') || '最小订单深度 (USDC)'}
|
||||
label={t('copyTradingAdd.minOrderDepth') || '最小订单深度 ($)'}
|
||||
name="minOrderDepth"
|
||||
tooltip={t('copyTradingAdd.minOrderDepthTooltip') || '检查订单簿的总订单金额(买盘+卖盘),确保市场有足够的流动性。不填写则不启用此过滤'}
|
||||
>
|
||||
@@ -853,7 +853,7 @@ const AddModal: React.FC<AddModalProps> = ({
|
||||
<Divider>{t('copyTradingAdd.positionLimitFilter') || '最大仓位限制'}</Divider>
|
||||
|
||||
<Form.Item
|
||||
label={t('copyTradingAdd.maxPositionValue') || '最大仓位金额 (USDC)'}
|
||||
label={t('copyTradingAdd.maxPositionValue') || '最大仓位金额 ($)'}
|
||||
name="maxPositionValue"
|
||||
tooltip={t('copyTradingAdd.maxPositionValueTooltip') || '限制单个市场的最大仓位金额。如果该市场的当前仓位金额 + 跟单金额超过此限制,则不会下单。不填写则不启用此限制'}
|
||||
>
|
||||
@@ -1082,7 +1082,7 @@ const AddModal: React.FC<AddModalProps> = ({
|
||||
<span>
|
||||
{record.copyMode === 'RATIO'
|
||||
? `${t('copyTradingAdd.ratioMode') || '比例'} ${record.copyRatio}x`
|
||||
: `${t('copyTradingAdd.fixedAmountMode') || '固定'} ${formatUSDC(record.fixedAmount || '0')} USDC`
|
||||
: `${t('copyTradingAdd.fixedAmountMode') || '固定'} $${formatUSDC(record.fixedAmount || '0')}`
|
||||
}
|
||||
</span>
|
||||
)
|
||||
|
||||
@@ -261,7 +261,7 @@ const BuyOrdersTab: React.FC<BuyOrdersTabProps> = ({ copyTradingId, active = fal
|
||||
const amount = (parseFloat(record.quantity) * parseFloat(record.price)).toString()
|
||||
return (
|
||||
<span style={{ fontSize: isMobile ? 12 : 14 }}>
|
||||
{isMobile ? formatUSDC(amount) : `${formatUSDC(amount)} USDC`}
|
||||
{isMobile ? formatUSDC(amount) : `$${formatUSDC(amount)}`}
|
||||
</span>
|
||||
)
|
||||
}
|
||||
@@ -384,7 +384,7 @@ const BuyOrdersTab: React.FC<BuyOrdersTabProps> = ({ copyTradingId, active = fal
|
||||
</div>
|
||||
<div style={{ display: 'flex', gap: '16px', flexWrap: 'wrap', fontSize: isMobile ? '12px' : '13px', color: '#666' }}>
|
||||
<span>{t('copyTradingOrders.orderCount') || '订单数'}: {group.stats.count}</span>
|
||||
<span>{t('copyTradingOrders.totalAmount') || '总金额'}: {formatUSDC(group.stats.totalAmount)} USDC</span>
|
||||
<span>{t('copyTradingOrders.totalAmount') || '总金额'}: ${formatUSDC(group.stats.totalAmount)}</span>
|
||||
<span>
|
||||
{t('copyTradingOrders.statusBreakdown') || '状态'}:
|
||||
{group.stats.fullyMatchedCount > 0 && ` ${t('copyTradingOrders.allFullySold') || '全部卖出'} ${group.stats.fullyMatchedCount}`}
|
||||
@@ -460,7 +460,7 @@ const BuyOrdersTab: React.FC<BuyOrdersTabProps> = ({ copyTradingId, active = fal
|
||||
|
||||
<div style={{ fontSize: '12px', color: '#666' }}>
|
||||
<div>{t('copyTradingOrders.quantity') || '数量'}: {formatUSDC(order.quantity)} | {t('copyTradingOrders.price') || '价格'}: {formatUSDC(order.price)}</div>
|
||||
<div>{t('copyTradingOrders.amount') || '金额'}: {formatUSDC(amount)} USDC</div>
|
||||
<div>{t('copyTradingOrders.amount') || '金额'}: ${formatUSDC(amount)}</div>
|
||||
<div>{t('copyTradingOrders.matched') || '已匹配'}: {formatUSDC(order.matchedQuantity)} | {t('copyTradingOrders.remaining') || '剩余'}: {formatUSDC(order.remainingQuantity)}</div>
|
||||
<div style={{ color: '#999', marginTop: '4px' }}>{formattedDate}</div>
|
||||
</div>
|
||||
@@ -557,7 +557,7 @@ const BuyOrdersTab: React.FC<BuyOrdersTabProps> = ({ copyTradingId, active = fal
|
||||
{t('copyTradingOrders.quantity') || '数量'}: {formatUSDC(order.quantity)} | {t('copyTradingOrders.price') || '价格'}: {formatUSDC(order.price)}
|
||||
</div>
|
||||
<div style={{ fontSize: '14px', fontWeight: '500', marginTop: '4px' }}>
|
||||
{t('copyTradingOrders.amount') || '金额'}: {formatUSDC(amount)} USDC
|
||||
{t('copyTradingOrders.amount') || '金额'}: ${formatUSDC(amount)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -356,7 +356,7 @@ const EditModal: React.FC<EditModalProps> = ({
|
||||
value={parseFloat(leaderAssetInfo.total)}
|
||||
precision={4}
|
||||
valueStyle={{ color: '#52c41a', fontWeight: 'bold', fontSize: '16px' }}
|
||||
suffix="USDC"
|
||||
prefix="$"
|
||||
formatter={(value) => formatUSDC(value?.toString() || '0')}
|
||||
/>
|
||||
</Col>
|
||||
@@ -366,7 +366,7 @@ const EditModal: React.FC<EditModalProps> = ({
|
||||
value={parseFloat(leaderAssetInfo.available)}
|
||||
precision={4}
|
||||
valueStyle={{ color: '#1890ff', fontSize: '14px' }}
|
||||
suffix="USDC"
|
||||
prefix="$"
|
||||
formatter={(value) => formatUSDC(value?.toString() || '0')}
|
||||
/>
|
||||
</Col>
|
||||
@@ -376,7 +376,7 @@ const EditModal: React.FC<EditModalProps> = ({
|
||||
value={parseFloat(leaderAssetInfo.position)}
|
||||
precision={4}
|
||||
valueStyle={{ color: '#722ed1', fontSize: '14px' }}
|
||||
suffix="USDC"
|
||||
prefix="$"
|
||||
formatter={(value) => formatUSDC(value?.toString() || '0')}
|
||||
/>
|
||||
</Col>
|
||||
@@ -456,7 +456,7 @@ const EditModal: React.FC<EditModalProps> = ({
|
||||
|
||||
{copyMode === 'FIXED' && (
|
||||
<Form.Item
|
||||
label={t('copyTradingEdit.fixedAmount') || '固定跟单金额 (USDC)'}
|
||||
label={t('copyTradingEdit.fixedAmount') || '固定跟单金额 ($)'}
|
||||
name="fixedAmount"
|
||||
rules={[
|
||||
{ required: true, message: t('copyTradingEdit.fixedAmountRequired') || '请输入固定跟单金额' },
|
||||
@@ -495,7 +495,7 @@ const EditModal: React.FC<EditModalProps> = ({
|
||||
{copyMode === 'RATIO' && (
|
||||
<>
|
||||
<Form.Item
|
||||
label={t('copyTradingEdit.maxOrderSize') || '单笔订单最大金额 (USDC)'}
|
||||
label={t('copyTradingEdit.maxOrderSize') || '单笔订单最大金额 ($)'}
|
||||
name="maxOrderSize"
|
||||
tooltip={t('copyTradingEdit.maxOrderSizeTooltip') || '比例模式下,限制单笔跟单订单的最大金额上限'}
|
||||
>
|
||||
@@ -515,7 +515,7 @@ const EditModal: React.FC<EditModalProps> = ({
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
label={t('copyTradingEdit.minOrderSize') || '单笔订单最小金额 (USDC)'}
|
||||
label={t('copyTradingEdit.minOrderSize') || '单笔订单最小金额 ($)'}
|
||||
name="minOrderSize"
|
||||
tooltip={t('copyTradingEdit.minOrderSizeTooltip') || '比例模式下,限制单笔跟单订单的最小金额下限,必须 >= 1'}
|
||||
rules={[
|
||||
@@ -550,7 +550,7 @@ const EditModal: React.FC<EditModalProps> = ({
|
||||
)}
|
||||
|
||||
<Form.Item
|
||||
label={t('copyTradingEdit.maxDailyLoss') || '每日最大亏损限制 (USDC)'}
|
||||
label={t('copyTradingEdit.maxDailyLoss') || '每日最大亏损限制 ($)'}
|
||||
name="maxDailyLoss"
|
||||
tooltip={t('copyTradingEdit.maxDailyLossTooltip') || '限制每日最大亏损金额,用于风险控制'}
|
||||
>
|
||||
@@ -559,7 +559,7 @@ const EditModal: React.FC<EditModalProps> = ({
|
||||
step={0.0001}
|
||||
precision={4}
|
||||
style={{ width: '100%' }}
|
||||
placeholder={t('copyTradingEdit.maxDailyLossPlaceholder') || '默认 10000 USDC(可选)'}
|
||||
placeholder={t('copyTradingEdit.maxDailyLossPlaceholder') || '默认 10000 $(可选)'}
|
||||
formatter={(value) => {
|
||||
if (!value && value !== 0) return ''
|
||||
const num = parseFloat(value.toString())
|
||||
@@ -617,7 +617,7 @@ const EditModal: React.FC<EditModalProps> = ({
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
label={t('copyTradingEdit.minOrderDepth') || '最小订单深度 (USDC)'}
|
||||
label={t('copyTradingEdit.minOrderDepth') || '最小订单深度 ($)'}
|
||||
name="minOrderDepth"
|
||||
tooltip={t('copyTradingEdit.minOrderDepthTooltip') || '检查订单簿的总订单金额(买盘+卖盘),确保市场有足够的流动性。不填写则不启用此过滤'}
|
||||
>
|
||||
@@ -703,7 +703,7 @@ const EditModal: React.FC<EditModalProps> = ({
|
||||
<Divider>{t('copyTradingEdit.positionLimitFilter') || '最大仓位限制'}</Divider>
|
||||
|
||||
<Form.Item
|
||||
label={t('copyTradingEdit.maxPositionValue') || '最大仓位金额 (USDC)'}
|
||||
label={t('copyTradingEdit.maxPositionValue') || '最大仓位金额 ($)'}
|
||||
name="maxPositionValue"
|
||||
tooltip={t('copyTradingEdit.maxPositionValueTooltip') || '限制单个市场的最大仓位金额。如果该市场的当前仓位金额 + 跟单金额超过此限制,则不会下单。不填写则不启用此限制'}
|
||||
>
|
||||
|
||||
@@ -228,7 +228,7 @@ const MatchedOrdersTab: React.FC<MatchedOrdersTabProps> = ({ copyTradingId, acti
|
||||
fontWeight: 500,
|
||||
fontSize: isMobile ? 12 : 14
|
||||
}}>
|
||||
{isMobile ? formatUSDC(value) : `${formatUSDC(value)} USDC`}
|
||||
{isMobile ? formatUSDC(value) : `$${formatUSDC(value)}`}
|
||||
</span>
|
||||
)
|
||||
},
|
||||
@@ -408,7 +408,7 @@ const MatchedOrdersTab: React.FC<MatchedOrdersTabProps> = ({ copyTradingId, acti
|
||||
fontWeight: 'bold',
|
||||
color: getPnlColor(order.realizedPnl)
|
||||
}}>
|
||||
{formatUSDC(order.realizedPnl)} USDC
|
||||
${formatUSDC(order.realizedPnl)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -258,7 +258,7 @@ const SellOrdersTab: React.FC<SellOrdersTabProps> = ({ copyTradingId, active = f
|
||||
const amount = (parseFloat(record.quantity) * parseFloat(record.price)).toString()
|
||||
return (
|
||||
<span style={{ fontSize: isMobile ? 12 : 14 }}>
|
||||
{isMobile ? formatUSDC(amount) : `${formatUSDC(amount)} USDC`}
|
||||
{isMobile ? formatUSDC(amount) : `$${formatUSDC(amount)}`}
|
||||
</span>
|
||||
)
|
||||
}
|
||||
@@ -274,7 +274,7 @@ const SellOrdersTab: React.FC<SellOrdersTabProps> = ({ copyTradingId, active = f
|
||||
fontWeight: 500,
|
||||
fontSize: isMobile ? 12 : 14
|
||||
}}>
|
||||
{isMobile ? formatUSDC(value) : `${formatUSDC(value)} USDC`}
|
||||
{isMobile ? formatUSDC(value) : `$${formatUSDC(value)}`}
|
||||
</span>
|
||||
)
|
||||
},
|
||||
@@ -362,10 +362,10 @@ const SellOrdersTab: React.FC<SellOrdersTabProps> = ({ copyTradingId, active = f
|
||||
</div>
|
||||
<div style={{ display: 'flex', gap: '16px', flexWrap: 'wrap', fontSize: isMobile ? '12px' : '13px', color: '#666' }}>
|
||||
<span>{t('copyTradingOrders.orderCount') || '订单数'}: {group.stats.count}</span>
|
||||
<span>{t('copyTradingOrders.totalAmount') || '总金额'}: {formatUSDC(group.stats.totalAmount)} USDC</span>
|
||||
<span>{t('copyTradingOrders.totalAmount') || '总金额'}: ${formatUSDC(group.stats.totalAmount)}</span>
|
||||
{group.stats.totalPnl && (
|
||||
<span style={{ color: pnlColor, fontWeight: 500 }}>
|
||||
{t('copyTradingOrders.totalPnl') || '总盈亏'}: {formatUSDC(group.stats.totalPnl)} USDC
|
||||
{t('copyTradingOrders.totalPnl') || '总盈亏'}: ${formatUSDC(group.stats.totalPnl)}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
@@ -434,9 +434,9 @@ const SellOrdersTab: React.FC<SellOrdersTabProps> = ({ copyTradingId, active = f
|
||||
|
||||
<div style={{ fontSize: '12px', color: '#666' }}>
|
||||
<div>{t('copyTradingOrders.quantity') || '数量'}: {formatUSDC(order.quantity)} | {t('copyTradingOrders.price') || '价格'}: {formatUSDC(order.price)}</div>
|
||||
<div>{t('copyTradingOrders.amount') || '金额'}: {formatUSDC(amount)} USDC</div>
|
||||
<div>{t('copyTradingOrders.amount') || '金额'}: ${formatUSDC(amount)}</div>
|
||||
<div style={{ color: getPnlColor(order.realizedPnl), fontWeight: 500 }}>
|
||||
{t('copyTradingOrders.realizedPnl') || '已实现盈亏'}: {formatUSDC(order.realizedPnl)} USDC
|
||||
{t('copyTradingOrders.realizedPnl') || '已实现盈亏'}: ${formatUSDC(order.realizedPnl)}
|
||||
</div>
|
||||
<div style={{ color: '#999', marginTop: '4px' }}>{formattedDate}</div>
|
||||
</div>
|
||||
@@ -530,7 +530,7 @@ const SellOrdersTab: React.FC<SellOrdersTabProps> = ({ copyTradingId, active = f
|
||||
{t('copyTradingOrders.quantity') || '数量'}: {formatUSDC(order.quantity)} | {t('copyTradingOrders.price') || '价格'}: {formatUSDC(order.price)}
|
||||
</div>
|
||||
<div style={{ fontSize: '14px', fontWeight: '500', marginTop: '4px' }}>
|
||||
{t('copyTradingOrders.amount') || '金额'}: {formatUSDC(amount)} USDC
|
||||
{t('copyTradingOrders.amount') || '金额'}: ${formatUSDC(amount)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -541,7 +541,7 @@ const SellOrdersTab: React.FC<SellOrdersTabProps> = ({ copyTradingId, active = f
|
||||
fontWeight: 'bold',
|
||||
color: getPnlColor(order.realizedPnl)
|
||||
}}>
|
||||
{formatUSDC(order.realizedPnl)} USDC
|
||||
${formatUSDC(order.realizedPnl)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ const StatisticsModal: React.FC<StatisticsModalProps> = ({
|
||||
</div>
|
||||
<div style={{ fontSize: '16px', fontWeight: '500', color: '#333', flex: '1', textAlign: 'right', display: 'flex', alignItems: 'center', justifyContent: 'flex-end', gap: '4px' }}>
|
||||
<ArrowUpOutlined style={{ color: '#1890ff', fontSize: '14px' }} />
|
||||
<span style={{ fontSize: 'clamp(12px, 4vw, 16px)' }}>{formatUSDC(statistics.totalBuyAmount)} USDC</span>
|
||||
<span style={{ fontSize: 'clamp(12px, 4vw, 16px)' }}>${formatUSDC(statistics.totalBuyAmount)}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '12px', borderBottom: '1px solid #f0f0f0' }}>
|
||||
@@ -113,7 +113,7 @@ const StatisticsModal: React.FC<StatisticsModalProps> = ({
|
||||
</div>
|
||||
<div style={{ fontSize: '16px', fontWeight: '500', color: '#333', flex: '1', textAlign: 'right', display: 'flex', alignItems: 'center', justifyContent: 'flex-end', gap: '4px' }}>
|
||||
<ArrowDownOutlined style={{ color: '#ff4d4f', fontSize: '14px' }} />
|
||||
<span style={{ fontSize: 'clamp(12px, 4vw, 16px)' }}>{formatUSDC(statistics.totalSellAmount)} USDC</span>
|
||||
<span style={{ fontSize: 'clamp(12px, 4vw, 16px)' }}>${formatUSDC(statistics.totalSellAmount)}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '12px', borderBottom: '1px solid #f0f0f0' }}>
|
||||
@@ -122,7 +122,7 @@ const StatisticsModal: React.FC<StatisticsModalProps> = ({
|
||||
</div>
|
||||
<div style={{ fontSize: '16px', fontWeight: 'bold', color: getPnlColor(statistics.totalPnl), flex: '1', textAlign: 'right', display: 'flex', alignItems: 'center', justifyContent: 'flex-end', gap: '4px' }}>
|
||||
{getPnlIcon(statistics.totalPnl)}
|
||||
<span style={{ fontSize: 'clamp(12px, 4vw, 16px)' }}>{formatUSDC(statistics.totalPnl)} USDC</span>
|
||||
<span style={{ fontSize: 'clamp(12px, 4vw, 16px)' }}>${formatUSDC(statistics.totalPnl)}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '12px', borderBottom: '1px solid #f0f0f0' }}>
|
||||
@@ -131,7 +131,7 @@ const StatisticsModal: React.FC<StatisticsModalProps> = ({
|
||||
</div>
|
||||
<div style={{ fontSize: '16px', fontWeight: '500', color: getPnlColor(statistics.totalRealizedPnl), flex: '1', textAlign: 'right', display: 'flex', alignItems: 'center', justifyContent: 'flex-end', gap: '4px' }}>
|
||||
{getPnlIcon(statistics.totalRealizedPnl)}
|
||||
<span style={{ fontSize: 'clamp(12px, 4vw, 16px)' }}>{formatUSDC(statistics.totalRealizedPnl)} USDC</span>
|
||||
<span style={{ fontSize: 'clamp(12px, 4vw, 16px)' }}>${formatUSDC(statistics.totalRealizedPnl)}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '12px', borderBottom: '1px solid #f0f0f0' }}>
|
||||
@@ -140,7 +140,7 @@ const StatisticsModal: React.FC<StatisticsModalProps> = ({
|
||||
</div>
|
||||
<div style={{ fontSize: '16px', fontWeight: '500', color: getPnlColor(statistics.totalUnrealizedPnl), flex: '1', textAlign: 'right', display: 'flex', alignItems: 'center', justifyContent: 'flex-end', gap: '4px' }}>
|
||||
{getPnlIcon(statistics.totalUnrealizedPnl)}
|
||||
<span style={{ fontSize: 'clamp(12px, 4vw, 16px)' }}>{formatUSDC(statistics.totalUnrealizedPnl)} USDC</span>
|
||||
<span style={{ fontSize: 'clamp(12px, 4vw, 16px)' }}>${formatUSDC(statistics.totalUnrealizedPnl)}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -165,43 +165,38 @@ const StatisticsModal: React.FC<StatisticsModalProps> = ({
|
||||
<Statistic
|
||||
title={t('copyTradingOrders.totalBuyAmount') || '总买入金额'}
|
||||
value={formatUSDC(statistics.totalBuyAmount)}
|
||||
suffix="USDC"
|
||||
prefix={<ArrowUpOutlined style={{ color: '#1890ff' }} />}
|
||||
prefix={<><ArrowUpOutlined style={{ color: '#1890ff' }} /> $</>}
|
||||
/>
|
||||
</Col>
|
||||
<Col xs={24} sm={12} md={8}>
|
||||
<Statistic
|
||||
title={t('copyTradingOrders.totalSellAmount') || '总卖出金额'}
|
||||
value={formatUSDC(statistics.totalSellAmount)}
|
||||
suffix="USDC"
|
||||
prefix={<ArrowDownOutlined style={{ color: '#ff4d4f' }} />}
|
||||
prefix={<><ArrowDownOutlined style={{ color: '#ff4d4f' }} /> $</>}
|
||||
/>
|
||||
</Col>
|
||||
<Col xs={24} sm={12} md={8}>
|
||||
<Statistic
|
||||
title={t('copyTradingOrders.totalPnl') || '总盈亏'}
|
||||
value={formatUSDC(statistics.totalPnl)}
|
||||
suffix="USDC"
|
||||
valueStyle={{ color: getPnlColor(statistics.totalPnl) }}
|
||||
prefix={getPnlIcon(statistics.totalPnl)}
|
||||
prefix={<>{getPnlIcon(statistics.totalPnl)} $</>}
|
||||
/>
|
||||
</Col>
|
||||
<Col xs={24} sm={12} md={8}>
|
||||
<Statistic
|
||||
title={t('copyTradingOrders.totalRealizedPnl') || '总已实现盈亏'}
|
||||
value={formatUSDC(statistics.totalRealizedPnl)}
|
||||
suffix="USDC"
|
||||
valueStyle={{ color: getPnlColor(statistics.totalRealizedPnl) }}
|
||||
prefix={getPnlIcon(statistics.totalRealizedPnl)}
|
||||
prefix={<>{getPnlIcon(statistics.totalRealizedPnl)} $</>}
|
||||
/>
|
||||
</Col>
|
||||
<Col xs={24} sm={12} md={8}>
|
||||
<Statistic
|
||||
title={t('copyTradingOrders.totalUnrealizedPnl') || '总未实现盈亏'}
|
||||
value={formatUSDC(statistics.totalUnrealizedPnl)}
|
||||
suffix="USDC"
|
||||
valueStyle={{ color: getPnlColor(statistics.totalUnrealizedPnl) }}
|
||||
prefix={getPnlIcon(statistics.totalUnrealizedPnl)}
|
||||
prefix={<>{getPnlIcon(statistics.totalUnrealizedPnl)} $</>}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
@@ -145,7 +145,7 @@ const CopyTradingSellOrdersPage: React.FC = () => {
|
||||
const amount = (parseFloat(record.quantity) * parseFloat(record.price)).toString()
|
||||
return (
|
||||
<span style={{ fontSize: isMobile ? 12 : 14 }}>
|
||||
{isMobile ? formatUSDC(amount) : `${formatUSDC(amount)} USDC`}
|
||||
{isMobile ? formatUSDC(amount) : `$${formatUSDC(amount)}`}
|
||||
</span>
|
||||
)
|
||||
}
|
||||
@@ -161,7 +161,7 @@ const CopyTradingSellOrdersPage: React.FC = () => {
|
||||
fontWeight: 500,
|
||||
fontSize: isMobile ? 12 : 14
|
||||
}}>
|
||||
{isMobile ? formatUSDC(value) : `${formatUSDC(value)} USDC`}
|
||||
{isMobile ? formatUSDC(value) : `$${formatUSDC(value)}`}
|
||||
</span>
|
||||
)
|
||||
},
|
||||
@@ -277,7 +277,7 @@ const CopyTradingSellOrdersPage: React.FC = () => {
|
||||
数量: {formatUSDC(order.quantity)} | 价格: {formatUSDC(order.price)}
|
||||
</div>
|
||||
<div style={{ fontSize: '14px', fontWeight: '500', marginTop: '4px' }}>
|
||||
金额: {formatUSDC(amount)} USDC
|
||||
金额: ${formatUSDC(amount)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -289,7 +289,7 @@ const CopyTradingSellOrdersPage: React.FC = () => {
|
||||
fontWeight: 'bold',
|
||||
color: getPnlColor(order.realizedPnl)
|
||||
}}>
|
||||
{formatUSDC(order.realizedPnl)} USDC
|
||||
${formatUSDC(order.realizedPnl)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ const CopyTradingStatisticsPage: React.FC = () => {
|
||||
<Statistic
|
||||
title="总买入金额"
|
||||
value={formatUSDC(statistics.totalBuyAmount)}
|
||||
suffix="USDC"
|
||||
prefix="$"
|
||||
/>
|
||||
</Col>
|
||||
<Col xs={24} sm={12} md={6}>
|
||||
@@ -179,7 +179,7 @@ const CopyTradingStatisticsPage: React.FC = () => {
|
||||
<Statistic
|
||||
title="总卖出金额"
|
||||
value={formatUSDC(statistics.totalSellAmount)}
|
||||
suffix="USDC"
|
||||
prefix="$"
|
||||
/>
|
||||
</Col>
|
||||
<Col xs={24} sm={12} md={8}>
|
||||
@@ -220,8 +220,7 @@ const CopyTradingStatisticsPage: React.FC = () => {
|
||||
title="总已实现盈亏"
|
||||
value={formatUSDC(statistics.totalRealizedPnl)}
|
||||
valueStyle={{ color: getPnlColor(statistics.totalRealizedPnl) }}
|
||||
prefix={getPnlIcon(statistics.totalRealizedPnl)}
|
||||
suffix="USDC"
|
||||
prefix={<>{getPnlIcon(statistics.totalRealizedPnl)} $</>}
|
||||
/>
|
||||
</Col>
|
||||
<Col xs={24} sm={12} md={6}>
|
||||
@@ -229,8 +228,7 @@ const CopyTradingStatisticsPage: React.FC = () => {
|
||||
title="总未实现盈亏"
|
||||
value={formatUSDC(statistics.totalUnrealizedPnl)}
|
||||
valueStyle={{ color: getPnlColor(statistics.totalUnrealizedPnl) }}
|
||||
prefix={getPnlIcon(statistics.totalUnrealizedPnl)}
|
||||
suffix="USDC"
|
||||
prefix={<>{getPnlIcon(statistics.totalUnrealizedPnl)} $</>}
|
||||
/>
|
||||
</Col>
|
||||
<Col xs={24} sm={12} md={6}>
|
||||
@@ -238,8 +236,7 @@ const CopyTradingStatisticsPage: React.FC = () => {
|
||||
title="总盈亏"
|
||||
value={formatUSDC(statistics.totalPnl)}
|
||||
valueStyle={{ color: getPnlColor(statistics.totalPnl) }}
|
||||
prefix={getPnlIcon(statistics.totalPnl)}
|
||||
suffix="USDC"
|
||||
prefix={<>{getPnlIcon(statistics.totalPnl)} $</>}
|
||||
/>
|
||||
</Col>
|
||||
<Col xs={24} sm={12} md={6}>
|
||||
|
||||
@@ -493,7 +493,7 @@ const CryptoTailMonitor: React.FC = () => {
|
||||
} else {
|
||||
timeStr = '--'
|
||||
}
|
||||
return `<span style="font-size:12px">${timeStr} ${Number(val).toFixed(2)} USDC</span>`
|
||||
return `<span style="font-size:12px">${timeStr} $${Number(val).toFixed(2)}</span>`
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
|
||||
@@ -45,12 +45,12 @@ const CryptoTailPnlCurveModal: React.FC<CryptoTailPnlCurveModalProps> = (props)
|
||||
if (!v) return ''
|
||||
const d = data.curveData.find((p) => p.timestamp === v[0])
|
||||
if (!d) return ''
|
||||
return dayjs(v[0]).format('YYYY-MM-DD HH:mm') + '<br/>' + t('cryptoTailStrategy.pnlCurve.totalPnl') + ': ' + formatUSDC(d.cumulativePnl) + ' USDC'
|
||||
return dayjs(v[0]).format('YYYY-MM-DD HH:mm') + '<br/>' + t('cryptoTailStrategy.pnlCurve.totalPnl') + ': $' + formatUSDC(d.cumulativePnl)
|
||||
}
|
||||
},
|
||||
grid: { left: '3%', right: '4%', bottom: '3%', top: '10%', containLabel: true },
|
||||
xAxis: { type: 'time' },
|
||||
yAxis: { type: 'value', axisLabel: { formatter: (val: number) => String(val) + ' USDC' } },
|
||||
yAxis: { type: 'value', axisLabel: { formatter: (val: number) => '$' + String(val) } },
|
||||
series: [{
|
||||
name: t('cryptoTailStrategy.pnlCurve.totalPnl'),
|
||||
type: 'line',
|
||||
@@ -108,7 +108,7 @@ const CryptoTailPnlCurveModal: React.FC<CryptoTailPnlCurveModalProps> = (props)
|
||||
<Statistic
|
||||
title={t('cryptoTailStrategy.pnlCurve.totalPnl')}
|
||||
value={data?.totalRealizedPnl != null ? formatUSDC(data.totalRealizedPnl) : '-'}
|
||||
suffix="USDC"
|
||||
prefix="$"
|
||||
valueStyle={{ color: pnlColor(data?.totalRealizedPnl ?? null) }}
|
||||
/>
|
||||
</Col>
|
||||
@@ -125,7 +125,7 @@ const CryptoTailPnlCurveModal: React.FC<CryptoTailPnlCurveModalProps> = (props)
|
||||
<Statistic
|
||||
title={t('cryptoTailStrategy.pnlCurve.maxDrawdown')}
|
||||
value={data?.maxDrawdown != null ? '-' + formatUSDC(data.maxDrawdown) : '-'}
|
||||
suffix="USDC"
|
||||
prefix="$"
|
||||
valueStyle={{ color: data?.maxDrawdown ? '#ff4d4f' : undefined }}
|
||||
/>
|
||||
</Col>
|
||||
|
||||
@@ -773,7 +773,7 @@ const CryptoTailStrategyList: React.FC = () => {
|
||||
<div>
|
||||
<div style={{ fontSize: '10px', color: '#8c8c8c' }}>{t('cryptoTailStrategy.list.totalRealizedPnl')}</div>
|
||||
{item.totalRealizedPnl != null ? (
|
||||
<div style={{ fontSize: '14px', fontWeight: '600', color: pnlColor(item.totalRealizedPnl) }}>{formatUSDC(item.totalRealizedPnl)} USDC</div>
|
||||
<div style={{ fontSize: '14px', fontWeight: '600', color: pnlColor(item.totalRealizedPnl) }}>${formatUSDC(item.totalRealizedPnl)}</div>
|
||||
) : (
|
||||
<div style={{ fontSize: '14px', color: '#8c8c8c' }}>-</div>
|
||||
)}
|
||||
@@ -966,7 +966,7 @@ const CryptoTailStrategyList: React.FC = () => {
|
||||
</Form.Item>
|
||||
) : (
|
||||
<Form.Item name="amountValue" label={t('cryptoTailStrategy.form.fixedUsdc')} rules={[{ required: true }]}>
|
||||
<InputNumber min={1} style={{ width: '100%' }} addonAfter="USDC" stringMode />
|
||||
<InputNumber min={1} style={{ width: '100%' }} addonBefore="$" stringMode />
|
||||
</Form.Item>
|
||||
)
|
||||
}
|
||||
@@ -1111,7 +1111,7 @@ const CryptoTailStrategyList: React.FC = () => {
|
||||
dataIndex: 'amountUsdc',
|
||||
key: 'amountUsdc',
|
||||
width: 110,
|
||||
render: (v: string) => `${formatUSDC(v)} USDC`
|
||||
render: (v: string) => `$${formatUSDC(v)}`
|
||||
},
|
||||
{
|
||||
title: t('cryptoTailStrategy.triggerRecords.realizedPnl'),
|
||||
@@ -1186,7 +1186,7 @@ const CryptoTailStrategyList: React.FC = () => {
|
||||
dataIndex: 'amountUsdc',
|
||||
key: 'amountUsdc',
|
||||
width: 110,
|
||||
render: (v: string) => `${formatUSDC(v)} USDC`
|
||||
render: (v: string) => `$${formatUSDC(v)}`
|
||||
},
|
||||
{
|
||||
title: t('cryptoTailStrategy.triggerRecords.failReason'),
|
||||
|
||||
@@ -254,7 +254,7 @@ const LeaderList: React.FC = () => {
|
||||
return (
|
||||
<Space direction="vertical" size={0}>
|
||||
<Text style={{ color: '#52c41a', fontSize: '14px', fontWeight: '500' }}>
|
||||
{balance.available === '-' ? '-' : `${formatUSDC(balance.available)} USDC`}
|
||||
{balance.available === '-' ? '-' : `$${formatUSDC(balance.available)}`}
|
||||
</Text>
|
||||
<Text type="secondary" style={{ fontSize: '12px' }}>
|
||||
{t('leaderDetail.positionBalance')}: {formatUSDC(balance.position)}
|
||||
@@ -488,7 +488,7 @@ const LeaderList: React.FC = () => {
|
||||
{t('leaderDetail.availableBalance')}
|
||||
</div>
|
||||
<div style={{ fontSize: '14px', fontWeight: '600', color: '#52c41a' }}>
|
||||
{balance?.available && balance.available !== '-' ? `${formatUSDC(balance.available)} USDC` : '- USDC'}
|
||||
{balance?.available && balance.available !== '-' ? `$${formatUSDC(balance.available)}` : '-'}
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ textAlign: 'right' }}>
|
||||
@@ -700,7 +700,7 @@ const LeaderList: React.FC = () => {
|
||||
value={parseFloat(detailBalance.availableBalance)}
|
||||
precision={4}
|
||||
valueStyle={{ color: '#1890ff' }}
|
||||
suffix="USDC"
|
||||
prefix="$"
|
||||
formatter={(value) => formatUSDC(value?.toString() || '0')}
|
||||
/>
|
||||
</Card>
|
||||
@@ -712,7 +712,7 @@ const LeaderList: React.FC = () => {
|
||||
value={parseFloat(detailBalance.positionBalance)}
|
||||
precision={4}
|
||||
valueStyle={{ color: '#722ed1' }}
|
||||
suffix="USDC"
|
||||
prefix="$"
|
||||
formatter={(value) => formatUSDC(value?.toString() || '0')}
|
||||
/>
|
||||
</Card>
|
||||
@@ -724,7 +724,7 @@ const LeaderList: React.FC = () => {
|
||||
value={parseFloat(detailBalance.totalBalance)}
|
||||
precision={4}
|
||||
valueStyle={{ color: '#52c41a', fontWeight: 'bold' }}
|
||||
suffix="USDC"
|
||||
prefix="$"
|
||||
formatter={(value) => formatUSDC(value?.toString() || '0')}
|
||||
/>
|
||||
</Card>
|
||||
|
||||
@@ -118,7 +118,7 @@ const OrderList: React.FC = () => {
|
||||
key: 'pnl',
|
||||
render: (pnl: string | undefined) => pnl ? (
|
||||
<span style={{ color: pnl.startsWith('-') ? 'red' : 'green' }}>
|
||||
{formatUSDC(pnl)} USDC
|
||||
${formatUSDC(pnl)}
|
||||
</span>
|
||||
) : '-'
|
||||
},
|
||||
|
||||
@@ -695,7 +695,7 @@ const PositionList: React.FC = () => {
|
||||
fontWeight: '500',
|
||||
color: isProfit ? '#52c41a' : '#f5222d'
|
||||
}}>
|
||||
{pnlNum >= 0 ? '+' : ''}{formatUSDC(position.pnl)} USDC
|
||||
{pnlNum >= 0 ? '+' : ''}${formatUSDC(position.pnl)}
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
@@ -718,7 +718,7 @@ const PositionList: React.FC = () => {
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: '8px' }}>
|
||||
<span style={{ fontSize: '13px', color: '#666' }}>开仓价值</span>
|
||||
<span style={{ fontSize: '13px', fontWeight: '500' }}>
|
||||
{formatUSDC(position.initialValue)} USDC
|
||||
${formatUSDC(position.initialValue)}
|
||||
</span>
|
||||
</div>
|
||||
{positionFilter === 'current' && position.currentPrice && (
|
||||
@@ -732,7 +732,7 @@ const PositionList: React.FC = () => {
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: '8px' }}>
|
||||
<span style={{ fontSize: '13px', color: '#666' }}>当前价值</span>
|
||||
<span style={{ fontSize: '13px', fontWeight: '600' }}>
|
||||
{formatUSDC(position.currentValue)} USDC
|
||||
${formatUSDC(position.currentValue)}
|
||||
</span>
|
||||
</div>
|
||||
</>
|
||||
@@ -775,7 +775,7 @@ const PositionList: React.FC = () => {
|
||||
fontWeight: 'bold',
|
||||
color: isProfit ? '#52c41a' : '#f5222d'
|
||||
}}>
|
||||
{pnlNum >= 0 ? '+' : ''}{formatUSDC(position.pnl)} USDC
|
||||
{pnlNum >= 0 ? '+' : ''}${formatUSDC(position.pnl)}
|
||||
</span>
|
||||
</div>
|
||||
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
|
||||
@@ -802,7 +802,7 @@ const PositionList: React.FC = () => {
|
||||
color: parseFloat(position.realizedPnl) >= 0 ? '#52c41a' : '#f5222d',
|
||||
fontWeight: '500'
|
||||
}}>
|
||||
{parseFloat(position.realizedPnl) >= 0 ? '+' : ''}{formatUSDC(position.realizedPnl)} USDC
|
||||
{parseFloat(position.realizedPnl) >= 0 ? '+' : ''}${formatUSDC(position.realizedPnl)}
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
@@ -951,7 +951,7 @@ const PositionList: React.FC = () => {
|
||||
dataIndex: 'initialValue',
|
||||
key: 'initialValue',
|
||||
render: (value: string) => (
|
||||
<span>{formatUSDC(value)} USDC</span>
|
||||
<span>${formatUSDC(value)}</span>
|
||||
),
|
||||
align: 'right' as const,
|
||||
width: 110
|
||||
@@ -971,7 +971,7 @@ const PositionList: React.FC = () => {
|
||||
return (
|
||||
<div>
|
||||
<div style={{ fontWeight: '600', marginBottom: '2px' }}>
|
||||
{formatUSDC(record.currentValue)} USDC
|
||||
${formatUSDC(record.currentValue)}
|
||||
</div>
|
||||
<div style={{
|
||||
fontSize: '13px',
|
||||
@@ -1215,7 +1215,7 @@ const PositionList: React.FC = () => {
|
||||
borderColor: '#52c41a'
|
||||
}}
|
||||
>
|
||||
赎回 ({redeemableSummary.totalCount}个, {formatUSDC(redeemableSummary.totalValue)} USDC)
|
||||
赎回 ({redeemableSummary.totalCount}个, ${formatUSDC(redeemableSummary.totalValue)})
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
@@ -1238,13 +1238,13 @@ const PositionList: React.FC = () => {
|
||||
<span>
|
||||
开仓价值合计:{' '}
|
||||
<span style={{ fontWeight: 600 }}>
|
||||
{formatUSDC(positionTotals.totalInitialValue.toString())} USDC
|
||||
${formatUSDC(positionTotals.totalInitialValue.toString())}
|
||||
</span>
|
||||
</span>
|
||||
<span>
|
||||
当前价值合计:{' '}
|
||||
<span style={{ fontWeight: 600 }}>
|
||||
{formatUSDC(positionTotals.totalCurrentValue.toString())} USDC
|
||||
${formatUSDC(positionTotals.totalCurrentValue.toString())}
|
||||
</span>
|
||||
</span>
|
||||
<span>
|
||||
@@ -1256,7 +1256,7 @@ const PositionList: React.FC = () => {
|
||||
}}
|
||||
>
|
||||
{positionTotals.totalPnl >= 0 ? '+' : ''}
|
||||
{formatUSDC(positionTotals.totalPnl.toString())} USDC
|
||||
${formatUSDC(positionTotals.totalPnl.toString())}
|
||||
</span>
|
||||
</span>
|
||||
<span>
|
||||
@@ -1268,7 +1268,7 @@ const PositionList: React.FC = () => {
|
||||
}}
|
||||
>
|
||||
{positionTotals.totalRealizedPnl >= 0 ? '+' : ''}
|
||||
{formatUSDC(positionTotals.totalRealizedPnl.toString())} USDC
|
||||
${formatUSDC(positionTotals.totalRealizedPnl.toString())}
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
@@ -1532,7 +1532,7 @@ const PositionList: React.FC = () => {
|
||||
color: currentPnl.pnl >= 0 ? '#52c41a' : '#f5222d',
|
||||
marginBottom: '4px'
|
||||
}}>
|
||||
{currentPnl.pnl >= 0 ? '+' : ''}{formatUSDC(currentPnl.pnl)} USDC
|
||||
{currentPnl.pnl >= 0 ? '+' : ''}${formatUSDC(currentPnl.pnl)}
|
||||
</div>
|
||||
<div style={{
|
||||
fontSize: '14px',
|
||||
@@ -1572,7 +1572,7 @@ const PositionList: React.FC = () => {
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="可赎回总价值">
|
||||
<span style={{ fontSize: '18px', fontWeight: 'bold', color: '#52c41a' }}>
|
||||
{formatUSDC(redeemableSummary.totalValue)} USDC
|
||||
${formatUSDC(redeemableSummary.totalValue)}
|
||||
</span>
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="涉及账户">
|
||||
@@ -1625,7 +1625,7 @@ const PositionList: React.FC = () => {
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '价值 (USDC)',
|
||||
title: '价值 ($)',
|
||||
dataIndex: 'value',
|
||||
key: 'value',
|
||||
align: 'right' as const,
|
||||
|
||||
@@ -101,9 +101,8 @@ const Statistics: React.FC = () => {
|
||||
<Statistic
|
||||
title={t('statistics.totalPnl') || '总盈亏'}
|
||||
value={formatUSDC(stats?.totalPnl || '0')}
|
||||
prefix={stats?.totalPnl && parseFloat(stats.totalPnl) >= 0 ? <ArrowUpOutlined /> : <ArrowDownOutlined />}
|
||||
prefix={<>{stats?.totalPnl && parseFloat(stats.totalPnl) >= 0 ? <ArrowUpOutlined /> : <ArrowDownOutlined />} $</>}
|
||||
valueStyle={{ color: stats?.totalPnl && parseFloat(stats.totalPnl || '0') >= 0 ? '#3f8600' : '#cf1322' }}
|
||||
suffix="USDC"
|
||||
loading={loading}
|
||||
/>
|
||||
</Card>
|
||||
@@ -124,9 +123,8 @@ const Statistics: React.FC = () => {
|
||||
<Statistic
|
||||
title={t('statistics.avgPnl') || '平均盈亏'}
|
||||
value={formatUSDC(stats?.avgPnl || '0')}
|
||||
prefix={stats?.avgPnl && parseFloat(stats.avgPnl || '0') >= 0 ? <ArrowUpOutlined /> : <ArrowDownOutlined />}
|
||||
prefix={<>{stats?.avgPnl && parseFloat(stats.avgPnl || '0') >= 0 ? <ArrowUpOutlined /> : <ArrowDownOutlined />} $</>}
|
||||
valueStyle={{ color: stats?.avgPnl && parseFloat(stats.avgPnl || '0') >= 0 ? '#3f8600' : '#cf1322' }}
|
||||
suffix="USDC"
|
||||
loading={loading}
|
||||
/>
|
||||
</Card>
|
||||
@@ -136,9 +134,8 @@ const Statistics: React.FC = () => {
|
||||
<Statistic
|
||||
title={t('statistics.maxProfit') || '最大盈利'}
|
||||
value={formatUSDC(stats?.maxProfit || '0')}
|
||||
prefix={<ArrowUpOutlined />}
|
||||
prefix={<><ArrowUpOutlined /> $</>}
|
||||
valueStyle={{ color: '#3f8600' }}
|
||||
suffix="USDC"
|
||||
loading={loading}
|
||||
/>
|
||||
</Card>
|
||||
@@ -148,9 +145,8 @@ const Statistics: React.FC = () => {
|
||||
<Statistic
|
||||
title={t('statistics.maxLoss') || '最大亏损'}
|
||||
value={formatUSDC(stats?.maxLoss || '0')}
|
||||
prefix={<ArrowDownOutlined />}
|
||||
prefix={<><ArrowDownOutlined /> $</>}
|
||||
valueStyle={{ color: '#cf1322' }}
|
||||
suffix="USDC"
|
||||
loading={loading}
|
||||
/>
|
||||
</Card>
|
||||
|
||||
@@ -154,7 +154,7 @@ const TemplateAdd: React.FC = () => {
|
||||
|
||||
{copyMode === 'FIXED' && (
|
||||
<Form.Item
|
||||
label={t('templateAdd.fixedAmount') || '固定跟单金额 (USDC)'}
|
||||
label={t('templateAdd.fixedAmount') || '固定跟单金额 ($)'}
|
||||
name="fixedAmount"
|
||||
rules={[
|
||||
{ required: true, message: t('templateAdd.fixedAmountRequired') || '请输入固定跟单金额' },
|
||||
@@ -193,9 +193,9 @@ const TemplateAdd: React.FC = () => {
|
||||
{copyMode === 'RATIO' && (
|
||||
<>
|
||||
<Form.Item
|
||||
label={t('templateAdd.maxOrderSize') || '单笔订单最大金额 (USDC)'}
|
||||
label={t('templateAdd.maxOrderSize') || '单笔订单最大金额 ($)'}
|
||||
name="maxOrderSize"
|
||||
tooltip={t('templateAdd.maxOrderSizeTooltip') || '比例模式下,限制单笔跟单订单的最大金额上限,用于防止跟单金额过大,控制风险。例如:设置为 1000,即使计算出的跟单金额超过 1000,也会限制为 1000 USDC。'}
|
||||
tooltip={t('templateAdd.maxOrderSizeTooltip') || '比例模式下,限制单笔跟单订单的最大金额上限,用于防止跟单金额过大,控制风险。例如:设置为 1000,即使计算出的跟单金额超过 1000,也会限制为 $1000。'}
|
||||
>
|
||||
<InputNumber
|
||||
min={0.0001}
|
||||
@@ -213,9 +213,9 @@ const TemplateAdd: React.FC = () => {
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
label={t('templateAdd.minOrderSize') || '单笔订单最小金额 (USDC)'}
|
||||
label={t('templateAdd.minOrderSize') || '单笔订单最小金额 ($)'}
|
||||
name="minOrderSize"
|
||||
tooltip={t('templateAdd.minOrderSizeTooltip') || '比例模式下,限制单笔跟单订单的最小金额下限,用于过滤掉金额过小的订单,避免频繁小额交易。如果填写,必须 >= 1 USDC。例如:设置为 10,如果计算出的跟单金额小于 10,则跳过该订单。'}
|
||||
tooltip={t('templateAdd.minOrderSizeTooltip') || '比例模式下,限制单笔跟单订单的最小金额下限,用于过滤掉金额过小的订单,避免频繁小额交易。如果填写,必须 >= $1。例如:设置为 10,如果计算出的跟单金额小于 10,则跳过该订单。'}
|
||||
rules={[
|
||||
{
|
||||
validator: (_, value) => {
|
||||
@@ -282,7 +282,7 @@ const TemplateAdd: React.FC = () => {
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
label={t('templateAdd.minOrderDepth') || '最小订单深度 (USDC)'}
|
||||
label={t('templateAdd.minOrderDepth') || '最小订单深度 ($)'}
|
||||
name="minOrderDepth"
|
||||
tooltip={t('templateAdd.minOrderDepthTooltip') || '检查订单簿的总订单金额(买盘+卖盘),确保市场有足够的流动性。不填写则不启用此过滤'}
|
||||
>
|
||||
|
||||
@@ -189,9 +189,9 @@ const TemplateEdit: React.FC = () => {
|
||||
|
||||
{copyMode === 'FIXED' && (
|
||||
<Form.Item
|
||||
label={t('templateEdit.fixedAmount') || '固定跟单金额 (USDC)'}
|
||||
label={t('templateEdit.fixedAmount') || '固定跟单金额 ($)'}
|
||||
name="fixedAmount"
|
||||
tooltip={t('templateEdit.fixedAmountTooltip') || '固定金额模式下,每次跟单的固定金额,不随 Leader 订单大小变化。必须 >= 1 USDC。例如:设置为 10,则无论 Leader 买入多少,跟单金额始终为 10 USDC。'}
|
||||
tooltip={t('templateEdit.fixedAmountTooltip') || '固定金额模式下,每次跟单的固定金额,不随 Leader 订单大小变化。必须 >= $1。例如:设置为 10,则无论 Leader 买入多少,跟单金额始终为 $10。'}
|
||||
rules={[
|
||||
{ required: true, message: t('templateEdit.fixedAmountRequired') || '请输入固定跟单金额' },
|
||||
{
|
||||
@@ -229,9 +229,9 @@ const TemplateEdit: React.FC = () => {
|
||||
{copyMode === 'RATIO' && (
|
||||
<>
|
||||
<Form.Item
|
||||
label={t('templateEdit.maxOrderSize') || '单笔订单最大金额 (USDC)'}
|
||||
label={t('templateEdit.maxOrderSize') || '单笔订单最大金额 ($)'}
|
||||
name="maxOrderSize"
|
||||
tooltip={t('templateEdit.maxOrderSizeTooltip') || '比例模式下,限制单笔跟单订单的最大金额上限,用于防止跟单金额过大,控制风险。例如:设置为 1000,即使计算出的跟单金额超过 1000,也会限制为 1000 USDC。'}
|
||||
tooltip={t('templateEdit.maxOrderSizeTooltip') || '比例模式下,限制单笔跟单订单的最大金额上限,用于防止跟单金额过大,控制风险。例如:设置为 1000,即使计算出的跟单金额超过 1000,也会限制为 $1000。'}
|
||||
>
|
||||
<InputNumber
|
||||
min={0.0001}
|
||||
@@ -249,9 +249,9 @@ const TemplateEdit: React.FC = () => {
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
label={t('templateEdit.minOrderSize') || '单笔订单最小金额 (USDC)'}
|
||||
label={t('templateEdit.minOrderSize') || '单笔订单最小金额 ($)'}
|
||||
name="minOrderSize"
|
||||
tooltip={t('templateEdit.minOrderSizeTooltip') || '比例模式下,限制单笔跟单订单的最小金额下限,用于过滤掉金额过小的订单,避免频繁小额交易。如果填写,必须 >= 1 USDC。例如:设置为 10,如果计算出的跟单金额小于 10,则跳过该订单。'}
|
||||
tooltip={t('templateEdit.minOrderSizeTooltip') || '比例模式下,限制单笔跟单订单的最小金额下限,用于过滤掉金额过小的订单,避免频繁小额交易。如果填写,必须 >= $1。例如:设置为 10,如果计算出的跟单金额小于 10,则跳过该订单。'}
|
||||
rules={[
|
||||
{
|
||||
validator: (_, value) => {
|
||||
@@ -318,7 +318,7 @@ const TemplateEdit: React.FC = () => {
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
label={t('templateEdit.minOrderDepth') || '最小订单深度 (USDC)'}
|
||||
label={t('templateEdit.minOrderDepth') || '最小订单深度 ($)'}
|
||||
name="minOrderDepth"
|
||||
tooltip={t('templateEdit.minOrderDepthTooltip') || '检查订单簿的总订单金额(买盘+卖盘),确保市场有足够的流动性。不填写则不启用此过滤'}
|
||||
>
|
||||
|
||||
@@ -176,7 +176,7 @@ const TemplateList: React.FC = () => {
|
||||
if (record.copyMode === 'RATIO') {
|
||||
return `${t('templateList.ratio') || '比例'} ${record.copyRatio}x`
|
||||
} else if (record.copyMode === 'FIXED' && record.fixedAmount) {
|
||||
return `${t('templateList.fixedAmount') || '固定'} ${formatUSDC(record.fixedAmount)} USDC`
|
||||
return `$${formatUSDC(record.fixedAmount)}`
|
||||
}
|
||||
return '-'
|
||||
}
|
||||
@@ -350,7 +350,7 @@ const TemplateList: React.FC = () => {
|
||||
<div style={{ fontSize: '12px', opacity: '0.9' }}>
|
||||
{template.copyMode === 'RATIO'
|
||||
? `${t('templateList.ratioMode') || '比例模式'} ${(parseFloat(template.copyRatio || '0') * 100).toFixed(0).replace(/\.0+$/, '')}%`
|
||||
: `${t('templateList.fixedAmountMode') || '固定金额'} ${formatUSDC(template.fixedAmount || '0')} USDC`
|
||||
: `$${formatUSDC(template.fixedAmount || '0')}`
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
@@ -396,11 +396,11 @@ const TemplateList: React.FC = () => {
|
||||
}}>
|
||||
<span style={{ color: '#d48806' }}>{t('templateList.amountLimit') || '金额限制'}: </span>
|
||||
{template.maxOrderSize && (
|
||||
<span>{t('templateList.max') || '最大'} {formatUSDC(template.maxOrderSize)} USDC</span>
|
||||
<span>{t('templateList.max') || '最大'} ${formatUSDC(template.maxOrderSize)}</span>
|
||||
)}
|
||||
{template.maxOrderSize && template.minOrderSize && <span> | </span>}
|
||||
{template.minOrderSize && (
|
||||
<span>{t('templateList.min') || '最小'} {formatUSDC(template.minOrderSize)} USDC</span>
|
||||
<span>{t('templateList.min') || '最小'} ${formatUSDC(template.minOrderSize)}</span>
|
||||
)}
|
||||
{!template.maxOrderSize && !template.minOrderSize && <span style={{ color: '#bfbfbf' }}>{t('templateList.notSet') || '未设置'}</span>}
|
||||
</div>
|
||||
@@ -551,7 +551,7 @@ const TemplateList: React.FC = () => {
|
||||
|
||||
{copyMode === 'FIXED' && (
|
||||
<Form.Item
|
||||
label="固定跟单金额 (USDC)"
|
||||
label="固定跟单金额 ($)"
|
||||
name="fixedAmount"
|
||||
rules={[
|
||||
{ required: true, message: '请输入固定跟单金额' },
|
||||
@@ -589,9 +589,9 @@ const TemplateList: React.FC = () => {
|
||||
{copyMode === 'RATIO' && (
|
||||
<>
|
||||
<Form.Item
|
||||
label="单笔订单最大金额 (USDC)"
|
||||
label="单笔订单最大金额 ($)"
|
||||
name="maxOrderSize"
|
||||
tooltip="比例模式下,限制单笔跟单订单的最大金额上限,用于防止跟单金额过大,控制风险。例如:设置为 1000,即使计算出的跟单金额超过 1000,也会限制为 1000 USDC。"
|
||||
tooltip="比例模式下,限制单笔跟单订单的最大金额上限,用于防止跟单金额过大,控制风险。例如:设置为 1000,即使计算出的跟单金额超过 1000,也会限制为 $1000。"
|
||||
>
|
||||
<InputNumber
|
||||
min={0.01}
|
||||
@@ -609,9 +609,9 @@ const TemplateList: React.FC = () => {
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
label="单笔订单最小金额 (USDC)"
|
||||
label="单笔订单最小金额 ($)"
|
||||
name="minOrderSize"
|
||||
tooltip="比例模式下,限制单笔跟单订单的最小金额下限,用于过滤掉金额过小的订单,避免频繁小额交易。如果填写,必须 >= 1 USDC。例如:设置为 10,如果计算出的跟单金额小于 10,则跳过该订单。"
|
||||
tooltip="比例模式下,限制单笔跟单订单的最小金额下限,用于过滤掉金额过小的订单,避免频繁小额交易。如果填写,必须 >= $1。例如:设置为 10,如果计算出的跟单金额小于 10,则跳过该订单。"
|
||||
rules={[
|
||||
{
|
||||
validator: (_, value) => {
|
||||
@@ -698,7 +698,7 @@ const TemplateList: React.FC = () => {
|
||||
<Divider>过滤条件(可选)</Divider>
|
||||
|
||||
<Form.Item
|
||||
label="最小订单深度 (USDC)"
|
||||
label="最小订单深度 ($)"
|
||||
name="minOrderDepth"
|
||||
tooltip="检查订单簿的总订单金额(买盘+卖盘),确保市场有足够的流动性。不填写则不启用此过滤"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user