Skip to main content

Get API Key Information

Get the information of the api key. Use the api key pending to be checked to call the endpoint. Both master and sub user's api key are applicable.

tip

Any permission can access this endpoint.

HTTP Request

GET /user/v3/private/query-api

Request Parameters

None

Response Parameters

ParameterTypeComments
idstringUnique id. Internal used
notestringThe remark
apiKeystringApi key
readOnlyinteger0:Read and Write. 1:Read only
secretstringAlways ""
permissionsObjectThe types of permission
> ContractTradearrayPermission of contract trade
> SpotarrayPermission of spot
> WalletarrayPermission of wallet
> OptionsarrayPermission of USDC Contract. It supports trade option and usdc perpetual.
> DerivativesarrayPermission of derivatives
> CopyTradingarrayPermission of copytrade. Not applicable to sub account, always []
> BlockTradearrayPermission of blocktrade. Not applicable to sub account, always []
> ExchangearrayPermission of exchange
> NFTarrayPermission of NFT. Not applicable to sub account, always []
ipsarrayIP bound
typeintegerThe type of api key. 1:personal, 2:connected to the third-party app
deadlineDayintegerThe remaining valid days of api key. Only for those api key with no IP bound or the password has been changed
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
unifiedintegerWhether the account to which the api key belongs is a unified account. 0:regular account; 1:unified margin account
utaintegerWhether the account to which the account upgrade to unified trade account. 0:regular account; 1:unified trade account
userIDintegerUser ID
inviterIDintegerInviter ID (the UID of the account which invited this account to the platform)
vipLevelstringVIP Level
mktMakerLevelstringMarket maker level
affiliateIDintegerAffiliate Id. 0 represents that there is no binding relationship.
rsaPublicKeystringRsa public key
isMasterbooleanIf this api key belongs to master account or not
parentUidstringThe main account uid. Returns "0" when the endpoint is called by main account

Request Example

GET /user/v3/private/query-api HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: xxxxxxxxxxxxx
X-BAPI-API-KEY: xxxxxxxxxxxxx
X-BAPI-TIMESTAMP: 1671177977555
X-BAPI-RECV-WINDOW: 50000

Response Example

{
"retCode": 0,
"retMsg": "",
"result": {
"id": "13770661",
"note": "XXXXXX",
"apiKey": "XXXXXX",
"readOnly": 0,
"secret": "",
"permissions": {
"ContractTrade": [
"Order",
"Position"
],
"Spot": [
"SpotTrade"
],
"Wallet": [
"AccountTransfer",
"SubMemberTransfer"
],
"Options": [
"OptionsTrade"
],
"Derivatives": [
"DerivativesTrade"
],
"CopyTrading": [
"CopyTrading"
],
"BlockTrade": [],
"Exchange": [
"ExchangeHistory"
],
"NFT": [
"NFTQueryProductList"
]
},
"ips": [
"*"
],
"type": 1,
"deadlineDay": 83,
"expiredAt": "2023-05-15T03:21:05Z",
"createdAt": "2022-10-16T02:24:40Z",
"unified": 0,
"uta": 0,
"userID": 24600000,
"inviterID": 0,
"vipLevel": "No VIP",
"mktMakerLevel": "0",
"affiliateID": 0,
"rsaPublicKey": "",
"isMaster": false,
"parentUid": "24617703"
},
"retExtInfo": {},
"time": 1676891757649
}