跳至主要内容

查詢子帳戶的所有API Key信息

查詢某個子帳戶下所有的api key

提示
  • 任意權限可以訪問該接口
  • 僅支持母帳戶調用

HTTP 請求

GET /v5/user/sub-apikeys

請求參數

參數是否必須類型說明
subMemberIdtruestring子帳戶UID
limitfalseinteger每頁數量限制. [1, 20]. 默認: 20
cursorfalsestring游標,用於翻頁

返回參數

參數類型說明
resultarrayObject
> idstring唯一id. 內部使用
> ipsarray<string>綁定的IP, 未綁定IP則是*
> apiKeystringApi key
> notestring備註
> statusinteger當前狀態 1: 永久, 2: 已過期, 3: 仍在有效期內, 4: 即將過期 (少於7天)
> expiredAtdatetimeAPI key的過期日. 針對那些未綁定IP的api key或者修改過密碼的帳戶
> createdAtdatetimeAPI key的創建日
> typeintegerApi key類型. 1:個人使用, 2:綁定到第三方應用
> permissionsObject權限類型
>> ContractTradearray合約交易的權限 Order, Position
>> Spotarray現貨交易的權限 SpotTrade
>> Walletarray錢包的權限 AccountTransfer, SubMemberTransferList
>> OptionsarrayUSDC合約的權限. 該權限支持USDC合約下的期權和永續交易 OptionsTrade
>> Derivativesarray統一交易帳戶默認賦予的權限
>> CopyTradingarray總是[], 因為帶單帳戶只需要使用ContractTrade權限來進行API帶單
>> BlockTradearray大宗交易的權限. 子帳戶暫不支持,總是[]
>> Exchangearray兌換的權限 ExchangeHistory
>> NFTarrayNFT的權限. 子帳戶暫不支持, 總是[]
>> Affiliatearray代理商權限. 子帳戶暫不支持, 總是 []
> secretstring總是"******"
> readOnlybooleantrue:可讀可寫. false:只讀
> deadlineDayintegerAPI key失效的倒數日. 針對那些未綁定IP的api key或者修改過密碼的帳戶
> flagstringAPI Key的類型
nextPageCursorstring游標,用於翻頁

請求示例

GET /v5/user/sub-apikeys?subMemberId=100400345 HTTP/1.1
Host: api.bybit.com
X-BAPI-API-KEY: XXXXXX
X-BAPI-TIMESTAMP: 1699515251088
X-BAPI-RECV-WINDOW: 5000
X-BAPI-SIGN: XXXXXX
Content-Type: application/json

響應示例

{
"retCode": 0,
"retMsg": "",
"result": {
"result": [
{
"id": "24828209",
"ips": [
"*"
],
"apiKey": "XXXXXX",
"note": "UTA",
"status": 3,
"expiredAt": "2023-12-01T02:36:06Z",
"createdAt": "2023-08-25T06:42:39Z",
"type": 1,
"permissions": {
"ContractTrade": [
"Order",
"Position"
],
"Spot": [
"SpotTrade"
],
"Wallet": [
"AccountTransfer",
"SubMemberTransferList"
],
"Options": [
"OptionsTrade"
],
"Derivatives": [
"DerivativesTrade"
],
"CopyTrading": [],
"BlockTrade": [],
"Exchange": [
"ExchangeHistory"
],
"NFT": [],
"Affiliate": []
},
"secret": "******",
"readOnly": false,
"deadlineDay": 21,
"flag": "hmac"
}
],
"nextPageCursor": ""
},
"retExtInfo": {},
"time": 1699515251698
}