queryAPIKey
Retrieve detailed metadata for the authenticated Bybit API key, including permissions by category, IP whitelist, read-only status, expiration, VIP level, KYC region, and master/sub-account relationship.
Instructions
Query comprehensive information about an API key. Use master or sub-account's API key.
Important notes (from official Bybit V5 documentation):
"Any permission can access this endpoint" - available to both master and sub-user accounts
Can only query the API key that is being used to authenticate the request
Returns comprehensive metadata including permissions, account status, VIP level, KYC info
Secrets are NEVER returned for security
IP whitelist is returned in JSON array format
Permissions are parsed and returned by category
What information is returned:
✅ API key basic info (ID, key string, note, creation/expiration time)
✅ IP binding configuration
✅ Permissions breakdown by 15 categories
✅ Read-only status
✅ Key type (personal or third-party)
✅ Account identification (master/sub, parent UID)
✅ Account status (UTA/unified account upgrade status)
✅ Affiliate/referral information (affiliate ID, inviter ID)
✅ VIP/market maker level
✅ KYC verification level and region
Process Flow:
Parse metadata from request context to get member ID and API key
Query API key information from database
Validate API key status (must be VERIFIED)
Validate API key ownership (memberID must match)
Get account tags (UNIFIED_ACCOUNT_STATE, UTA)
Get master/sub relationship information
Get affiliate/referral information
Get VIP level from loyalty program service
Get KYC level and region from KYC service (with 5-minute cache)
Parse and format permissions
Permissions Parsing:
Legacy format: "All" → ["Order", "Position"]
Legacy format: "Order" or "Position" → single permission
New format: JSON string with permission categories and read-only flag
15 categories: ContractTrade, Spot, Wallet, Options, Derivatives, CopyTrading, BlockTrade, Exchange, NFT, Affiliate, Earn, FiatP2P, FiatBitPay, FiatConvertBroker, Compliance Compliance compatibility:
This V5 endpoint returns the group as
permissions.Compliance: ["ComplianceAppeal"]when granted, orpermissions.Compliance: []when not granted Account Status Fields:unified: 1 if UNIFIED_ACCOUNT_STATE tag = "SUCCESS", else 0uta: 1 if UTA tag = "SUCCESS", else 0isMaster: true if not a sub-account, false otherwise
Use Cases:
Check current API key's permissions and configuration
Verify API key expiration time
Get account VIP level and KYC status
Identify master/sub account relationship
Check UTA upgrade status
Agent hint: permissions.Compliance is ["ComplianceAppeal"] when granted and [] when not granted. It permits TM Onchain appeal queries and related material submission, and is available only to main-site master accounts with read-write API keys (readOnly=0). It is not granted by default; existing keys are not automatically granted this permission. This tool only inspects the authenticated key and cannot change any permission.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "queryAPIKey"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||