Skip to content

Conversation

@guodage
Copy link

@guodage guodage commented Jan 8, 2026

📝 Description | 描述

English: Add Testnet/Simulated trading support for OKX and Hyperliquid exchanges to enable safe strategy testing without real funds.

中文: 为 OKX 和 Hyperliquid 交易所添加测试网/模拟盘支持,允许在无需真实资金的情况下安全测试策略。


🎯 Type of Change | 变更类型

  • ✨ New feature | 新功能

🔗 Related Issues | 相关 Issue

  • Related to testnet environment setup

📋 Changes Made | 具体变更

English:

  • Added Testnet configuration property to AutoTraderConfig
  • Updated OKX trader to support simulated trading header (x-simulated-trading: 1)
  • Updated Hyperliquid trader to support testnet endpoint
  • Added Testnet/Simulated trading toggle in UI for OKX and Hyperliquid
  • Added i18n translations for testnet-related labels
  • Updated API handlers to pass Testnet configuration when creating traders
  • Refactored duplicate testnet fields into unified Testnet property

中文:

  • AutoTraderConfig 添加 Testnet 配置属性
  • 更新 OKX trader 支持模拟盘头部 (x-simulated-trading: 1)
  • 更新 Hyperliquid trader 支持测试网端点
  • 在 UI 中为 OKX 和 Hyperliquid 添加测试网/模拟盘开关
  • 添加测试网相关的 i18n 翻译
  • 更新 API 处理程序在创建交易者时传递 Testnet 配置
  • 重构重复的 testnet 字段为统一的 Testnet 属性

🧪 Testing | 测试

  • Tested locally | 本地测试通过
  • Tests pass | 测试通过
  • Verified no existing functionality broke | 确认没有破坏现有功能

✅ Checklist | 检查清单

Code Quality | 代码质量

  • Code follows project style | 代码遵循项目风格
  • Self-review completed | 已完成代码自查
  • Comments added for complex logic | 已添加必要注释

Documentation | 文档

  • Updated relevant documentation | 已更新相关文档 (okx-api.md)

Git

  • Commits follow conventional format | 提交遵循 Conventional Commits 格式
  • Rebased on latest dev branch | 已 rebase 到最新 dev 分支
  • No merge conflicts | 无合并冲突

📚 Additional Notes | 补充说明

English:

  • OKX uses the x-simulated-trading: 1 header for demo/paper trading accounts
  • Hyperliquid connects to the official testnet endpoint when Testnet is enabled
  • The UI shows different labels and descriptions based on the exchange type (OKX: "Use Simulated Trading", Hyperliquid: "Use Testnet")

中文:

  • OKX 使用 x-simulated-trading: 1 头部来支持模拟/演示交易账号
  • Hyperliquid 在启用 Testnet 时连接到官方测试网端点
  • UI 根据交易所类型显示不同的标签和描述(OKX: "使用模拟盘", Hyperliquid: "使用测试网")

@cla-assistant
Copy link

cla-assistant bot commented Jan 8, 2026

CLA assistant check
All committers have signed the CLA.

@cla-assistant
Copy link

cla-assistant bot commented Jan 8, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant