Skip to main content
Glama
bybit-exchange

Bybit MCP Server

Official

placeAdvanceEarnOrder

Place a Dual Assets staking order for SmartLeverage, DoubleWin, or DiscountBuy products. Supports stake and redeem order types with asynchronous processing.

Instructions

Place a Dual Assets staking order. Requires Earn permission on the API key.

Rate Limit: 5 req/s (UID)

Notes:

  • The order is processed asynchronously. A successful response means the order has been accepted, not settled. Use Get Order to track the order status (PendingSuccess).

  • The selectPrice and apyE8 must match a valid quote from Get Product Extra Info or the WebSocket feed. Stale quotes will be rejected.

  • orderLinkId is used for idempotency. Each orderLinkId is permanently recorded per product type — reusing the same value for the same category returns an error (orderLinkId already exists). Max length by category: DualAssets and SmartLeverage max 36 characters; DoubleWin max 64 characters; DiscountBuy max 40 characters. Allowed characters: a-z, A-Z, 0-9, -, _.


SmartLeverage additional notes:

  • Supports two order types: Stake (open position) and Redeem (close position).

  • For Stake: pass smartLeverageStakeExtra. initialPrice is the current market price you see when placing the order; the server validates the actual price is within ±5% of initialPrice (slippage protection, error 180030 if exceeded). breakevenPrice must come from Get Product Extra Info or the WebSocket — do not calculate it yourself.

  • For Redeem: must first call Get Redeem Estimation to cache the estimate, then pass smartLeverageRedeemExtra with the estRedeemAmount from the estimation. Redemption is not allowed within 60 minutes before settlement.


DoubleWin additional notes:

  • Supports two order types: Stake (subscribe) and Redeem (early redemption).

  • For Stake (fixed-range products, isRfqProduct=false): pass doubleWinStakeExtra with leverage and initialPrice. The leverage must not exceed the value from Get Product Extra Info or WebSocket. No need to pass lowerPrice/upperPrice.

  • For Stake (RFQ products, isRfqProduct=true): additionally pass lowerPrice and upperPrice (must be multiples of priceTickSize). Call Get Double Win Leverage first to obtain leverage and expireTime. The order must be placed before expireTime.

  • For Redeem: must first call Get Redeem Estimation to get estimated amount, then pass doubleWinRedeemExtra with positionId, estRedeemAmount, and optional isSlippageProtected. Redemption is not allowed within 30 minutes before settlement.


DiscountBuy additional notes:

  • Only supports order type Stake (purchase). Redemption before settlement is not supported.

  • Must pass discountBuyExtra with initialPrice, purchasePrice, knockoutPrice, knockoutCouponE8, instUid, and settleType — all values must come from Get Product Extra Info.

  • initialPrice is the spot price at order time (max 8 decimal places).

  • knockoutPrice must be greater than purchasePrice.

  • knockoutCouponE8 precision: actual coupon = knockoutCouponE8 / 10^8, max 4 decimal places on actual coupon.

  • instUid identifies the market maker providing this quote.

  • settleType controls settlement when the option is exercised (settlement price < purchasePrice): Base = receive underlying asset; Quote = receive USDT. If knocked out (settlement price ≥ knockoutPrice), user always receives USDT principal + coupon interest, and settleType is ignored.

  • orderLinkId max length is 40 characters for DiscountBuy. Once used, the same orderLinkId cannot be reused for the same product category — resubmission returns an error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryYes
productIdYes
orderTypeYes
amountYes
accountTypeYes
coinYes
orderLinkIdYes
dualAssetsExtraNo
interestCardNo
smartLeverageStakeExtraNo
smartLeverageRedeemExtraNo
doubleWinStakeExtraNo
doubleWinRedeemExtraNo
discountBuyExtraNo
Behavior5/5

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

With no annotations provided, the description fully discloses behavioral traits: async acceptance (order not settled on success), rate limits, idempotency constraints (orderLinkId persists per category), quote validation (stale quotes rejected), slippage protection (SmartLeverage initialPrice ±5%), redemption restrictions (60 min for SmartLeverage, 30 min for DoubleWin), and error handling (error 180030). Comprehensive.

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 long but logically structured: core purpose, prerequisites, rate limit, general notes, then per-category sections with bullet points. Every sentence is informative and necessary given the complexity. Minor trim could improve conciseness, but the structure is excellent for an AI agent to parse.

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 complexity (14 params, nested objects, 4 categories, no output schema, no annotations), the description is highly complete. It covers prerequisites, async behavior, error conditions, redemption rules, and field sources. The only minor gap is lack of explicit description of the response payload (e.g., order ID), but it directs to Get Order for tracking, implicitly covering return values.

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?

Schema description coverage is 0%, so the description carries full burden. It explains every nested object's fields: e.g., smartLeverageStakeExtra.initialPrice is current market price, breakevenPrice must come from Get Product Extra Info; doubleWinStakeExtra.leverage not exceeding product info, lowerPrice/upperPrice required for RFQ; discountBuyExtra fields explained in detail with precision constraints. The description adds significant value beyond the raw 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 identifies the tool's purpose: 'Place a Dual Assets staking order.' While the title is missing, the verb 'Place' and the specific resource 'AdvanceEarnOrder' are clear. The description expands to cover multiple categories (DualAssets, SmartLeverage, DoubleWin, DiscountBuy), and the tool name distinguishes it from siblings like placeEarnOrder, placeFixedTermOrder, and placeTokenOrder.

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 guidelines: requires 'Earn' permission, 5 req/s rate limit, asynchronous processing, quote freshness (selectPrice/apyE8 must match valid quotes), idempotency via orderLinkId, and detailed per-category instructions. It also references when to use ancillary tools (e.g., Get Order for tracking, Get Product Extra Info for quotes, Get Redeem Estimation). No contradictions or misleading 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

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