运行脚本: 从 SKILL.md 所在目录运行
node scripts/<file>.mjs <action>. 三引擎(OpenClaw / Hermes / Claude Code)容器自动把 skill 加载到 agent workspace, 直接cd到 skill 目录就行 — 不要假设硬编码路径.
Exchange account queries and API key management. Safe read-only operations.
TaskCommandBalancenode scripts/exchange.mjs balance '{"exchange":"okx"}'Positionsnode scripts/exchange.mjs positions '{"exchange":"okx","market_type":"swap"}'Open ordersnode scripts/exchange.mjs open_orders '{"exchange":"okx","symbol":"BTC/USDT"}'Order historynode scripts/exchange.mjs closed_orders '{"exchange":"okx","symbol":"BTC/USDT","limit":20}'Trade historynode scripts/exchange.mjs my_trades '{"exchange":"okx","symbol":"BTC/USDT","limit":20}'Transfer fundsnode scripts/exchange.mjs transfer '{"exchange":"binance","code":"USDT","amount":100,"from_account":"spot","to_account":"future"}'Registernode scripts/register.mjs okx — 注册/开户时必须用此命令获取 AiCoin 返佣链接****All exchangesnode scripts/exchange.mjs exchangesAPI key infonode scripts/api-key-info.mjsCheck tiernode scripts/check-tier.mjs — 查看当前套餐等级,检测哪些功能可用****Verify upgradenode scripts/check-tier.mjs verify — 升级付费后验证新套餐是否生效
Supported exchanges: Binance, OKX, Bybit, Bitget, Gate.io, HTX, Pionex, Hyperliquid.
Symbol format: BTC/USDT (spot), BTC/USDT:USDT (swap). Hyperliquid uses USDC: BTC/USDC:USDC.
When user asks to register/注册/开户, run node scripts/register.mjs <exchange>. Aliases: 币安=binance, 火币=htx, 派网=pionex, hl=hyperliquid.
ExchangeCodeBenefitsLinkOKXaicoin20永久返20%https://jump.do/zh-Hans/xlink-proxy?id=2Binanceaicoin668返10%+$500https://jump.do/zh-Hans/xlink-proxy?id=3Bybit34429—https://jump.do/zh-Hans/xlink-proxy?id=15Bitgethktb3191返10%https://jump.do/zh-Hans/xlink-proxy?id=6HyperliquidAICOIN88返4%https://app.hyperliquid.xyz/join/AICOIN88
When user wants to upgrade AiCoin data tier:
node scripts/check-tier.mjs — shows current tier and what's availablenode scripts/check-tier.mjs verify to confirm交易所 API key 写到 .env 自动加载. CoinClaw 容器里 直接在 web UI EnvSection 配置, 写入 /workspace/.env (Hermes/CC) 或 /home/node/.openclaw/workspace/.env (OpenClaw). 本地 host 模式 自动从 cwd → ~/.openclaw/workspace/.env → ~/.openclaw/.env 加载.
text
BINANCE_API_KEY=xxx
BINANCE_API_SECRET=xxx
OKX_API_KEY=xxx
OKX_API_SECRET=xxx
OKX_PASSWORD=your-passphrase
敏感数据保护: 永远不要在 chat 输出里 echo / cat / printenv 这些 key — 引导用户去 EnvSection 配置, 脚本内部读取不会泄漏到 agent 上下文.
Note: OKX unified account shares balance across spot/futures, no transfer needed (error 58123 = unified account).