Skip to main content
Glama
bybit-exchange

Bybit MCP Server

Official

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
BYBIT_API_KEYNoYour Bybit API key (required for authenticated endpoints)
BYBIT_TESTNETNoSet to 'true' to use the testnetfalse
BYBIT_API_SECRETNoYour Bybit API secret for HMAC-SHA256 signing (use with System-generated API key)
BYBIT_API_PRIVATE_KEY_PATHNoAbsolute path to your RSA private key PEM file for RSA-SHA256 signing (use with Self-generated API key)

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
accountBorrowB

Manual borrow for Unified account.

Rules:

  • Borrowing via OpenAPI endpoint supports variable rate borrowing only

  • This endpoint is for manual borrowing operations only

  • Unified account only

Service: bizasset-uta-loan-prod

accountNoConvertRepayA

Manual repay without asset conversion (lossless repay). The system will only use the spot available balance of the debt currency to repay.

Rules:

  • If only coin is provided without amount, the system uses the available spot balance of the debt currency

  • If coin is not passed in input parameter, amount cannot be passed

  • Repayment is prohibited between 04:00 and 05:30 per hour

  • Interest is calculated based on the BorrowAmount at 05:00 per hour

  • Floating-rate liabilities are repaid before fixed-rate ones

  • BYUSDT cannot be used for repayment

Service: bizasset-uta-loan-prod

accountRepayA

Manually repay the liabilities of Unified account.

Rules:

  • If neither coin nor amount is provided, the system repays all liabilities

  • If only coin is provided (without amount), that coin's liability is fully repaid

  • If coin is not passed, amount cannot be passed

  • The system uses spot available balance first; remaining amounts trigger asset conversion per liquidation order

  • Floating-rate liabilities are repaid before fixed-rate liabilities

  • BYUSDT and MNT are excluded from standard conversion repayment

  • Repayment is blocked between 04:00–05:30 UTC hourly; interest is calculated at 05:00 UTC

  • Conversion fees use the higher asset rate with a USD 300,000 per-transaction limit

Service: bizasset-uta-loan-prod

getAccountInfoA

Retrieve unified account configuration including margin mode, account status, and feature settings. No parameters required.

Rate limit: 10 req/s

Agent hint: Use this to check account configuration before performing operations that depend on margin mode or account type. The unifiedMarginStatus field indicates the UTA version: 4 = UTA 2.0, 5 = UTA 2.0, 6 = UTA Pro. Check marginMode to confirm ISOLATED_MARGIN, REGULAR_MARGIN, or PORTFOLIO_MARGIN.

getAccountInstrumentsA

Query tradable instrument specifications for the user's account. Supports spot, linear (USDT/USDC perpetual and futures), and inverse contracts. Returns contract details, leverage, price, and lot size filters.

Rate limit: 10 req/s

Agent hint: Use this to get trading rules before placing orders. The category parameter is required. For linear/inverse, use symbol to filter to a specific contract. Response structure differs between spot and linear/inverse categories. Spot does not support pagination.

getAccountWithdrawalInfoA

Query available withdrawal balance for specified coin(s) in the Unified account.

  • The coinName parameter is required and accepts one or more coin names separated by commas (max 20 coins).

  • Returns the available withdrawal amount for each queried coin.

getBorrowHistoryA

Query interest and borrowing records for the unified account. Supports filtering by currency and time range with pagination.

Rate limit: 5 req/s

Agent hint: Use this to review borrowing costs and interest history. Filter by currency (USDC, USDT, BTC, ETH). Default returns 30 days if no time range is specified. Max 30-day span. Use cursor for pagination, limit max 50 per page.

getCoinGreeksA

Query option Greeks aggregated by base coin. Returns delta, gamma, vega, and theta for each base coin with option positions.

Rate limit: 10 req/s

Agent hint: Use this for options risk management. Pass baseCoin to filter (e.g., BTC, ETH, SOL). If omitted, returns Greeks for all base coins. All Greek values are returned as string numbers.

getCollateralInfoA

Query collateral information including borrowing rates, limits, and collateral settings. Returns per-coin data on borrowing capacity, rates, and status.

Rate limit: 10 req/s

Agent hint: Use this to check borrowing rates and collateral status. Pass currency to filter for a specific coin. Key fields: hourlyBorrowRate, maxBorrowingAmount, availableToBorrow, borrowable, marginCollateral, collateralSwitch. Note that borrowing limits are shared across parent and sub-accounts.

getDcpInfoA

Query Disconnection Protection (DCP) configuration. Returns DCP status and time window per product type. Must be pre-authorized by account manager.

Rate limit: 10 req/s

Agent hint: Use this to check DCP settings. No parameters needed. Returns an array of product-level DCP configs with status and time window. Only works for accounts that have DCP enabled by their account manager. Empty result means DCP is not configured.

getFeeRateA

Query the maker and taker fee rates for the specified product category. Can filter by symbol (spot/linear/inverse) or baseCoin (options only).

Rate limit: 10 req/s

Agent hint: Use this to check fee rates before trading. The category parameter is required. Use symbol to filter for spot/linear/inverse. Use baseCoin for options (e.g., BTC, ETH, SOL). Fee rates are returned as decimal strings (e.g., "0.0006" = 0.06%).

getMmpStateA

Query Market Maker Protection configuration and freeze status for the specified base coin. Returns MMP parameters and current state.

Rate limit: 5 req/s

Agent hint: Use this to check MMP settings and freeze status. The baseCoin parameter is required. Key fields: mmpEnabled (whether MMP is active), window (time window in ms), frozenPeriod (freeze duration in ms), qtyLimit, deltaLimit, mmpFrozen (current freeze status), mmpFrozenUntil (freeze expiry timestamp).

getSmpGroupA

Query the Self-Matching Prevention (SMP) group ID associated with the account. Returns 0 if the account does not belong to any group.

Rate limit: 10 req/s

Agent hint: Use this to check the SMP group assignment. No parameters needed. Returns smpGroup as an integer (0 = no group). SMP groups prevent self-matching between accounts in the same group.

getTransactionLogA

Query unified account wallet transaction logs. Supports filtering by category, currency, transaction type, and time range. Returns up to 2 years of historical data.

Rate limit: 5 req/s

Agent hint: Use this to retrieve detailed wallet transaction history. Filter by category (spot/linear/option/inverse), currency, or type. Time range defaults to last 24h. Max 7-day span when both startTime and endTime are given. Use cursor for pagination. Limit max is 50 per page.

getUserSettingConfigA

Query the user account setting configuration, including margin mode, account mode, spot hedging status, and other account-level settings.

Notes:

  • This endpoint requires authentication but no query parameters.

  • Returns the current account configuration for the authenticated user.

  • Maps internally to /v5/account/info on the public Bybit API.

getWalletBalanceB

Obtain wallet balance, query asset information of each currency, and each currency carries the risk rate of the current position.

  • By default, non-zero asset or liability currencies are not returned.

  • Unified account covers: UNIFIED

  • For Funding wallet balance, please use a separate endpoint.

Notes:

  • Under UTA manual borrow logic, spotBorrow represents spot liabilities.

  • During extreme market volatility, the interface may experience increased latency.

quickRepaymentC

Execute quick repayment for specified coin

resetMmpA

Reset MMP freeze state and clear trading history counters. Unfreezes the account if currently frozen, or resets counters if not frozen.

Rate limit: 5 req/s

Agent hint: Use this to unfreeze an MMP-frozen account or reset the qtyLimit/deltaLimit counters. Only requires baseCoin parameter. After reset, counters go to 0 regardless of whether the account was frozen or not.

setBatchCollateralSwitchC

Batch enable or disable multiple coins as collateral

setCollateralSwitchC

Enable or disable specified coin as collateral

setHedgingModeB

Enable or disable PM include spot hedging mode

setMarginModeA

Set the account margin mode. Supports ISOLATED_MARGIN, REGULAR_MARGIN, and PORTFOLIO_MARGIN. Returns failure reasons if the mode cannot be set.

Rate limit: 5 req/s

Agent hint: Use this to change the account's margin mode. The setMarginMode field is required. Check the result.reasons array for failure details. Portfolio margin typically requires a minimum equity threshold (e.g., 1000 USDC). Use getAccountInfo first to check the current mode.

setMmpA

Configure Market Maker Protection parameters for options trading. All parameters are required. Set frozenPeriod to "0" for permanent freeze until manual reset.

Rate limit: 5 req/s

Agent hint: Use this to configure MMP for options market making. All five parameters are required. window and frozenPeriod are in milliseconds. qtyLimit and deltaLimit are positive numbers with max 2 decimals. Set frozenPeriod to "0" to require manual reset via resetMmp endpoint.

setPriceLimitA

Configure price limit action behavior per product category. Controls whether orders exceeding price limits are auto-adjusted or rejected.

Rate limit: 5 req/s

Agent hint: Use this to control how orders are handled when they exceed price limits. Set modifyEnable=true for auto-adjustment, false for rejection. Settings for linear or inverse apply to all futures. Use getUserSettings to check current config.

getAdvanceEarnOrderC

Query your order history. Requires Earn permission on the API key.

Rate Limit: 10 req/s (UID)

getAdvanceEarnPositionC

Query your active positions. Requires Earn permission on the API key.

Rate Limit: 10 req/s (UID)

DiscountBuy notes: Only returns active/settling positions (status = Active or Settling). The coin parameter filters by underlying asset (e.g., coin=BTC returns BTC-underlying positions).

getAdvanceEarnProductA

Query available Advance Earn product listings. No authentication required.

Rate Limit: 50 req/s (IP)

getAdvanceEarnProductExtraInfoA

Get real-time quotes (target prices and APY) for a specific Dual Assets product. Quotes are sourced from institutional market makers and update frequently (second-level). No authentication required.

Rate Limit: 50 req/s (IP)

Tip: For real-time updates, subscribe to the WebSocket topic earn.dualassets.offers instead of polling this endpoint. Use this endpoint for initial load or fallback.

placeAdvanceEarnOrderA

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.

getAffiliateUserInfoA

Query detailed information for a specified direct client user under the affiliate account, including VIP level, KYC level, wallet balance range, 30-day / 365-day trading volume, deposit amount, and commission data.

Notes:

  • Must use an API Key with affiliate permission bound to a Master UID.

  • uid is the Master UID of the direct client to query.

  • depositAmount30Day / depositAmount365Day are updated every 5 minutes.

  • Trading volume covers three business lines: derivatives, options, and spot.

  • Commission data is for reference only; refer to the Affiliate Portal for authoritative figures.

  • totalWalletBalance returns a range value, not an exact balance:

    • "1" → < 100 USDT

    • "2" → 100–500 USDT

    • "3" → 500–1000 USDT (or similar tier)

    • "4" → > 500 USDT

getAffiliateUserListA

Query the list of all direct client users under the current affiliate account. Supports cursor-based pagination. Trading volume, deposit amount, and commission data for 30-day, 365-day, and custom date ranges can be returned on demand.

Notes:

  • Must use an API Key with affiliate permission bound to a Master UID.

  • For cursor, pass "" or "0" on the first request; pass the nextPageCursor from the previous response for subsequent pages.

  • need30, need365, and needDeposit default to false; enable as needed to avoid unnecessary performance overhead.

  • When startDate / endDate are provided, the response includes custom-range fields (takerVol, makerVol, tradeVol, tradfiTradeVol, commissionsVol) and omits the 30-day / 365-day fields.

  • The commission map always returns five fixed currencies: BTC, ETH, MNT, USDC, USDT.

executeLPRedeemA

Execute LP redemption to withdraw liquidity from a pool position. Returns an order number that can be used to track redemption status.

Prerequisites (mandatory):

  1. Call getLPPositionList to get position details and positionId

  2. Display redemption details (amount, expected tokens, fees) to user

  3. Obtain explicit user confirmation

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

Response is an acknowledgment only — use getLPOrderList to confirm actual redemption. On-chain confirmation and token transfer typically takes 10-60 seconds.

Do NOT call this endpoint directly without user approval.

Agent hint: Use this endpoint to execute LP redemption after getting user confirmation. Never call without user approval. Always call getLPPositionList first. dercRatio is the reduction ratio: "0.5" = 50% withdrawal, "1" = full withdrawal.

executeLPStakeA

Execute LP stake to provide liquidity and earn rewards. Returns a position ID that can be used to track the position status.

Prerequisites (mandatory):

  1. Call getLPPayTokenList to verify sufficient balance

  2. Call getLPPoolInfo to understand pool parameters

  3. Display stake details (amount, fees, expected APY) to user

  4. Obtain explicit user confirmation

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

Response is an acknowledgment only — use getLPPositionList to confirm actual position. Position activation typically takes 10-60 seconds for on-chain confirmation.

Do NOT call this endpoint directly without user approval.

Agent hint: Use this endpoint to execute LP stake after getting user confirmation. Never call without user approval. Always call getLPPayTokenList and getLPPoolInfo first. positionId=0 creates new position; non-zero adds to existing position. Either use rangeLower/rangeUpper OR priceLower/priceUpper, not both.

executePredictionBuyA

Execute a buy order for prediction outcome tokens. Pays USDC and receives outcome token shares.

Prerequisites (mandatory):

  1. Call getPredictionEngineStatus — engine must be available

  2. Call getPredictionEventDetail — get tokenId and verify market is open

  3. Call getPredictionOrderEstimate — preview the order details

  4. Display the estimate to the user and obtain explicit confirmation

Do NOT call this endpoint without explicit user confirmation.

Phase 1 supports orderType=1 (FOK) only. A FOK order that cannot be fully filled at the current price will be entirely cancelled. Use slippage to set price tolerance (e.g., "0.05" = 5%).

Response is an ACK only. Check getPredictionOrderList for final fill status.

Agent hint: REQUIRES explicit user confirmation before calling. Always call getPredictionEngineStatus, getPredictionEventDetail, and getPredictionOrderEstimate first. Show estimate details to user and wait for explicit "yes" before proceeding. orderType=1 (FOK) is the only supported type. slippage="0.05" means accept up to 5% price movement. Response is async ACK — check getPredictionOrderList for actual fill result.

executePredictionSellA

Execute a sell order for prediction outcome tokens. Exchanges token shares for USDC.

Prerequisites (mandatory):

  1. Call getPredictionEngineStatus — engine must be available

  2. Call getPredictionPositionList — verify the user holds the token shares

  3. Call getPredictionOrderEstimate — preview the sell order details

  4. Display the estimate to the user and obtain explicit confirmation

Do NOT call this endpoint without explicit user confirmation.

Phase 1 supports orderType=1 (FOK) only. A FOK order that cannot be fully filled will be entirely cancelled. Use slippage to set price tolerance (e.g., "0.05" = 5%).

Response is an ACK only. Check getPredictionOrderList for final fill status.

Agent hint: REQUIRES explicit user confirmation before calling. Always call getPredictionEngineStatus, getPredictionPositionList, and getPredictionOrderEstimate first. Show estimate details to user and wait for explicit "yes" before proceeding. orderType=1 (FOK) is the only supported type. size is in shares (not USDC). Response is async ACK — check getPredictionOrderList for actual fill result.

executePurchaseA

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.

executeRedeemA

Place a sell order to redeem on-chain tokens for 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 sell trade after getting a quote and user confirmation. Never call without user approval. Always call getTradeQuote first. Do NOT use this for buying — use executePurchase instead. Do NOT guess or fabricate quoteData/correctingCode values — they must come from getTradeQuote.

getAssetDetailA

Query detailed holding information for a specific token by chain code and token address. Returns quantity, USD value, unrealized PnL, cost price, and current market price.

The result contains an assetList array with 0 or 1 element. An empty assetList means the user does not hold this token or the token is not available.

Use chainCode and tokenAddress from getAssetList response or from getBizTokenList.

Do NOT use this endpoint to get general token market data — use getBizTokenPriceList instead. Do NOT use this to get project info (description, links) — use getBizTokenDetails instead.

Agent hint: Use this endpoint to get detailed holding info for a specific token when user asks about a particular asset. Requires chainCode + tokenAddress — get these from getAssetList or getBizTokenList. Response has assetList array with 0 or 1 element. Empty means user doesn't hold this token. Do NOT use this for general market data — use getBizTokenPriceList. Do NOT use this for token project info — use getBizTokenDetails.

getAssetListA

Query user's on-chain token portfolio. Returns total portfolio value in USD and individual token holdings with unrealized PnL, cost basis, and current market price.

Only tokens with non-zero balance are returned. Zero-balance tokens are filtered out.

Use tradeFlag to determine if a token can be sold via executeRedeem. Use tokenCode from the response for quote and execution requests. Use chainCode + tokenAddress from the response to call getAssetDetail for more info.

Do NOT use this endpoint to discover new tokens to buy — use getBizTokenList instead. Do NOT use this to get market data for tokens you don't hold — use getBizTokenPriceList.

Agent hint: Use this endpoint when user asks about their assets, balance, holdings, portfolio, or profit/loss. Returns total USD value and per-token PnL. Check tradeFlag before attempting to sell. Use tokenCode from the response for quote and trade execution. Do NOT use this to discover new tokens — use getBizTokenList. Do NOT use this for market data on non-held tokens — use getBizTokenPriceList.

getBizTokenDetailsA

Query detailed information for a specific on-chain token. Returns project description, social links (Twitter, website, whitepaper), risk flag, order quantity limits, and token status.

AI agent should call this when user asks about a specific token's details, project info, or risk status. Use chainCode and tokenAddress from getBizTokenList or getAssetList response.

When showMessage=1, display the content notification to the user. If linkName and linkAddress are provided, include the link in the notification.

Do NOT use this endpoint to get token prices — use getBizTokenPriceList instead. Do NOT use this to browse available tokens — use getBizTokenList.

Agent hint: Use this endpoint to get detailed token info including description, website, Twitter, whitepaper, and risk flags. Requires chainCode + tokenAddress — get these from getBizTokenList or getAssetList. When showMessage=1, display the content notification to the user. Do NOT use this for token prices — use getBizTokenPriceList. Do NOT use this to browse tokens — use getBizTokenList.

getBizTokenListA

Query on-chain tokens available for trading, optionally filtered by tag. Returns DEX_<id> token code, contract address, risk flag, order quantity limits, and supported payment token codes.

AI agent should call this when user wants to discover tokens or expresses buy intent without specifying a token. Use tokenTag to filter by category.

Do NOT use this endpoint to get token prices or market data — use getBizTokenPriceList. Do NOT use this to get user's holdings — use getAssetList.

Agent hint: Use this endpoint to discover tradable on-chain tokens and resolve token names to DEX token codes. Call when user asks what tokens are available or wants to browse tokens by category. Warn user if riskFlag=1 before proceeding to trade. Do NOT use this for prices — use getBizTokenPriceList.

getBizTokenPriceListA

Batch query token prices and market data by chain code + token address pairs. Returns current price, 24h price change, trading volume, market cap, liquidity, and holder count.

Use chainCode and tokenAddress from getBizTokenList, getAssetList, or user input.

Do NOT use this endpoint to discover new tokens — use getBizTokenList instead.

Do NOT use this to get token project info (description, links) — use getBizTokenDetails.

Agent hint: Use this endpoint to get token prices, 24h changes, volume, market cap, and other market data. Accepts chainCode + tokenAddress pairs — get these from getBizTokenList or getAssetList. Do NOT use this to discover tokens — use getBizTokenList.

Do NOT use this for project info — use getBizTokenDetails.

getLPOrderListA

Query the user's LP order history (stake and redeem operations) with optional filters. Returns paginated order list including order status, amounts, fees, and execution time.

AI agent should call this after executing stake/redeem to confirm the result to the user. Poll with appropriate orderStatus filter to check if a pending order has completed.

Do NOT use this endpoint to get position details — use getLPPositionList instead.

Agent hint: Use this endpoint to check order status after executing stake/redeem, or when user asks about order history. After executeLPStake or executeLPRedeem, poll this endpoint and match the response items by orderNo (orderNo is a response field; this endpoint accepts no orderNo input — filter the listing by orderType and orderStatus instead). Do NOT use this to check current positions — use getLPPositionList for that.

getLPPayTokenListB

Query available payment tokens that can be used for LP staking. Returns token details and user's available balance for each.

Call this before staking to show users which tokens they can use.

Agent hint: Use this endpoint to show users which tokens they can use for staking. Returns user's balance for each token, helping them decide what to stake.

getLPPayTokenPriceA

Query current USD prices for one or more payment tokens. Supports batch queries to get multiple token prices in a single request.

Use this to calculate USD value of stake amounts or show price info to users.

Agent hint: Use this endpoint to get token prices for calculating stake values in USD. Can query multiple tokens at once by passing an array of tokenCode values. Useful for showing users the USD value of their stake before confirming.

getLPPoolInfoA

Query detailed pool information including APY breakdown, fees, token reserves, and historical performance.

Use this after selecting a pool from the pool list to get complete details.

Agent hint: Use this endpoint when user wants detailed information about a specific pool. Call this before staking to show the user complete pool details. poolAddress is required and must come from getLPPoolList.

getLPPoolListB

Query available liquidity pools with optional filtering by tag and token. Returns pool information including addresses, supported tokens, APY, and TVL.

AI agent can use this to help users discover and compare liquidity pools.

Agent hint: Use this endpoint when user wants to browse available LP pools or search for pools by token. Filter by tokenSymbol to find pools containing a specific token.

getLPPositionListA

Query the user's liquidity pool positions with real-time valuation. Returns position details including staked amount, current value, earned rewards, and APY.

AI agent should call this to show users their LP portfolio or after executing stake/redeem to confirm the result.

Do NOT use this endpoint to get pool information — use getLPPoolInfo instead.

Agent hint: Use this endpoint to show users their LP positions and portfolio performance. After executeLPStake or executeLPRedeem, poll this to confirm the position was updated. Do NOT use this to get pool details — use getLPPoolInfo for that.

getOrderListA

Query the user's trade order history with optional filters. Returns paginated order list including order status, token amounts, fees, and execution time.

AI agent should call this after executing a trade to confirm the result to the user. Poll with orderStatus=[1] filter to check if a pending order has completed.

Do NOT use this endpoint to get token prices or market data — use getBizTokenPriceList instead. Do NOT use this to check asset holdings — use getAssetList instead.

Agent hint: Use this endpoint to check order status after executing a trade, or when user asks about their trade history. After executePurchase or executeRedeem, poll this with the orderNo to confirm completion. Do NOT use this to get token prices — use getBizTokenPriceList. Do NOT use this to check portfolio holdings — use getAssetList.

getPayTokenListA

Query available payment tokens for trading. Returns token symbol, CEX_<id> token code, maximum trading limit, and supported blockchain list.

AI agent should call this before executing a trade to resolve user input (e.g. "USDT") into the proper CEX_<id> token code required by getTradeQuote.

Do NOT use this endpoint to get on-chain tradable tokens — use getBizTokenList instead. Do NOT use this to get token market data or prices — use getBizTokenPriceList.

Agent hint: Use this endpoint to get available payment tokens (USDT, USDC, etc.) and their CEX token codes before placing a trade. Maps user input like "USDT" to "CEX_1". Required before calling getTradeQuote. Do NOT use this to get on-chain tradable tokens — use getBizTokenList. Do NOT use this for token prices — use getBizTokenPriceList.

getPredictionEngineStatusA

Query whether the prediction market matching engine is currently available. When the engine is unavailable, buy and sell orders cannot be submitted.

AI agent should check engine status before attempting to place orders. If the engine is unavailable, inform the user and do not proceed with trading.

Agent hint: Call this before placing any buy or sell order to check if the matching engine is available. If available=false, do not proceed with trading and inform the user that the market is temporarily unavailable.

getPredictionEventDetailA

Get detailed information about a prediction event, including all associated markets, outcome tokens, current prices, and trading statistics.

Use slug for human-readable event lookups (takes priority over eventId). Set hasMoreMarkets=true to include markets from related "more-markets" sub-events.

AI agent should call this before placing orders to get the full list of outcome token IDs and current prices for a specific event.

Agent hint: Use this endpoint to get all details of a specific prediction event including tokenIds for trading. Prefer using slug when available (more stable than eventId). Call this before buy/sell to confirm current market prices and available tokenIds. Do NOT use getPredictionMarketList for individual event details — use this endpoint.

getPredictionGroupStageDetailA

Query detailed standings and match results for a specific tournament stage. Returns group tables with team statistics for group stages, or bracket information for knockout stages.

Use stageCode from getPredictionTimelineStages to specify which stage to query. Valid stageCodes: Groups, R32, R16, QF, SF, Final.

AI agent can use this to provide context about team performance when helping users make informed prediction bets.

Agent hint: Use this to get group standings or knockout results for a specific tournament stage. stageCode must be one of: Groups, R32, R16, QF, SF, Final. Use this context to help users make informed betting decisions. eventType=1 is FIFA_2026.

getPredictionMatchListB

Query all matches for a sports event with their current status and prediction market info.

Returns match details including teams, scheduled time, match status (Live/Upcoming/Ended), and associated prediction markets for each match.

AI agent can use this to show the user available matches to bet on, and then use the eventId to get detailed market info before trading.

Agent hint: Use this to get all matches for FIFA 2026 (eventType=1). Each match has an associated eventId — use it with getPredictionEventDetail to get tokenIds. Filter by matchStatus: 1=Live, 2=Upcoming, 3=Ended. Do NOT show Ended matches for trading unless the user explicitly asks.

getPredictionOrderBookA

Query the full order book (bid/ask depth) for prediction outcome tokens. Returns all price levels with available quantity.

AI agent can use this to estimate price impact before placing a large order, or to display market depth information to users.

Maximum 20 tokenIds per request.

Agent hint: Use this to get the full order book depth for specific tokenIds. Useful for estimating price impact of a large order. For just the current best price, use getPredictionTokenPrice instead. Maximum 20 tokenIds per request.

getPredictionOrderEstimateA

Get estimated execution details for a prediction market order before placing it. Returns estimated average fill price, total shares received/sold, fee, and whether the FOK order can be fully filled.

Mandatory before any buy or sell. AI agent must show estimated results to the user before proceeding to execution.

  • BUY: set side=1, amount = USDC to invest, payTokenCode = "USDC"

  • SELL: set side=2, amount = number of shares to sell

Phase 1 supports orderType=1 (FOK) only. A FOK order that cannot be fully filled will be cancelled entirely.

Agent hint: REQUIRED before calling buy or sell. Always show the estimate to the user first. side=1 is BUY (amount in USDC), side=2 is SELL (amount in shares). orderType=1 (FOK) is the only supported type in Phase 1. Show estimatedCost, estimatedReceive, feeAmount, and toWin (BUY only) to the user. Do NOT call buy/sell without user confirmation after viewing the estimate.

getPredictionOrderListA

Query the authenticated user's prediction market order history. Returns order details including fill status, executed price, and fees.

Use this after placing a buy or sell order to check the final execution status. FOK orders will show as FILLED or CANCELLED.

Supports filtering by:

  • status: order status (PENDING/FILLED/PARTIALLY_FILLED/CANCELLED/REJECTED)

  • tokenId: specific outcome token

  • eventId: specific event

  • side: BUY (1) or SELL (2)

  • days: look back N days (max 90)

Agent hint: Use this to check order fill status after placing buy/sell orders. Filter by status=2 (FILLED) or status=4 (CANCELLED) to see order results. FOK orders are either fully FILLED or CANCELLED — no partial fills. Use days to limit history range (max 90 days).

getPredictionPayTokenListA

Query available payment tokens for prediction market trading. Returns token symbol, code, and supported blockchain list.

AI agent should call this before executing a trade to verify supported payment tokens. Prediction market Phase 1 supports USDC only.

Agent hint: Use this endpoint to get available payment tokens before placing a prediction market buy order. Returns USDC token info. Use the token code in buy requests (payTokenCode field).

getPredictionPortfolioSummaryA

Query an aggregated summary of the authenticated user's prediction market portfolio. Returns total invested amount, current portfolio value, unrealized and realized P&L, and total number of active and historical positions.

AI agent can use this to give users a quick overview of their prediction market performance without listing all individual positions.

Agent hint: Use this for a high-level portfolio overview: total value, total P&L, position counts. For individual position details, use getPredictionPositionList. For historical P&L breakdown, use getPredictionPositionHistory.

getPredictionPositionHistoryA

Query the authenticated user's historical prediction positions that have been closed (either by manual sell, market resolution, or expiry).

Returns realized P&L and final outcome for each closed position.

AI agent can use this to summarize the user's prediction trading performance.

Agent hint: Use this to see the user's closed prediction position history and realized P&L. For current open positions, use getPredictionPositionList instead. result shows WIN/LOSE/MANUAL_CLOSE and the amount won or lost.

getPredictionPositionListA

Query the authenticated user's current open prediction positions. Returns positions that have not yet been resolved.

Each position includes the number of shares held, current market value, unrealized P&L, and the associated event information.

AI agent should call this before placing a sell order to confirm the user holds sufficient shares, and to display the current portfolio.

Agent hint: Use this to check what positions the user currently holds before selling. Shows open (unresolved) positions only. For historical positions, use getPredictionPositionHistory. Each position has a tokenId — use it in sell orders. Check availableSize before selling to ensure the user has enough shares.

getPredictionPriceHistoryA

Query historical price data for prediction outcome tokens. Returns price time series for chart display.

Two modes:

  1. By tokenIds: specify up to 20 token IDs directly

  2. By eventId: specify an event to get price history for all its tokens

The interval controls the time range: 1H, 6H, 1D, 1W, 1M, or ALL. The fidelity controls how many minutes between data points (0 = auto).

Note: This endpoint has stricter rate limits (2 req/s) due to no caching.

Agent hint: Use this to get price chart history for specific tokens or events. Use interval=1D for daily view, interval=1W for weekly trend analysis. Prefer querying by tokenIds when you know the specific tokens. Do NOT use this for current prices — use getPredictionTokenPrice instead.

getPredictionSideMarketListA

Query the list of side/related markets for a specific sports event type. Side markets are additional prediction markets related to the main event (e.g., top scorer, group winners, golden boot).

AI agent can use this to discover additional trading opportunities beyond match outcome predictions.

Agent hint: Use this to discover side/auxiliary markets for sports events. eventType=1 refers to FIFA_2026. These are additional markets beyond match outcomes (e.g., top scorer, most goals).

getPredictionTimelineStagesA

Query the tournament stages timeline for a sports prediction event. Returns all stages (Group Stage, Round of 32, Round of 16, Quarter-finals, Semi-finals, Final) with their current status.

AI agent uses this to understand the current tournament phase and navigate to the relevant stage for predictions.

Agent hint: Use this to get the tournament stage timeline for FIFA 2026 (eventType=1). Returns which stages are Done/Active/Upcoming. Use stageCode from here in getPredictionGroupStageDetail to get group standings.

getPredictionTokenPriceA

Query current market prices for up to 20 prediction outcome tokens. Returns best bid, best ask, and last trade price for each token.

AI agent should call this before placing orders to confirm current market prices. Price represents probability (0-1): a price of 0.65 means ~65% chance of YES.

Agent hint: Use this to get current prices for specific tokenIds before trading. Price is a probability (0 to 1). A YES token at 0.65 means 65% probability of YES outcome. Always check price before buy/sell. Maximum 20 tokenIds per request. Do NOT use this for price history — use getPredictionPriceHistory instead.

getTradeQuoteA

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.

accountCoinBalanceQueryA

Query the balance of a specific coin in a specific account type. Supports querying sub UID balance with master API key.

  • accountType and coin are required

  • memberId is required when querying sub UID balance with master API key

  • toMemberId + toAccountType are required for cross-account transferable balance queries

  • withLtvTransferSafeAmount=1 requires toAccountType to be set

getAssetOverviewA

Query the total asset overview for the current account, including per-account-type equity breakdowns, category details, and coin-level details.

Notes:

  • This endpoint requires authentication.

  • Supports parent-sub account query: if API key belongs to a sub-account, the parent UID is used automatically.

  • memberId can be specified to query a specific sub-account's assets.

  • Accounts with zero balance are filtered out, except for UNIFIED and FUND account types.

  • Valuation currency defaults to USD if not provided.

  • Maps internally to AssetArgusQueryService.queryTotalAssetForOpenapi().

getDeliveryRecordB

Query delivery records of USDC futures, Inverse futures, and Options.

  • Unified account covers: USDT futures / USDC contract / Inverse futures / Options

  • Classic account covers: Inverse futures

Time range rules:

  • Without both startTime and endTime: returns last 30 days by default

  • Only startTime provided: returns from startTime to startTime + 30 days

  • Only endTime provided: returns from endTime - 30 days to endTime

  • Both provided: endTime - startTime must be ≤ 30 days

getPortfolioMarginA

Query the portfolio margin information including wallet balance, margin rates, and asset PNL range.

Notes:

  • This endpoint requires authentication.

  • If baseCoin is not specified, returns all base coins.

  • Maps internally to /option/usdc/private/asset/query/protoMarginInfos.

getSettlementRecordB

Query session settlement records of USDC perpetual contracts.

  • Unified account covers: USDC contract (linear)

Time range rules:

  • Without both startTime and endTime: returns last 30 days by default

  • Only startTime provided: returns from startTime to startTime + 30 days

  • Only endTime provided: returns from endTime - 30 days to endTime

  • Both provided: endTime - startTime must be ≤ 30 days

Note: During periods of extreme market volatility, this interface may experience increased latency or temporary delays in data delivery.

getTotalMembersAssetsA

Query the aggregated total assets overview for parent and sub accounts.

Notes:

  • This endpoint requires authentication.

  • Supports parent-sub account query; if parentUid exists, uses the parent account UID.

  • If coin is specified, the total assets will be denominated in that coin.

  • Maps internally to /siteapi/unified/private/cht/asset-argus/asset-total-assets.

interTransferListQueryC

Query the internal transfer records between different account types under the same UID. Time range rules:

  • No time params: last 30 days (default)

queryCoinChainInfoA

Query coin information, including chain configuration, deposit and withdrawal status.

  • Returns all supported coins when coin is not specified

  • Each coin includes its supported chain list with deposit/withdraw configuration

  • Chain status (chainDeposit / chainWithdraw): "0" = suspended, "1" = normal

  • remainAmount represents the maximum withdrawal amount per transaction (takes the max value across all chains)

  • Results are filtered by compliance wall whitelist

queryFundingDetailApiA

Query transaction records of the funding account.

  • createTimeFrom and createTimeTo must be used together; the interval cannot exceed 7 days

  • If neither createTimeFrom nor createTimeTo is provided, defaults to the last 7 days

  • Supports cursor-based pagination; pass nextPageCursor from the previous response as cursor

subMemberListQueryA

Query sub UIDs under the current master UID. Returns both all sub UIDs and the sub UIDs that have universal transfer permission. Master UID API key only.

transferCoinListQueryA

Query the list of coins that can be transferred between the specified account types.

  • fromAccountType and toAccountType cannot be the same

  • Both account types must be supported types

universalTransferListQueryA

Query universal transfer records. Supports both master and sub account API keys.

  • Master API key: can query sub-sub, parent-sub, and sub-parent records where master is the operator

  • Sub account API key: can only query records where the sub account is a sender or receiver Time range rules:

  • No time params: last 30 days

userAssetInfoQueryB

Query coin balances across a single account type. Supports querying sub UID balance with master API key.

  • accountType is required

  • For UNIFIED account, coin is required (comma-separated, max varies by config)

  • memberId is used to query sub account balance (master API key only)

CoinConvertLimitQueryA

Query single conversion min/max limit for specified coin pair under specified account type.

  • OpenAPI interface, requires API Key authentication

  • ACL permission: RESOURCE_GROUP_EXCHANGE_HISTORY + PERMISSION_READ

  • Rate limit: 100/path/s globally

CoinListQueryB

Query convertible coin list under specified account type and conversion direction.

  • OpenAPI interface, requires API Key authentication

  • ACL permission: RESOURCE_GROUP_EXCHANGE_HISTORY + PERMISSION_READ

  • Rate limit: 30/user/s, 1500/path/s globally

  • Requires compliance review (CONVERSION product)

ConvertExecuteA

Confirm and execute a conversion based on quote ID. The exchange is async; check the final status by calling the query result API. Make sure you confirm the quote before it expires.

  • OpenAPI interface, requires API Key authentication

  • ACL permission: RESOURCE_GROUP_EXCHANGE_HISTORY + PERMISSION_WRITE

  • Rate limit: 5/user/s, 100/path/s globally

  • Requires KYC verification

ConvertHistoryQueryB

Query all confirmed conversion records. Supports multiple wallet types and comma-separated accountType.

  • OpenAPI interface, requires API Key authentication

  • ACL permission: RESOURCE_GROUP_EXCHANGE_HISTORY + PERMISSION_READ

  • Rate limit: 50/path/s globally

QueryOrderByPageB

Aggregates asset account and OBU account data, queries conversion history orders by cursor pagination.

  • OpenAPI interface, requires API Key authentication

  • ACL permission: RESOURCE_GROUP_EXCHANGE_HISTORY + PERMISSION_READ_WRITE

  • Rate limit: 600/min for same group

  • Old path: /asset/v2/private/exchange/query-exchange-order

QueryOrderFromOpenApiC

Paginated query of conversion order list via OpenAPI, supports asset account and OBU account data.

  • OpenAPI interface, requires API Key authentication

  • ACL permission: RESOURCE_GROUP_EXCHANGE_HISTORY + PERMISSION_READ_WRITE

  • Rate limit: 600/min for same group

  • Old path: /asset/v2/private/exchange/exchange-order-query

QueryResultC

Query cryptocurrency exchange results using a quote transaction ID.

  • OpenAPI interface, requires API Key authentication

  • ACL permission: RESOURCE_GROUP_EXCHANGE_HISTORY + PERMISSION_READ

  • Rate limit: 50/path/s globally

QuerySmallAssetConvertOrderC

Paginated query of small asset conversion history records. Supports filtering by order number and time range.

  • API key permission: Convert

  • Rate limit: 10/s

QuerySmallAssetListA

Query small-balance coins eligible for dust conversion in the account, and supported to-coins.

  • API key permission: Convert

  • Rate limit: 10/s

  • Only supports Unified wallet (eb_convert_uta)

  • Conversion transaction range: 1.0e-8 to 200 USDT

QuoteApplyC

Apply for a conversion quote via OpenAPI, get conversion rate and quote ID.

  • OpenAPI interface, requires API Key authentication

  • ACL permission: RESOURCE_GROUP_EXCHANGE_HISTORY + PERMISSION_WRITE

  • Rate limit: 5/user/s, 200/path/s globally

  • Requires KYC verification

SmallAssetConvertA

Confirm and execute small asset conversion using the quoteId returned by the get-quote interface. The exchange is async; check final status via the Get Exchange History endpoint.

  • API key permission: Convert

  • Rate limit: 5/s

  • Load balancing: consistent hash strategy

SmallAssetQuoteA

Apply for batch conversion quote for a small asset list. Returns quote ID and per-coin conversion details.

  • API key permission: Convert

  • Rate limit: 5/s

  • Only supports Unified wallet (eb_convert_uta)

  • Up to 20 coins per transaction

  • Custody accounts (e.g. Copper, Fireblock) are not supported

  • Actual executed amounts may be less than available balance in UTA

  • Load balancing: consistent hash strategy

queryDepositAddressA

Query the deposit address information for the master account.

  • Only the main UID API key can call this endpoint

  • Sub-accounts are not allowed to access deposit addresses

  • Users banned from on-chain deposit will receive an error

  • Custody users will receive an error

  • UAE-restricted coins will be checked against whitelist

queryDepositRecordsA

Query on-chain deposit records

  • Supports both main and sub UID API keys

  • Time range (endTime - startTime) must be under 30 days; defaults to last 30 days

  • startTime / endTime are millisecond timestamps but effective at second-level granularity

  • When id is provided, it takes highest priority over other filter params

  • txID only works for data from Jan 1, 2024 onward

queryInternalDepositRecordsA

Query deposit records occurring within the Bybit platform (not on blockchain).

  • Accessible via Master or Sub Member API Key

  • Max 30-day window between start/end times; defaults to last 30 days

  • status field filters: 0 = all, 1 = Processing, 2 = Success, 3 = Failed

querySubMemberDepositAddressA

Query deposit address for a sub-account. Requires master UID API key only.

  • Custodial sub-account addresses are unavailable

  • Validates parent-child relationship between master and sub accounts

  • Sub-accounts bound to Copper custody are not allowed

  • UAE coin restrictions apply

querySubMemberDepositRecordsB

Query on-chain deposit records for a sub-account using the main UID API key.

  • Time range (endTime - startTime) must be under 30 days; defaults to last 30 days

  • subMemberId is required

  • Validates parent-child relationship between master and sub accounts

setDefaultDepositToAccountA

Set the default account type for receiving on-chain deposit funds.

  • Only main UID API key can call this endpoint

  • Sub-accounts are not allowed

  • Funds default to FUND wallet if not configured

  • UTA 2.0 upgraded users cannot set to CONTRACT

  • KYC compliance wall restrictions may limit available account types

getVASPListA

Query the list of available VASPs (Virtual Asset Service Providers).

  • Used for Travel Rule compliance when withdrawing to exchanges.

  • The returned list is based on the user's compliance zone (determined by UID).

  • Use "others" as vaspEntityId for exchanges not in the list.

getWithdrawableAmountByCoinA

Get the withdrawable amount for a specific coin across different account types.

  • Returns withdrawable amounts for FUND and UTA accounts.

  • Funds may be partially frozen due to on-chain deposits awaiting confirmations or risk review. tags:

  • Asset

queryWithdrawAddressesA

Retrieve withdrawal addresses from the address book.

  • API key must have withdrawal permissions.

  • Business rules (from code):

    • When addressType is 1 (internal transfer) or 2 (all), coin and chain parameters are ignored

    • Records with failed address signature verification will be filtered out

    • If user has enabled 24-hour new address no-verification security policy, new address status=1 means unavailable within 24 hours

    • Use baseCoin as coin to query universal addresses

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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