Skip to main content
Glama
bybit-exchange

Bybit MCP Server

Official

getTradeQuote

Read-only

Get a price quote before buying or selling on-chain tokens. Returns estimated receive amount, exchange rate, fees, gas cost, and slippage to inform trade decisions.

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
quoteModeNo0
tradeTypeYes
toTokenCodeYes
fromTokenCodeYes
fromTokenAmountYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.11

TDQS

A4.9/5.0
Behavior5/5

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

The annotations (readOnlyHint=true) are consistent with the description's emphasis on retrieving a quote rather than executing a trade. The description adds important behavioral context beyond annotations: the exact return fields (estimated receive amount, exchange rate, platform fee, gas cost, slippage), the requirement to display the quote to the user before proceeding, and the precondition that valid token codes must be obtained first. This significantly clarifies what the tool does and doesn't do.

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

Conciseness5/5

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

The description is organized with a clear summary line, a return-value list, bulleted trade type instructions, and bolded agent directives. Each sentence serves a functional purpose, from token code sourcing to mandatory sequencing and exclusions. It is appropriately detailed for the tool's complexity without unnecessary fluff.

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?

With no output schema and zero schema-level parameter descriptions, the description carries the full burden of making the tool actionable. It covers the core purpose, parameter semantics, return values, required workflow, user-display requirement, and exclusions. The only minor gap (quoteMode semantics) is an optional parameter with a default, so the tool remains fully usable. Overall, this is a thoroughly complete definition.

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?

The input schema has 0% description coverage, so the description fully compensates for the most critical parameters: tradeType semantics (1=purchase, 2=redeem), fromTokenCode/toTokenCode direction for each trade type, and where to obtain these codes from other endpoints. However, the optional quoteMode parameter (enum 0/1/2) is not explained, and fromTokenAmount is only implied by context rather than explicitly defined.

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 opens with a specific verb and resource ('Get a price quote before executing a purchase or redeem trade') and clearly enumerates the two distinct modes (purchase/buy vs redeem/sell) with explicit token code direction. It also distinguishes itself from getBizTokenPriceList by stating this tool is not for price-only queries, making the purpose unambiguous among siblings.

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 explicitly states when to use the tool (before buy/sell execution), mandates that executePurchase or executeRedeem must not be called without first calling this endpoint, and tells the agent to use getPayTokenList and getBizTokenList first to resolve token codes. It also provides an exclusion by directing price-only queries to getBizTokenPriceList, offering clear routing guidance.

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