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
Parameter | Type | Comments |
---|---|---|
id | string | Unique id. Internal used |
note | string | The remark |
apiKey | string | Api key |
readOnly | integer | 0 :Read and Write. 1 :Read only |
secret | string | Always "" |
permissions | Object | The types of permission |
> ContractTrade | array | Permission of contract trade |
> Spot | array | Permission of spot |
> Wallet | array | Permission of wallet |
> Options | array | Permission of USDC Contract. It supports trade option and usdc perpetual. |
> Derivatives | array | Permission of derivatives |
> CopyTrading | array | Permission of copytrade. Not applicable to sub account, always [] |
> BlockTrade | array | Permission of blocktrade. Not applicable to sub account, always [] |
> Exchange | array | Permission of exchange |
> NFT | array | Permission of NFT. Not applicable to sub account, always [] |
ips | array | IP bound |
type | integer | The type of api key. 1 :personal, 2 :connected to the third-party app |
deadlineDay | integer | The remaining valid days of api key. Only for those api key with no IP bound or the password has been changed |
expiredAt | datetime | The expiry day of the api key. Only for those api key with no IP bound or the password has been changed |
createdAt | datetime | The create day of the api key |
unified | integer | Whether the account to which the api key belongs is a unified account. 0 :regular account; 1 :unified margin account |
uta | integer | Whether the account to which the account upgrade to unified trade account. 0 :regular account; 1 :unified trade account |
userID | integer | User ID |
inviterID | integer | Inviter ID (the UID of the account which invited this account to the platform) |
vipLevel | string | VIP Level |
mktMakerLevel | string | Market maker level |
affiliateID | integer | Affiliate Id. 0 represents that there is no binding relationship. |
rsaPublicKey | string | Rsa public key |
isMaster | boolean | If this api key belongs to master account or not |
parentUid | string | The 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
}