Skip to main content

Get Sub Account All API Keys

Query all api keys information of a sub UID.

tip
  • Any permission can access this endpoint
  • Only master account can call this endpoint

HTTP Request

GET /v5/user/sub-apikeys

Request Parameters

ParameterRequiredTypeComments
subMemberIdtruestringSub UID
limitfalseintegerLimit for data size per page. [1, 20]. Default: 20
cursorfalsestringCursor. Use the nextPageCursor token from the response to retrieve the next page of the result set

Response Parameters

ParameterTypeComments
resultarrayObject
> idstringUnique ID. Internal use
> ipsarray<string>IP bound
> apiKeystringApi key
> notestringThe remark
> statusinteger1: permanent, 2: expired, 3: within the validity period, 4: expires soon (less than 7 days)
> expiredAtdatetimeThe expiry day of the api key. Only for those api key with no IP bound or the password has been changed
> createdAtdatetimeThe create day of the api key
> typeintegerThe type of api key. 1:personal, 2:connected to the third-party app
> permissionsObjectThe types of permission
>> ContractTradearrayPermission of contract trade Order, Position
>> SpotarrayPermission of spot SpotTrade
>> WalletarrayPermission of wallet AccountTransfer, SubMemberTransferList
>> OptionsarrayPermission of USDC Contract. It supports trade option and USDC perpetual. OptionsTrade
>> DerivativesarrayUnified account api key have this permission by default. DerivativesTrade
>> CopyTradingarrayAlways [], Master Trader uses "Contract" permission to start Copytrading
>> BlockTradearrayPermission of blocktrade. Not applicable to subaccount, always []
>> ExchangearrayPermission of exchange ExchangeHistory
>> NFTarrayPermission of NFT. Not applicable to sub account, always []
>> AffiliatearrayPermission of Affiliate. Not applicable to sub account, always []
> secretstringAlways "******"
> readOnlybooleantrue, false
> deadlineDayintegerThe remaining valid days of api key. Only for those api key with no IP bound or the password has been changed
> flagstringApi key type
nextPageCursorstringRefer to the cursor request parameter

Request Example

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

Response Example

{
"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
}