如何安全设置 OKX 子账户 API 权限与 IP 绑定
已验证事实边界
1. OKX says subaccounts can be used to separate trading strategies, manage multiple trading bots and control risks independently. 2. OKX says standard users can create up to five subaccounts. 3. OKX says API key creation includes choosing the account or subaccount, selecting required permissions, creating a passphrase and confirming with 2FA. 4. OKX says available API permissions include Read, Trade and Withdraw, with Withdraw allowing withdrawals via API and requiring caution. 5. OKX says IP addresses help secure API keys, up to 20 addresses can be linked per key, and the API passphrase cannot be recovered if lost.
收起完整分析
决策矩阵
文章表格:可横向滑动,或聚焦表格区域后使用方向键。
| Check | What it means | Practical action | Unknown to keep explicit |
|---|---|---|---|
| Subaccount purpose | risk separation for strategies or bots | create a subaccount only when separation has a job | regional feature availability |
| Account mode | which products and markets the account can use | configure mode before API use | mode not changeable via API |
| Key account | main account or chosen subaccount | select the intended account before creating the key | wrong account binding |
| Permission set | Read, Trade or Withdraw | start with Read and add only necessary permissions | withdrawal misuse |
| Passphrase | secret created during API setup | store it securely because it cannot be recovered | lost secret rotation |
| IP binding | network allowlist for API use | bind trusted IPs and document each one | dynamic IP changes |
| 2FA confirmation | interactive confirmation before creation | complete 2FA in the official OKX flow | phishing prompt |
| Expiry behavior | unbound trade or withdrawal keys may expire after inactivity | prefer IP-bound keys for long-running tools | policy changes |
| Third-party tools | external bots or platforms using the key | avoid withdrawal permission for shared tools | vendor custody of secrets |
| Stop rule | when setup should pause | stop if asked for seed phrases, remote access or unnecessary Withdraw permission | account-specific eligibility |
来源地图
- OKX:Subaccounts, Account Mode, and API Connections FAQ(okx-subaccounts)
- OKX:OKX API FAQ(okx-api-faq)
- OKX:OKX API Documentation(okx-api-docs)
- OKX:Terms of Service(okx-terms)
控制说明
1. Subaccount purpose
这一项要求读者先把公开来源翻译成操作规则。这里的含义是:risk separation for strategies or bots。可执行动作是:create a subaccount only when separation has a job。仍然未知的是:regional feature availability。因此本文不会把未知部分包装成安全承诺、收益承诺、官方背书、审批保证、可用性保证或注册诱导。
2. Account mode
这里的含义是:which products and markets the account can use。可执行动作是:configure mode before API use。仍然未知的是:mode not changeable via API。
核对地区资格与账户条款
打开 →3. Key account
这里的含义是:main account or chosen subaccount。可执行动作是:select the intended account before creating the key。仍然未知的是:wrong account binding。
4. Permission set
这里的含义是:Read, Trade or Withdraw。可执行动作是:start with Read and add only necessary permissions。仍然未知的是:withdrawal misuse。
5. Passphrase
这里的含义是:secret created during API setup。可执行动作是:store it securely because it cannot be recovered。仍然未知的是:lost secret rotation。
6. IP binding
这里的含义是:network allowlist for API use。可执行动作是:bind trusted IPs and document each one。仍然未知的是:dynamic IP changes。
7. 2FA confirmation
这里的含义是:interactive confirmation before creation。可执行动作是:complete 2FA in the official OKX flow。仍然未知的是:phishing prompt。
8. Expiry behavior
这里的含义是:unbound trade or withdrawal keys may expire after inactivity。可执行动作是:prefer IP-bound keys for long-running tools。仍然未知的是:policy changes。
9. Third-party tools
这里的含义是:external bots or platforms using the key。可执行动作是:avoid withdrawal permission for shared tools。仍然未知的是:vendor custody of secrets。
10. Stop rule
这里的含义是:when setup should pause。可执行动作是:stop if asked for seed phrases, remote access or unnecessary Withdraw permission。仍然未知的是:account-specific eligibility。
仍需明确的未知项
- regional feature availability
- mode not changeable via API
- wrong account binding
- withdrawal misuse
- lost secret rotation
- dynamic IP changes
- phishing prompt
- policy changes
- vendor custody of secrets
- account-specific eligibility
实用结论
本文最有价值的地方是克制。安全的 OKX 子账户 API 设置应先做账户隔离,再创建 key、选择权限、保存 passphrase 并限制 IP。OKX 表示,子账户可用于分离交易策略、管理多个交易机器人并独立控制风险;API key 可让外部工具读取账户数据和自动执行交易。OKX 子账户 FAQ 说明,创建 API key 时需选择账户或子账户、权限和 passphrase,并用 2FA 确认。OKX API FAQ 还说明,IP 地址有助于保护 key,每个 key 最多可绑定 20 个地址,passphrase 丢失后不能找回;未绑定 IP 且带交易或提现权限的 API key 可能在 14 天未使用后被删除。本文是安全流程,不是建议授予提现权限。 用户应获得一个更清楚的核验路径,而不是一个看似肯定、实则无法由公开证据承担的承诺。
相关专题与工具:交易所 API 与行情数据核查
核对地区资格与账户条款
打开 →来源与证据
04- Subaccounts, Account Mode, and API Connections FAQ · okx.com
- OKX API FAQ · okx.com
- OKX API Documentation · okx.com
- Terms of Service · okx.com