交易所動態

OKX 与 Bybit 子账户 API 权限和 IP 绑定控制

4 分鐘

本文正文暫以英文原文展示,翻譯版本需完成來源複核後再發布。

已验证事实边界

1. OKX API documentation lists Read, Trade and Withdraw as API key permissions. 2. OKX API documentation says API keys can be linked to IP addresses and describes inactivity expiry behavior for unlinked trade or withdraw keys. 3. OKX help documentation explains creating API keys for main accounts and subaccounts. 4. Bybit API documentation describes creating a Sub UID API key with readOnly, ips and permissions parameters. 5. Bybit documentation states that leaving ips unbound or using wildcard behavior has different validity consequences than binding IPs. 6. Bybit subaccount guidance describes API key creation from the subaccount management surface.

收起完整分析

决策矩阵

文章表格:可橫向滑動,或聚焦表格區域後使用方向鍵。

CheckWhat it meansPractical actionUnknown to keep explicit
Account scopemain-account and subaccount keys can address different account surfacesrecord the exact account or subaccount selected before generating a keywhether a later transfer or managed-subaccount change altered the intended boundary
Permission scoperead, trade and withdraw permissions change blast radiusstart with read-only unless the task requires trade accesswhether a third-party tool silently requests broader permissions
IP bindingIP allowlists reduce but do not eliminate API-key riskbind production keys to expected server addresses where supportedwhether the automation will run from changing residential or cloud egress IPs
Secret handlingpassphrases, secret keys and signatures are credential materialstore them only in the approved secret channel and never in logswhether debug output or screenshots expose a secret fragment
Expiry and rotationunbound keys can have validity or inactivity constraintsrecord creation time, last-used state and rotation conditionwhether a dormant key fails only during live recovery
Withdrawal boundarywithdraw permission is materially different from order managementexclude withdrawal permission unless a separately reviewed workflow requires itwhether address-book or risk controls still block the route

来源地图

  • OKX API Documentation:OKX API guide(okx-api-guide)
  • OKX Help Center:Subaccounts, Account Mode, and API Connections FAQ(okx-subaccounts-faq)
  • Bybit API Documentation:Create Sub UID API Key(bybit-create-sub-api)
  • Bybit Learn:How to Use Bybit Subaccount(bybit-subaccount-guide)

控制说明

1. Account scope

这一项要求读者把公开来源翻译成操作规则。这里的含义是:main-account and subaccount keys can address different account surfaces。可执行动作是:record the exact account or subaccount selected before generating a key。仍然未知的是:whether a later transfer or managed-subaccount change altered the intended boundary。因此本文不会把未知部分包装成收益承诺、牌照承诺、审批保证、安全保证、恢复保证、平台排名或价格暗示。

2. Permission scope

这里的含义是:read, trade and withdraw permissions change blast radius。可执行动作是:start with read-only unless the task requires trade access。仍然未知的是:whether a third-party tool silently requests broader permissions。

操作测试也必须很窄。这就是本文坚持以清单形式呈现的原因。

3. IP binding

这里的含义是:IP allowlists reduce but do not eliminate API-key risk。可执行动作是:bind production keys to expected server addresses where supported。仍然未知的是:whether the automation will run from changing residential or cloud egress IPs。

操作测试也必须很窄。这就是本文坚持以清单形式呈现的原因。

4. Secret handling

这里的含义是:passphrases, secret keys and signatures are credential material。可执行动作是:store them only in the approved secret channel and never in logs。仍然未知的是:whether debug output or screenshots expose a secret fragment。

操作测试也必须很窄。这就是本文坚持以清单形式呈现的原因。

5. Expiry and rotation

这里的含义是:unbound keys can have validity or inactivity constraints。可执行动作是:record creation time, last-used state and rotation condition。仍然未知的是:whether a dormant key fails only during live recovery。

操作测试也必须很窄。这就是本文坚持以清单形式呈现的原因。

6. Withdrawal boundary

这里的含义是:withdraw permission is materially different from order management。可执行动作是:exclude withdrawal permission unless a separately reviewed workflow requires it。仍然未知的是:whether address-book or risk controls still block the route。

操作测试也必须很窄。这就是本文坚持以清单形式呈现的原因。

仍需明确的未知项

  • whether a later transfer or managed-subaccount change altered the intended boundary
  • whether a third-party tool silently requests broader permissions
  • whether the automation will run from changing residential or cloud egress IPs
  • whether debug output or screenshots expose a secret fragment
  • whether a dormant key fails only during live recovery
  • whether address-book or risk controls still block the route

实用结论

OKX 与 Bybit 都记录了 API 权限、子账户边界和 IP 绑定,但它们的控制表面不能互相替代。OKX 文档区分 Read、Trade 与 Withdraw 权限,说明 API key 可以绑定 IP 地址,并解释主账户与子账户 key 创建边界。Bybit API 文档描述创建 sub-UID API key、read-only 模式、permission objects 和 IP 绑定行为。有用输出是一份交易前证据清单:账户范围、权限范围、IP 范围、passphrase 或签名 secret 处理、过期行为,以及在启用任何自动下单或提现路径前的暂停规则。 本文停在证据边界内,帮助读者决定下一步核验什么,而不是把公开文档改写成私人账户、钱包、API key、池子路径、稳定币余额、代币化资产或政策框架在任何未来条件下都能成功的承诺。

來源與證據

04
  1. OKX API DocumentationOKX API guide · app.okx.com
  2. OKX Help CenterSubaccounts, Account Mode, and API Connections FAQ · okx.com
  3. Bybit API DocumentationCreate Sub UID API Key
  4. Bybit LearnHow to Use Bybit Subaccount · bybit.com