OKX API Key IP 白名单和过期规则准备清单
已验证事实边界
- OKX's API guide says API-key permissions include Read, Trade and Withdraw.
- OKX's API guide says the passphrase cannot be recovered if lost and a new API key must be created.
- OKX's API guide says clients are strongly recommended to link API keys to IP addresses.
- OKX's API guide says each API key can bind up to 20 IP addresses and supports IPv4, IPv6 and network-segment formats.
- OKX's API guide says API keys not linked to an IP address and having trade or withdraw permissions expire after 14 days of inactivity.
- OKX's API FAQ says failed API deposit, withdrawal or transfer troubleshooting should check API permissions, currency, network, destination account, address book or whitelist requirements and returned error code.
收起完整分析
决策矩阵
文章表格:可横向滑动,或聚焦表格区域后使用方向键。
| 核对项 | 含义 | 具体做法 | 尚未确认的事项 |
|---|---|---|---|
| Permission scope | Read, Trade and Withdraw permissions carry different operational blast radii | create separate keys for separate jobs | subaccount-specific constraints |
| Passphrase recovery | lost passphrases require key recreation rather than recovery | store non-secret key metadata and rotate key safely | organization key escrow policy |
| IP binding | OKX recommends binding API keys to IP addresses | bind production keys to stable egress addresses | dynamic IP change handling |
| Expiry condition | unbound trade or withdraw keys can expire after inactivity | monitor key age and last-use evidence without exposing secrets | future expiry rule changes |
| Withdrawal troubleshooting | withdrawal failures may depend on permission, network, address book or whitelist status | test with non-secret checklist evidence before automation | private account state |
| Change log watch | API behavior can change through official changelog updates | pin the checked changelog date in runbooks | undocumented incident behavior |
| Stop rule | automation should stop when permissions or IP allowlist state cannot be proven | pause trading or withdrawal scripts until key state is reverified | operator emergency override |
来源地图
- OKX API Docs:Overview - OKX API guide(okx-api-guide)
- OKX Help Center:OKX API FAQ(okx-api-faq)
- OKX Help Center:How do I enable allowlist? (web)(okx-withdraw-allowlist)
- OKX API Docs:OKX API changelog(okx-api-log)
- OKX Help Center:Security Help Center category(okx-security-help)
控制说明
1. Permission scope
这一项要求读者先把公开来源翻译成操作规则。这里的含义是:Read, Trade and Withdraw permissions carry different operational blast radii。可执行动作是:create separate keys for separate jobs。仍然未知的是:subaccount-specific constraints。因此本文不会把未知部分包装成安全承诺、收益承诺、官方背书、审批保证、恢复保证、可用性保证或注册诱导。
2. Passphrase recovery
这里的含义是:lost passphrases require key recreation rather than recovery。可执行动作是:store non-secret key metadata and rotate key safely。仍然未知的是:organization key escrow policy。
3. IP binding
这里的含义是:OKX recommends binding API keys to IP addresses。可执行动作是:bind production keys to stable egress addresses。仍然未知的是:dynamic IP change handling。
4. Expiry condition
这里的含义是:unbound trade or withdraw keys can expire after inactivity。可执行动作是:monitor key age and last-use evidence without exposing secrets。仍然未知的是:future expiry rule changes。
5. Withdrawal troubleshooting
这里的含义是:withdrawal failures may depend on permission, network, address book or whitelist status。可执行动作是:test with non-secret checklist evidence before automation。仍然未知的是:private account state。
6. Change log watch
这里的含义是:API behavior can change through official changelog updates。可执行动作是:pin the checked changelog date in runbooks。仍然未知的是:undocumented incident behavior。
7. Stop rule
这里的含义是:automation should stop when permissions or IP allowlist state cannot be proven。可执行动作是:pause trading or withdrawal scripts until key state is reverified。仍然未知的是:operator emergency override。
仍需明确的未知项
- subaccount-specific constraints
- organization key escrow policy
- dynamic IP change handling
- future expiry rule changes
- private account state
- undocumented incident behavior
- operator emergency override
实用结论
本文最有价值的地方是克制。OKX API 文档和帮助中心把 API key 操作定义为权限和网络控制问题,而不是一次性创建 key。API guide 说明 API key 包含 key、secret key 与 passphrase,并且权限可包括 Read、Trade 和 Withdraw。该文档还建议将 API key 绑定到 IP 地址,最多支持 20 个 IPv4、IPv6 或网段;未绑定 IP 且带有 trade 或 withdraw 权限的 API key,会在 14 天不活跃后过期。实用结论是:在把 OKX key 用于自动化前,应先拆分 passphrase 恢复、权限范围、IP 绑定、key 过期、提现故障排查和非秘密证据。 用户应获得一个更清楚的核验路径,而不是一个看似肯定、实则无法由公开证据承担的承诺。
来源与证据
05- 原文标题Overview - OKX API guide · okx.com
- OKX API FAQ · okx.com
- 原文标题How do I enable allowlist? (web) · okx.com
- 原文标题OKX API changelog · okx.com
- 原文标题Security Help Center category · okx.com
本文提到OKX。