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.

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.

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

queryWithdrawRecordsA

Query withdrawal records.

  • Master UID API key only.

  • Max 30-day range per query. If startTime and endTime are not provided, defaults to the last 30 days.

  • endTime - startTime must be less than 30 days.

  • Business rules :

    • Uses read replica by default

    • withdrawType=0 returns on-chain withdrawal records (includes web3, batch release, AML and other internal types, all mapped to 0)

    • withdrawType=1 returns internal transfer records

    • withdrawType=2 returns all records

    • AML custody wallet liquidation records (type 1040) will replace txID, toAddress, tag fields with liquidation info

    • Records pending manual review requiring material submission will show status as "MoreInformationRequired"

closeComboBotA

Closes (stops) a running futures combo trading bot. The bot will cancel all pending orders and close all positions across the portfolio.

The bot_id can be obtained from the createComboBot response or from getComboDetail. Only bots in a running state can be closed.

Rate limit: 10 requests per second per UID.

Agent hint: Use this to stop a running combo bot. The bot_id is required and can be found in the createComboBot response. The stop_type indicates the reason for closing. After closing, use getComboDetail to check the final PnL and close reason.

closeDCABotA

Closes a running DCA bot. You must specify a close_mode to determine how remaining assets are settled:

  • 1 (DCA_BIT_MODE): settle in BIT

  • 2 (DCA_BASE_MODE): convert all to base tokens

  • 3 (DCA_QUOTE_MODE): convert all to quote token

The bot must be in a closeable state. Bots that are currently in the middle of an investment cycle may not be closeable (status_code=503).

Rate limit: 3 qps per UID.

Agent hint: Use close_mode=3 (DCA_QUOTE_MODE) if the user wants to convert everything back to the quote coin (e.g., USDT).

closeFGridBotA

Closes (stops) a running futures grid trading bot. The bot will cancel all pending grid orders and close positions.

The bot_id can be obtained from the createFGridBot response or from getFGridDetail. Only bots in a running state can be closed.

Rate limit: 10 requests per second per UID.

Agent hint: Use this to stop a running grid bot. The bot_id is required and can be found in the createFGridBot response. After closing, use getFGridDetail to check the final PnL and close reason.

closeFMartBotA

Closes (stops) a running futures Martingale trading bot. The bot will cancel all pending orders and close the position.

The bot_id can be obtained from the createFMartBot response or from getFMartDetail. Only bots in a running state can be closed.

Rate limit: 10 requests per second per UID.

Agent hint: Use this to stop a running Martingale bot. The bot_id is required and can be found in the createFMartBot response. The stop_type indicates the reason for closing. After closing, use getFMartDetail to check the final PnL and close reason.

closeGridBotA

Closes a running spot grid bot. You must specify a close_mode to determine how remaining assets are settled:

  • 1 (BIT_MODE): settle in BIT

  • 2 (BASE_MODE): convert all to base token

  • 3 (QUOTE_MODE): convert all to quote token

  • 4 (BASE_AND_QUOTE_MODE): return assets as-is, no conversion

The bot must be in a closeable state (NEW or RUNNING). Bots in CANCELLING or COMPLETED state cannot be closed again.

Rate limit: 3 qps per UID.

Agent hint: Use close_mode=3 (QUOTE_MODE) if the user wants to cash out to stablecoin. Use close_mode=4 if the user wants to keep both tokens.

createComboBotA

Creates a futures combo trading bot that manages a portfolio of multiple futures symbols. The bot automatically rebalances positions based on the configured trigger mode (time-based, percentage-based, or both).

Required parameters include leverage, initial margin, rebalancing mode, and at least one symbol setting with target position percentage and side.

Before calling this endpoint, use /v5/fcombobot/getlimit to validate parameter ranges. The response bot_id is needed for subsequent operations like getComboDetail or closeComboBot.

Rate limit: 10 requests per second per UID. Subject to compliance wall, GEO IP check, and KYC verification.

Agent hint: Always call getComboLimit first to verify parameters are in range. The symbol_settings array must contain at least one entry with symbol, target_position_percent, and side. The bot_id in a successful response is needed for getComboDetail and closeComboBot.

createDCABotA

Creates a DCA bot that automatically invests at regular intervals. Specify investment frequency (in seconds), quote coin, trading pairs with individual amounts, and optional max investment amount.

Prerequisites:

  • User must be authenticated and pass KYC/compliance checks.

  • Trading pairs must be valid and not duplicated.

  • Minimum frequency is 10 seconds.

  • Maximum 5 trading pairs per bot.

Returns bot_id on success. If the user is banned (status_code=421), ban_reason_text provides a localized explanation.

Rate limit: 3 qps per UID.

Agent hint: The parameters.frequency_in_second field controls how often the bot invests. Common values: 600 (10 min), 3600 (1 hour), 86400 (1 day). Each pair in parameters.pairs specifies a base coin and its per-round investment amount.

createFGridBotA

Creates a single futures grid trading bot. The bot will automatically place grid orders within the specified price range.

Required parameters include symbol, grid_mode, price range, grid count, leverage, grid type, and initial investment. Optional parameters include TP/SL settings, entry price trigger, and trailing stop.

Before calling this endpoint, use /v5/fgridbot/validate to validate parameter ranges. The response check_code indicates specific validation errors if the creation fails.

Rate limit: 10 requests per second per UID. Subject to compliance wall and KYC verification.

Agent hint: Always call validateFGridInput first to verify parameters are in range. If status_code is non-zero, check the check_code for the specific error. The bot_id in a successful response is needed for subsequent operations like getFGridDetail or closeFGridBot.

createFMartBotA

Creates a futures Martingale trading bot. The bot opens an initial position and adds to it when price drops (long mode) or rises (short mode) by the configured price_float_percent. Each add scales position by add_position_percent.

Key parameters include symbol, mode (long/short), leverage, price trigger percentage, add position ratio, max add count, initial margin, and round take-profit percentage. Optional parameters include stop-loss, entry price trigger, auto-cycle toggle, and trailing stop.

Before calling this endpoint, use /v5/fmartingalebot/getlimit to validate parameter ranges.

Rate limit: 10 requests per second per UID. Subject to compliance wall, GEO IP check, and KYC verification.

Agent hint: Always call getFMartLimit first to verify parameters are in range. The martingale_mode determines direction: 1=Long (buys dip), 2=Short (sells rally). auto_cycle_toggle=1 means the bot restarts after each round TP. The bot_id in a successful response is needed for getFMartDetail and closeFMartBot.

createGridBotA

Creates a spot grid bot with the specified trading pair, price range, grid count, and investment amount. Optionally supports entry price, stop-loss/take-profit, trailing stop, and grid trailing (auto-shift).

Prerequisites:

  • Call validateGridInput first to ensure parameters are valid.

  • User must be authenticated and pass KYC/compliance checks.

Returns grid_id on success. If the user is banned (status_code=421), ban_reason_text provides a localized explanation.

Rate limit: 3 qps per UID.

Agent hint: Always call validateGridInput before this endpoint. The symbol field uses uppercase format like "BTCUSDT". Use invest_mode to control whether to invest in quote only (0), base only (1), or both (2).

getComboDetailA

Retrieves comprehensive details for a specific futures combo bot, including configuration (symbols, leverage, rebalancing mode), current display status, PnL metrics (total PnL, realized, unrealized, funding fee), portfolio position info, margin balances (total, available, margin balance), and timestamps.

The bot_id is a numeric ID obtained from createComboBot or bot listing endpoints.

Rate limit: 10 requests per second per UID.

Agent hint: Use this endpoint to check the status and performance of a combo bot. The response contains all PnL fields, position details, rebalancing stats, and close reason if the bot has stopped. Prefer this over other endpoints when answering questions about a specific bot's performance.

getComboLimitA

Validates the input parameters for creating a futures combo bot and returns the allowable ranges for each parameter (initial margin, leverage, rebalancing threshold, time interval, TP/SL percentages, trailing stop).

Use this endpoint before calling /v5/fcombobot/create to ensure parameters are within valid bounds. The response includes a check_code that indicates which parameter is out of range if validation fails.

Rate limit: 10 requests per second per UID.

Agent hint: Call this endpoint first to get valid parameter ranges before creating a combo bot. If check_code is non-zero, the specific validation error is indicated by the code value. The response ranges (init_margin, leverage, sl_percent, tp_percent, etc.) tell you the exact min/max values allowed for each parameter.

getFGridDetailA

Retrieves comprehensive details for a specific futures grid bot, including configuration (symbol, price range, leverage, grid type), current status, PnL metrics (realized, unrealized, grid profit, funding fee), position info, margin balances, and timestamps.

The bot_id is a numeric ID obtained from createFGridBot or bot listing endpoints.

Rate limit: 10 requests per second per UID.

Agent hint: Use this endpoint to check the status and performance of a grid bot. The response contains all PnL fields, position details, and close reason if the bot has stopped. Prefer this over other endpoints when answering questions about a specific bot's performance.

getFMartDetailA

Retrieves comprehensive details for a specific futures Martingale bot, including configuration (symbol, mode, leverage, price trigger, add position settings), current display status, PnL metrics (realized, unrealized, total), position info (size, average price, balances), round progress (completed rounds, current round, current adds), margin balances, and timestamps.

The bot_id is a numeric ID obtained from createFMartBot or bot listing endpoints.

Rate limit: 10 requests per second per UID.

Agent hint: Use this endpoint to check the status and performance of a Martingale bot. The response contains all PnL fields, position details, round progress (completed_rounds, current_round, current_added_pos_num), and close reason if the bot has stopped. Prefer this over other endpoints when answering questions about a specific bot's performance.

getFMartLimitA

Validates the input parameters for creating a futures Martingale bot and returns the allowable ranges for each parameter (price float percentage, add position ratio, add position count, initial margin, round TP percentage, stop-loss, entry price, leverage).

Use this endpoint before calling /v5/fmartingalebot/create to ensure parameters are within valid bounds. The response includes a check_code that indicates which parameter is out of range if validation fails.

Rate limit: 100 requests per second per IP.

Agent hint: Call this endpoint first to get valid parameter ranges before creating a Martingale bot. If check_code is non-zero, the specific validation error is indicated by the code value. The response ranges tell you the exact min/max values allowed for each parameter.

queryGridDetailA

Retrieves comprehensive details of a spot grid bot including symbol, price range, investment amount, profit metrics (total profit, grid profit, APR), arbitrage count, status, stop-loss/take-profit settings, trailing stop configuration, and close reason (if closed).

Use this when you need to check the current state, performance, or configuration of a specific grid bot. The grid_id is obtained from createGridBot response or grid list queries.

Rate limit: 10 qps per UID.

Agent hint: Use this to answer questions about a specific grid bot's performance or status. The grid_id is a numeric ID returned by createGridBot.

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