Skip to main content
Glama
bybit-exchange

Bybit MCP Server

Official

executePurchase

Execute a buy trade for on-chain tokens using payment tokens after user confirms a quote obtained from getTradeQuote.

Instructions

Place a buy order to purchase on-chain tokens with payment tokens. Returns an orderNo that can be used with getOrderList to track order status.

Prerequisites (mandatory):

  1. Call getTradeQuote first to get quoteData, correctingCode, and gas

  2. Display quote details (amount, fees, slippage) to user

  3. Obtain explicit user confirmation

AI agent must obtain explicit user confirmation before calling this endpoint.

Response is an acknowledgment only — use getOrderList to confirm actual order status. On-chain confirmation typically takes 10-60 seconds.

Do NOT call this endpoint directly without a valid quote. All of quoteData, correctingCode, and gas must come from a non-expired getTradeQuote response.

Agent hint: Use this endpoint to execute a buy trade after getting a quote and user confirmation. Never call without user approval. Always call getTradeQuote first. Do NOT use this for selling — use executeRedeem instead. Do NOT guess or fabricate quoteData/correctingCode values — they must come from getTradeQuote.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromTokenCodeYes
fromTokenAmountYes
toTokenCodeYes
slippageYes
quoteDataYes
gasYes
quoteModeYes
correctingCodeYes
tenantNo
Behavior5/5

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

Even without annotations, the description discloses key behavioral traits: it is a write operation, requires user confirmation, returns an orderNo acknowledgment, and on-chain confirmation takes 10-60 seconds. It warns about the need for valid quote data, providing sufficient transparency for safe usage.

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-structured with bolded sections for prerequisites and warnings, and front-loaded with the core purpose. While most sentences add value, the agent hints section partially duplicates earlier points, making it slightly less concise.

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

Completeness4/5

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

Given the tool's complexity (9 parameters, no output schema), the description covers prerequisites, return value, and tracking via getOrderList. However, the lack of parameter explanations for the majority of inputs leaves a notable gap, preventing a perfect score.

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

Parameters2/5

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

The description mentions only three parameters (quoteData, correctingCode, gas) in the context of prerequisites, but does not explain the remaining six parameters (fromTokenCode, fromTokenAmount, toTokenCode, slippage, quoteMode, tenant). With 0% schema description coverage, the description should compensate but fails to provide meaning for most parameters.

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's purpose: 'Place a buy order to purchase on-chain tokens with payment tokens.' It distinguishes from sibling tools by explicitly mentioning that selling should use executeRedeem instead. The verb+resource combination is specific and unambiguous.

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

Usage Guidelines5/5

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

The description provides explicit prerequisites (call getTradeQuote first, get user confirmation) and exclusions (do not use for selling, do not call without valid quote, do not guess parameters). It also directs users to getOrderList for tracking, offering clear guidance on when and how to use the tool.

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