交易所动态

OKX API Key IP 白名单和过期规则准备清单

4 分钟

已验证事实边界

1. OKX's API guide says API-key permissions include Read, Trade and Withdraw. 2. OKX's API guide says the passphrase cannot be recovered if lost and a new API key must be created. 3. OKX's API guide says clients are strongly recommended to link API keys to IP addresses. 4. OKX's API guide says each API key can bind up to 20 IP addresses and supports IPv4, IPv6 and network-segment formats. 5. 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. 6. 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.

收起完整分析

决策矩阵

文章表格:可横向滑动,或聚焦表格区域后使用方向键。

CheckWhat it meansPractical actionUnknown to keep explicit
Permission scopeRead, Trade and Withdraw permissions carry different operational blast radiicreate separate keys for separate jobssubaccount-specific constraints
Passphrase recoverylost passphrases require key recreation rather than recoverystore non-secret key metadata and rotate key safelyorganization key escrow policy
IP bindingOKX recommends binding API keys to IP addressesbind production keys to stable egress addressesdynamic IP change handling
Expiry conditionunbound trade or withdraw keys can expire after inactivitymonitor key age and last-use evidence without exposing secretsfuture expiry rule changes
Withdrawal troubleshootingwithdrawal failures may depend on permission, network, address book or whitelist statustest with non-secret checklist evidence before automationprivate account state
Change log watchAPI behavior can change through official changelog updatespin the checked changelog date in runbooksundocumented incident behavior
Stop ruleautomation should stop when permissions or IP allowlist state cannot be provenpause trading or withdrawal scripts until key state is reverifiedoperator 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
  1. OKX API DocsOverview - OKX API guide · okx.com
  2. OKX Help CenterOKX API FAQ · okx.com
  3. OKX Help CenterHow do I enable allowlist? (web) · okx.com
  4. OKX API DocsOKX API changelog · okx.com
  5. OKX Help CenterSecurity Help Center category · okx.com