后端:
- 新增通知模板表与实体、DTO、Repository、NotificationTemplateService
- 支持 {{variable}} 模板语法,提供模板类型与变量接口
- TelegramNotificationService 改为通过模板渲染发送(ORDER_SUCCESS/ORDER_FAILED/ORDER_FILTERED/CRYPTO_TAIL_SUCCESS/REDEEM_SUCCESS/REDEEM_NO_RETURN)
- 模板 CRUD、重置默认、测试发送接口
- 补全订单过滤相关 i18n key(zh/en/zh-TW)
前端:
- 消息推送设置抽离为独立页 /system-settings/notification
- 系统设置概览改为入口卡片,侧栏增加「消息推送设置」菜单
- NotificationSettingsPage: 机器人配置 + 模板配置双卡片布局(与概览一致)
- 模板配置支持选择类型、编辑内容、变量面板(点击复制、悬停说明)、保存/重置/测试
- 多语言 key 补全(notificationSettings.templates.*、templateTypes.*)
Made-with: Cursor
341 lines
15 KiB
Properties
341 lines
15 KiB
Properties
# 通知相關
|
|
notification.order.created.success=訂單創建成功
|
|
notification.order.created.failed=訂單創建失敗
|
|
notification.order.info=訂單信息
|
|
notification.order.id=訂單ID
|
|
notification.order.market=市場
|
|
notification.order.side=方向
|
|
notification.order.side.buy=買入
|
|
notification.order.side.sell=賣出
|
|
notification.order.outcome=市場方向
|
|
notification.order.price=價格
|
|
notification.order.quantity=數量
|
|
notification.order.amount=金額
|
|
notification.order.account=賬戶
|
|
notification.order.time=時間
|
|
notification.order.available_balance=可用餘額
|
|
notification.order.error_info=錯誤信息
|
|
notification.order.unknown_account=未知賬戶
|
|
notification.order.calculate_failed=計算失敗
|
|
notification.order.filtered=訂單被過濾
|
|
notification.order.filter_reason=過濾原因
|
|
notification.order.filter_type=過濾類型
|
|
notification.filter.type.order_depth=訂單深度不足
|
|
notification.filter.type.spread=價差過大
|
|
notification.filter.type.orderbook_depth=訂單簿深度不足
|
|
notification.filter.type.price_validity=價格不合理
|
|
notification.filter.type.market_status=市場狀態不可交易
|
|
notification.tail.order.success=加密價差策略下單成功
|
|
notification.tail.strategy=策略
|
|
notification.redeem.success=倉位贖回成功
|
|
notification.redeem.info=贖回信息
|
|
notification.redeem.transaction_hash=交易哈希
|
|
notification.redeem.total_value=贖回總價值
|
|
notification.redeem.position_count=倉位數量
|
|
notification.redeem.positions=贖回倉位
|
|
notification.redeem.account=賬戶
|
|
notification.redeem.time=時間
|
|
notification.redeem.available_balance=可用餘額
|
|
|
|
# 倉位已結算(無收益)
|
|
notification.redeem.no_return.title=倉位已結算(無收益)
|
|
notification.redeem.no_return.info=結算信息
|
|
notification.redeem.no_return.message=市場已結算,您的預測未命中,贖回價值為 0。
|
|
notification.redeem.no_return.positions=結算倉位
|
|
|
|
# 自動贖回相關通知
|
|
notification.auto_redeem.disabled.title=自動贖回未開啟
|
|
notification.auto_redeem.disabled.account=賬戶
|
|
notification.auto_redeem.disabled.redeemable_positions=可贖回倉位
|
|
notification.auto_redeem.disabled.total_value=總價值
|
|
notification.auto_redeem.disabled.message=請在系統設置中開啟自動贖回功能。
|
|
notification.auto_redeem.disabled.positions_unit=個
|
|
|
|
# Builder API Key 相關通知
|
|
notification.builder_api_key.not_configured.title=Builder API Key 未配置
|
|
notification.builder_api_key.not_configured.account=賬戶
|
|
notification.builder_api_key.not_configured.copy_trading_config=跟單配置
|
|
notification.builder_api_key.not_configured.redeemable_positions=可贖回倉位
|
|
notification.builder_api_key.not_configured.total_value=總價值
|
|
notification.builder_api_key.not_configured.message=請在系統設置中配置 Builder API Key 以啟用自動贖回功能。
|
|
notification.builder_api_key.not_configured.positions_unit=個
|
|
notification.builder_api_key.not_configured.unknown_config=未命名配置
|
|
|
|
# 通用
|
|
common.unknown=未知
|
|
|
|
# ==================== 參數錯誤 (1001-1999) ====================
|
|
error.param.error=參數錯誤
|
|
error.param.empty=參數不能為空
|
|
error.param.invalid=參數無效
|
|
|
|
# 賬戶相關參數錯誤
|
|
error.param.private_key_empty=私鑰不能為空
|
|
error.param.wallet_address_empty=錢包地址不能為空
|
|
error.param.wallet_address_invalid=錢包地址格式無效
|
|
error.param.account_id_invalid=賬戶ID無效
|
|
error.param.account_name_empty=賬戶名稱不能為空
|
|
|
|
# Leader 相關參數錯誤
|
|
error.param.leader_address_empty=Leader 地址不能為空
|
|
error.param.leader_address_invalid=Leader 地址格式無效
|
|
error.param.leader_id_invalid=Leader ID 無效
|
|
error.param.leader_name_empty=Leader 名稱不能為空
|
|
error.param.category_invalid=分類無效,只支持 sports 或 crypto
|
|
|
|
# 模板相關參數錯誤
|
|
error.param.template_name_empty=模板名稱不能為空
|
|
error.param.template_id_invalid=模板 ID 無效
|
|
error.param.copy_mode_invalid=copyMode 必須是 RATIO 或 FIXED
|
|
error.param.copy_ratio_invalid=跟單比例無效
|
|
error.param.fixed_amount_invalid=固定金額無效
|
|
|
|
# 跟單相關參數錯誤
|
|
error.param.copy_trading_id_invalid=跟單關係ID無效
|
|
error.param.order_type_invalid=訂單類型無效
|
|
error.param.order_type_must_be_market_or_limit=訂單類型必須是MARKET或LIMIT
|
|
error.param.quantity_empty=數量不能為空
|
|
error.param.price_empty=限價訂單必須提供價格
|
|
error.param.side_empty=方向不能為空
|
|
error.param.market_id_empty=市場ID不能為空
|
|
error.param.order_type_empty=訂單類型不能為空
|
|
|
|
# 市場相關參數錯誤
|
|
error.param.token_id_empty=tokenId 不能為空
|
|
error.param.condition_id_empty=conditionId 不能為空
|
|
error.param.redeem_positions_empty=贖回倉位列表不能為空
|
|
error.param.index_sets_invalid=結果索引無效
|
|
|
|
# 統計相關參數錯誤
|
|
error.param.order_type_invalid_for_tracking=訂單類型無效,必須是: buy, sell, matched
|
|
|
|
# ==================== 認證/權限錯誤 (2001-2999) ====================
|
|
error.auth.error=認證失敗
|
|
error.auth.token_invalid=認證令牌無效
|
|
error.auth.token_expired=認證令牌已過期
|
|
error.auth.permission_denied=權限不足
|
|
error.auth.api_key_invalid=API Key 無效
|
|
error.auth.api_secret_invalid=API Secret 無效
|
|
error.auth.api_passphrase_invalid=API Passphrase 無效
|
|
error.auth.api_credentials_missing=API 憑證未配置
|
|
error.auth.username_or_password_error=用戶名或密碼錯誤
|
|
error.auth.reset_key_invalid=重置密鑰錯誤
|
|
error.auth.reset_password_rate_limit=頻率限制:1分鐘內最多嘗試3次,請稍後再試
|
|
error.auth.user_not_found=用戶不存在
|
|
error.auth.password_weak=密碼長度不符合要求,至少6位
|
|
|
|
# ==================== 資源不存在 (3001-3999) ====================
|
|
error.not_found=資源不存在
|
|
error.account_not_found=賬戶不存在
|
|
error.leader_not_found=Leader 不存在
|
|
error.template_not_found=模板不存在
|
|
error.copy_trading_not_found=跟單關係不存在
|
|
error.market_not_found=市場不存在
|
|
error.order_not_found=訂單不存在
|
|
error.position_not_found=倉位不存在
|
|
|
|
# ==================== 業務邏輯錯誤 (4001-4999) ====================
|
|
error.business.error=業務邏輯錯誤
|
|
|
|
# Leader 管理
|
|
error.leader_already_exists=該 Leader 地址已存在
|
|
error.leader_address_same_as_account=Leader 地址不能與自己的賬戶地址相同
|
|
error.leader_has_copy_tradings=該 Leader 還有跟單關係,請先刪除跟單關係
|
|
|
|
# 模板管理
|
|
error.template_name_already_exists=模板名稱已存在
|
|
error.template_has_copy_tradings=該模板還有跟單關係在使用,請先刪除跟單關係
|
|
|
|
# 跟單管理
|
|
error.copy_trading_already_exists=該跟單關係已存在
|
|
error.copy_trading_disabled=跟單關係已禁用
|
|
error.copy_trading_enabled=跟單關係已啟用
|
|
error.no_enabled_copy_tradings=沒有啟用的跟單關係
|
|
|
|
# 訂單相關
|
|
error.order_create_failed=創建訂單失敗
|
|
error.order_cancel_failed=取消訂單失敗
|
|
error.order_not_matched=訂單未匹配
|
|
error.order_already_filled=訂單已成交
|
|
error.order_insufficient_balance=餘額不足
|
|
error.order_amount_too_small=訂單金額低於最小限制
|
|
error.order_amount_too_large=訂單金額超過最大限制
|
|
error.order_price_invalid=訂單價格無效
|
|
error.order_quantity_invalid=訂單數量無效
|
|
|
|
# 市場相關
|
|
error.market_price_fetch_failed=獲取市場價格失敗
|
|
error.market_orderbook_empty=訂單簿為空
|
|
error.market_token_id_invalid=Token ID 無效
|
|
|
|
# 倉位相關
|
|
error.position_redeem_failed=贖回倉位失敗
|
|
error.position_not_redeemable=倉位不可贖回
|
|
error.position_insufficient=倉位不足
|
|
error.position_already_redeemed=倉位已贖回
|
|
|
|
# 通知配置相關
|
|
error.notification_config_not_found=通知配置不存在
|
|
error.notification_config_id_empty=配置ID不能為空
|
|
error.notification_config_type_empty=推送類型不能為空
|
|
error.notification_config_name_empty=配置名稱不能為空
|
|
error.notification_config_data_empty=配置信息不能為空
|
|
error.notification_config_bot_token_empty=Bot Token 不能為空
|
|
error.notification_config_create_failed=創建配置失敗
|
|
error.notification_config_update_failed=更新配置失敗
|
|
error.notification_config_delete_failed=刪除配置失敗
|
|
error.notification_config_update_enabled_failed=更新啟用狀態失敗
|
|
error.notification_config_fetch_failed=獲取配置失敗
|
|
error.notification_test_failed=發送測試消息失敗,請檢查配置
|
|
error.notification_get_chat_ids_failed=獲取 Chat IDs 失敗
|
|
|
|
# 賬戶相關業務錯誤
|
|
error.account_already_exists=賬戶已存在
|
|
error.account_is_default=賬戶已是默認賬戶
|
|
error.account_has_active_orders=賬戶有活躍訂單
|
|
error.account_is_last_one=不能刪除最後一個賬戶
|
|
error.account_api_key_create_failed=自動獲取 API Key 失敗
|
|
error.account_proxy_address_fetch_failed=獲取代理地址失敗
|
|
error.account_balance_fetch_failed=查詢賬戶餘額失敗
|
|
error.account_positions_fetch_failed=查詢倉位列表失敗
|
|
|
|
# 統計相關
|
|
error.statistics_fetch_failed=獲取統計信息失敗
|
|
error.order_list_fetch_failed=查詢訂單列表失敗
|
|
|
|
# ==================== 服務器內部錯誤 (5001-5999) ====================
|
|
error.server.error=服務器內部錯誤
|
|
error.server.database_error=數據庫錯誤
|
|
error.server.network_error=網絡錯誤
|
|
error.server.timeout=請求超時
|
|
error.server.external_api_error=外部API調用失敗
|
|
error.server.rpc_error=RPC調用失敗
|
|
error.server.websocket_error=WebSocket連接錯誤
|
|
error.server.encryption_error=加密/解密錯誤
|
|
error.server.signature_error=簽名錯誤
|
|
|
|
# 賬戶服務錯誤
|
|
error.server.account_import_failed=導入賬戶失敗
|
|
error.server.account_update_failed=更新賬戶失敗
|
|
error.server.account_delete_failed=刪除賬戶失敗
|
|
error.server.account_list_fetch_failed=查詢賬戶列表失敗
|
|
error.server.account_detail_fetch_failed=查詢賬戶詳情失敗
|
|
error.server.account_balance_fetch_failed=查詢賬戶餘額失敗
|
|
error.server.account_default_set_failed=設置默認賬戶失敗
|
|
error.server.account_positions_fetch_failed=查詢倉位列表失敗
|
|
error.server.account_order_create_failed=創建賣出訂單失敗
|
|
error.server.account_redeem_positions_failed=贖回倉位失敗
|
|
|
|
# Leader 服務錯誤
|
|
error.server.leader_add_failed=添加 Leader 失敗
|
|
error.server.leader_update_failed=更新 Leader 失敗
|
|
error.server.leader_delete_failed=刪除 Leader 失敗
|
|
error.server.leader_list_fetch_failed=查詢 Leader 列表失敗
|
|
error.server.leader_detail_fetch_failed=查詢 Leader 詳情失敗
|
|
|
|
# 模板服務錯誤
|
|
error.server.template_create_failed=創建模板失敗
|
|
error.server.template_update_failed=更新模板失敗
|
|
error.server.template_delete_failed=刪除模板失敗
|
|
error.server.template_copy_failed=複製模板失敗
|
|
error.server.template_list_fetch_failed=查詢模板列表失敗
|
|
error.server.template_detail_fetch_failed=查詢模板詳情失敗
|
|
|
|
# 跟單服務錯誤
|
|
error.server.copy_trading_create_failed=創建跟單失敗
|
|
error.server.copy_trading_update_failed=更新跟單失敗
|
|
error.server.copy_trading_delete_failed=刪除跟單失敗
|
|
error.server.copy_trading_list_fetch_failed=查詢跟單列表失敗
|
|
error.server.copy_trading_templates_fetch_failed=查詢錢包綁定的模板失敗
|
|
|
|
# 市場服務錯誤
|
|
error.server.market_price_fetch_failed=獲取市場價格失敗
|
|
error.server.market_latest_price_fetch_failed=獲取最新價失敗
|
|
|
|
# 統計服務錯誤
|
|
error.server.statistics_fetch_failed=獲取統計信息失敗
|
|
error.server.order_tracking_list_fetch_failed=查詢訂單列表失敗
|
|
|
|
# 區塊鏈服務錯誤
|
|
error.server.blockchain_rpc_error=區塊鏈RPC調用失敗
|
|
error.server.blockchain_proxy_address_fetch_failed=獲取代理地址失敗
|
|
error.server.blockchain_balance_fetch_failed=查詢餘額失敗
|
|
error.server.blockchain_positions_fetch_failed=查詢倉位失敗
|
|
error.server.blockchain_redeem_failed=贖回倉位交易失敗
|
|
|
|
# WebSocket 服務錯誤
|
|
error.server.websocket_connection_failed=WebSocket連接失敗
|
|
error.server.websocket_message_send_failed=WebSocket消息發送失敗
|
|
error.server.websocket_subscribe_failed=WebSocket訂閱失敗
|
|
|
|
# 訂單跟蹤服務錯誤
|
|
error.server.order_tracking_process_failed=處理訂單跟蹤失敗
|
|
error.server.order_tracking_buy_failed=處理買入訂單失敗
|
|
error.server.order_tracking_sell_failed=處理賣出訂單失敗
|
|
error.server.order_tracking_match_failed=訂單匹配失敗
|
|
|
|
# 回測服務錯誤
|
|
error.backtest.task_not_found=回測任務不存在
|
|
error.backtest.leader_not_found=Leader不存在
|
|
error.backtest.days_invalid=回測天數必須在 1-15 天之間
|
|
error.backtest.initial_balance_invalid=初始金額無效
|
|
error.backtest.task_running=回測任務正在運行,無法刪除
|
|
error.backtest.task_not_completed=僅支援對已完成的回測任務重新測試
|
|
error.server.backtest_create_failed=創建回測任務失敗
|
|
error.server.backtest_update_failed=更新回測任務失敗
|
|
error.server.backtest_delete_failed=刪除回測任務失敗
|
|
error.server.backtest_list_fetch_failed=查詢回測列表失敗
|
|
error.server.backtest_detail_fetch_failed=查詢回測詳情失敗
|
|
error.server.backtest_trades_fetch_failed=查詢回測交易記錄失敗
|
|
error.server.backtest_execute_failed=回測執行失敗
|
|
error.server.backtest_historical_data_fetch_failed=歷史數據獲取失敗
|
|
error.server.backtest_stop_failed=停止回測任務失敗
|
|
error.server.backtest_retry_failed=重試回測任務失敗
|
|
error.server.backtest_rerun_failed=依配置重新測試失敗
|
|
|
|
# 加密價差策略
|
|
error.crypto_tail_strategy_not_found=加密價差策略不存在
|
|
error.crypto_tail_strategy_window_invalid=時間區間開始不能大於結束
|
|
error.crypto_tail_strategy_window_exceed=時間區間不能超過週期長度
|
|
error.crypto_tail_strategy_interval_invalid=週期僅支援 300 或 900 秒
|
|
error.crypto_tail_strategy_amount_mode_invalid=投入方式僅支援 RATIO 或 FIXED
|
|
error.server.crypto_tail_strategy_create_failed=創建加密價差策略失敗
|
|
error.server.crypto_tail_strategy_update_failed=更新加密價差策略失敗
|
|
error.server.crypto_tail_strategy_delete_failed=刪除加密價差策略失敗
|
|
error.server.crypto_tail_strategy_list_fetch_failed=查詢加密價差策略列表失敗
|
|
error.server.crypto_tail_strategy_triggers_fetch_failed=查詢觸發記錄失敗
|
|
# 回測管理
|
|
backtest.title=回測管理
|
|
backtest.create_task=新增回測
|
|
backtest.task_name=回測名稱
|
|
backtest.leader=Leader
|
|
backtest.initial_balance=初始金額
|
|
backtest.backtest_days=回測天數
|
|
backtest.profit_amount=收益額
|
|
backtest.profit_rate=收益率
|
|
backtest.backtest_days_range=回測天數範圍(1-15天)
|
|
backtest.total_trades=總交易筆數
|
|
backtest.buy_trades=買入筆數
|
|
backtest.sell_trades=賣出筆數
|
|
backtest.win_trades=盈利交易筆數
|
|
backtest.loss_trades=虧損交易筆數
|
|
backtest.win_rate=勝率
|
|
backtest.max_profit=最大單筆盈利
|
|
backtest.max_loss=最大單筆虧損
|
|
backtest.max_drawdown=最大回撤
|
|
backtest.avg_holding_time=平均持倉時間
|
|
|
|
# 回測狀態
|
|
backtest.status.pending=待執行
|
|
backtest.status.running=運行中
|
|
backtest.status.completed=已完成
|
|
backtest.status.stopped=已停止
|
|
backtest.status.failed=失敗
|
|
|
|
# 回測配置
|
|
backtest.copy_mode.ratio=比例模式
|
|
backtest.copy_mode.fixed=固定金額
|
|
backtest.price_tolerance=價格容忍度
|
|
backtest.delay_seconds=延遲秒數
|
|
backtest.support_sell=支持賣出
|