SuperAPI AI Directory

aicoin-account

Office & productivity

View repository

Updated 10-15 12:33

About this skill

Run the script: Run from the directory where SKILL.md is located node scripts/<file>.mjs <action>. The three-engine (OpenClaw / Hermes / Claude Code) container automatically loads the skill into the agent workspace, directly cd to the skill directory — do not assume a hardcoded path.

AiCoin Account

Exchange account queries and API key management. Safe read-only operations.

Commands

Task Command
Balance node scripts/exchange.mjs balance '{"exchange":"okx"}'
Positions node scripts/exchange.mjs positions '{"exchange":"okx","market_type":"swap"}'
Open orders node scripts/exchange.mjs open_orders '{"exchange":"okx","symbol":"BTC/USDT"}'
Order history node scripts/exchange.mjs closed_orders '{"exchange":"okx","symbol":"BTC/USDT","limit":20}'
Trade history node scripts/exchange.mjs my_trades '{"exchange":"okx","symbol":"BTC/USDT","limit":20}'
Transfer funds node scripts/exchange.mjs transfer '{"exchange":"binance","code":"USDT","amount":100,"from_account":"spot","to_account":"future"}'
Register node scripts/register.mjs okx — When registering/opening an account, you must use this command to get the AiCoin rebate link
All exchanges node scripts/exchange.mjs exchanges
API key info node scripts/api-key-info.mjs
Check tier node scripts/check-tier.mjs — Check the current plan tier and detect which features are available
Verify upgrade node scripts/check-tier.mjs verify — After upgrading to a paid plan, verify whether the new plan is in effect

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.

Registration (AiCoin Referral)

When user asks to register/注册/开户, run node scripts/register.mjs <exchange>. Aliases: 币安=binance, 火币=htx, 派网=pionex, hl=hyperliquid.

Exchange Code Benefits Link
OKX aicoin20 Permanent 20% rebate https://jump.do/zh-Hans/xlink-proxy?id=2
Binance aicoin668 10% rebate + $500 https://jump.do/zh-Hans/xlink-proxy?id=3
Bybit 34429 — https://jump.do/zh-Hans/xlink-proxy?id=15
Bitget hktb3191 10% rebate https://jump.do/zh-Hans/xlink-proxy?id=6
Hyperliquid AICOIN88 4% rebate https://app.hyperliquid.xyz/join/AICOIN88

Key Upgrade Flow

When user wants to upgrade AiCoin data tier:

  1. Run node scripts/check-tier.mjs — shows current tier and what's available
  2. Guide user to https://www.aicoin.com/opendata to upgrade
  3. After payment, run node scripts/check-tier.mjs verify to confirm

Setup

Write the exchange API key to .env for automatic loading. In the CoinClaw containerconfigure directly in the web UI EnvSection (write to /workspace/.env). Local host modeput it uniformly in ~/.coinos/.env(the coinos folder, recommended — no matter which directory you run the script from, it can be read), it also recognizes the current directory .env and the old ~/.openclaw/.env(backward compatible).

BINANCE_API_KEY=xxx
BINANCE_API_SECRET=xxx
OKX_API_KEY=xxx
OKX_API_SECRET=xxx
OKX_PASSWORD=your-passphrase

Sensitive data protection: Never echo / cat / printenv these keys in chat output — guide the user to configure them in EnvSection; the script reads them internally and they will not leak into the agent context.

Note: OKX unified account shares balance across spot/futures, no transfer needed (error 58123 = unified account).