Skip to main content
Glama
bybit-exchange

Bybit MCP Server

Official

queryAPIKey

Retrieve detailed information about your Bybit API key, including permissions, account status, VIP level, KYC verification, and expiration time.

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:

  1. ✅ API key basic info (ID, key string, note, creation/expiration time)

  2. ✅ IP binding configuration

  3. ✅ Permissions breakdown by 14 categories

  4. ✅ Read-only status

  5. ✅ Key type (personal or third-party)

  6. ✅ Account identification (master/sub, parent UID)

  7. ✅ Account status (UTA/unified account upgrade status)

  8. ✅ Affiliate/referral information (affiliate ID, inviter ID)

  9. ✅ VIP/market maker level

  10. ✅ KYC verification level and region

Process Flow:

  1. Parse metadata from request context to get member ID and API key

  2. Query API key information from database

  3. Validate API key status (must be VERIFIED)

  4. Validate API key ownership (memberID must match)

  5. Get account tags (UNIFIED_ACCOUNT_STATE, UTA)

  6. Get master/sub relationship information

  7. Get affiliate/referral information

  8. Get VIP level from loyalty program service

  9. Get KYC level and region from KYC service (with 5-minute cache)

  10. 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

  • 14 categories: ContractTrade, Spot, Wallet, Options, Derivatives, CopyTrading, BlockTrade, Exchange, NFT, Affiliate, Earn, FiatP2P, FiatBitPay, FiatConvertBroker

Account Status Fields:

  • unified: 1 if UNIFIED_ACCOUNT_STATE tag = "SUCCESS", else 0

  • uta: 1 if UTA tag = "SUCCESS", else 0

  • isMaster: 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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description fully covers behavioral traits: it notes secrets are never returned, IP whitelist format, permissions parsing, account status fields, and a 5-minute cache for KYC. It is read-only and non-destructive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-organized with clear sections and front-loaded purpose. However, it is verbose, especially with process flow and parsing details that may be extraneous for an AI agent's decision-making.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema and zero parameters, the description is comprehensive: it lists 10 categories of returned info, explains key behaviors, and covers use cases. It leaves no gaps for an AI agent to understand what the tool does and returns.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has zero parameters, so the description adds crucial context that the tool operates on the authenticated API key automatically. This goes beyond the empty schema to clarify how the key is determined.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool queries 'comprehensive information about an API key' with a specific verb and resource. It distinguishes from siblings like listSubAPIKeysV5 by focusing on the current API key used for authentication.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context: use the tool with a master or sub-account's API key, and it can only query the key used for authentication. It does not explicitly mention when not to use it or provide alternatives, but the purpose is well-defined.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bybit-exchange/trading-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server