Skip to main content
Glama
bybit-exchange

Bybit MCP Server

Official

getTradeQuote

Get a price quote for buying or selling on-chain tokens, showing estimated receive amount, fees, and slippage before trade execution.

Instructions

Get a price quote before executing a purchase or redeem trade. Returns estimated receive amount, exchange rate, platform fee, gas cost, and slippage.

  • Purchase (buy): set tradeType=1, fromTokenCode as CEX token (e.g. CEX_1 for USDT), toTokenCode as DEX token

  • Redeem (sell): set tradeType=2, fromTokenCode as DEX token, toTokenCode as CEX token

The fromTokenCode and toTokenCode can be obtained from /v5/alpha/trade/pay-token-list (CEX tokens) and /v5/alpha/trade/biz-token-list (DEX tokens).

AI agent must display the quote details (amount, fees, slippage) to the user before proceeding to execution.

Do NOT call this endpoint without valid token codes. Use getPayTokenList and getBizTokenList first to resolve user input (e.g. "USDT", "PEPE") into proper token codes.

Agent hint: Use this endpoint to get a price quote before buying or selling on-chain tokens. Always show the quote to the user before executing. Do NOT call executePurchase or executeRedeem without first calling this endpoint. Do NOT use this for querying token prices only — use getBizTokenPriceList instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tradeTypeYes
fromTokenCodeYes
fromTokenAmountYes
toTokenCodeYes
quoteModeNo0
Behavior4/5

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

No annotations provided, so description carries full burden. It returns estimated receive amount, fees, gas cost, slippage. States agent must display quote to user. Warns not to call without valid token codes. Could mention idempotency or rate limits, but overall strong behavioral disclosure.

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?

Well-structured with clear sections and bullet points, but slightly verbose. Front-loaded with purpose and returns. Could trim some redundancy in agent hints, but every sentence adds value.

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?

For a tool with 5 parameters, 2 enums, no output schema, and complexity of two trade directions, the description is remarkably complete. It covers usage, prerequisites, token code sources, and agent responsibilities. No gaps for effective invocation.

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

Parameters4/5

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

Schema coverage is 0%, so description must compensate. It explains tradeType (1=purchase, 2=redeem) and token code orientation for each direction. Does not explain quoteMode or fromTokenAmount in detail, but provides enough context for typical usage. Adds significant value beyond schema.

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 it gets a price quote for purchase or redeem trades, specifies the two trade types with token code direction, and distinguishes from siblings like executePurchase, executeRedeem, and getBizTokenPriceList. The verb 'Get' and resource 'TradeQuote' are well-defined.

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?

Explicitly says to use before executing trades, lists alternatives (getBizTokenPriceList for prices only), and instructs to first call getPayTokenList/getBizTokenList to resolve token codes. Agent hints reinforce correct usage and warn against skipping this step.

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