Skip to main content
Glama
workspace

bybit-mcp-server

by workspace

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
BYBIT_MODENoPermission mode: read, trade, or fullread
BYBIT_API_KEYNoAPI key from Bybit (required for local mode)
BYBIT_TESTNETNoUse testnet (true) or mainnet (false)true
BYBIT_MCP_HOSTNoHTTP bind address0.0.0.0
BYBIT_MCP_PORTNoHTTP port8000
BYBIT_API_SECRETNoAPI secret from Bybit (required for local mode)
BYBIT_MCP_DB_PATHNoSQLite database file path./bybit_mcp.db
BYBIT_RECV_WINDOWNoRequest receive window in ms
BYBIT_MCP_TRANSPORTNoSet to 'streamable-http' for remote modestdio
BYBIT_MCP_ISSUER_URLNoPublic URL with scheme, e.g. https://bybit.example.com (required for remote mode)
BYBIT_MCP_SECRET_KEYNoFernet key for encrypting API keys at rest (required for remote mode)
BYBIT_MCP_ADMIN_PASSWORDNoAdmin login password (required for remote mode)
BYBIT_MCP_ADMIN_USERNAMENoAdmin login usernameadmin

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_server_timeA

Get the current Bybit server time.

get_tickersA

Get latest price ticker for a symbol.

    Args:
        category: Product type - spot, linear, inverse, option
        symbol: Trading pair (e.g. BTCUSDT). If omitted, returns all tickers for the category.
    
get_klineA

Query kline/candlestick data.

    Args:
        category: Product type - spot, linear, inverse
        symbol: Symbol name (e.g. BTCUSDT)
        interval: Kline interval - 1,3,5,15,30,60,120,240,360,720,D,M,W
        start: Start timestamp in milliseconds
        end: End timestamp in milliseconds
        limit: Limit for data size per page (max 200, default 200)
    
get_instruments_infoB

Query instrument specifications and trading rules.

    Args:
        category: Product type - spot, linear, inverse, option
        symbol: Symbol name
        status: Symbol status filter - Trading, Settling, etc.
        baseCoin: Base coin
        limit: Limit for data size per page
        cursor: Pagination cursor
    
get_orderbookA

Query order book depth data.

    Args:
        category: Product type - spot, linear, inverse, option
        symbol: Symbol name (e.g. BTCUSDT)
        limit: Depth limit (spot: 1-200, default 1; derivatives: 1-500, default 25)
    
get_funding_rate_historyA

Query historical funding rate.

    Args:
        category: Product type - linear, inverse
        symbol: Symbol name (e.g. BTCUSDT)
        startTime: Start timestamp in milliseconds
        endTime: End timestamp in milliseconds
        limit: Limit for data size per page (max 200, default 200)
    
get_public_tradesB

Query recent public trading data.

    Args:
        category: Product type - spot, linear, inverse, option
        symbol: Symbol name (e.g. BTCUSDT)
        baseCoin: Base coin (for option only)
        optionType: Option type - Call, Put (for option only)
        limit: Limit for data size (spot: 1-60 default 60; others: 1-1000 default 500)
    
get_open_interestA

Get open interest for each symbol.

    Args:
        category: Product type - linear, inverse
        symbol: Symbol name (e.g. BTCUSDT)
        intervalTime: Interval - 5min, 15min, 30min, 1h, 4h, 1d
        startTime: Start timestamp in milliseconds
        endTime: End timestamp in milliseconds
        limit: Limit for data size per page (max 200, default 50)
        cursor: Pagination cursor
    
get_wallet_balanceA

Get wallet balance and account risk information.

    Args:
        accountType: Account type - UNIFIED, CONTRACT, SPOT, OPTION, FUND
        coin: Coin name (e.g. BTC). If omitted, returns all coins with balance.
    
get_fee_rateB

Get trading fee rate.

    Args:
        category: Product type - spot, linear, inverse, option
        symbol: Symbol name
        baseCoin: Base coin
    
get_account_infoA

Get account margin mode and configuration info.

get_open_ordersA

Query unfilled or partially filled orders.

    Args:
        category: Product type - spot, linear, inverse, option
        symbol: Symbol name
        baseCoin: Base coin (for linear/inverse only)
        orderId: Order ID
        orderLinkId: User custom order ID
        limit: Limit per page (max 50, default 20)
        cursor: Pagination cursor
    
get_order_historyA

Query order history.

    Args:
        category: Product type - spot, linear, inverse, option
        symbol: Symbol name
        orderId: Order ID
        orderLinkId: User custom order ID
        orderStatus: Order status - New, PartiallyFilled, Filled, Cancelled, etc.
        limit: Limit per page (max 50, default 20)
        cursor: Pagination cursor
    
get_trade_historyB

Query trade execution history.

    Args:
        category: Product type - spot, linear, inverse, option
        symbol: Symbol name
        orderId: Order ID
        startTime: Start timestamp in milliseconds
        endTime: End timestamp in milliseconds
        limit: Limit per page (max 100, default 50)
        cursor: Pagination cursor
    
place_orderA

Place an order (HIGH risk - requires confirmation).

    Args:
        category: Product type - spot, linear, inverse, option
        symbol: Symbol name (e.g. BTCUSDT)
        side: Buy or Sell
        orderType: Market or Limit
        qty: Order quantity (as string)
        price: Order price (required for Limit orders)
        timeInForce: Time in force - GTC, IOC, FOK, PostOnly
        orderLinkId: User custom order ID
        reduceOnly: Reduce only (true means close position)
        takeProfit: Take profit price
        stopLoss: Stop loss price
    
amend_orderA

Amend an existing order (HIGH risk - requires confirmation).

    Args:
        category: Product type - spot, linear, inverse, option
        symbol: Symbol name
        orderId: Order ID (either orderId or orderLinkId required)
        orderLinkId: User custom order ID
        qty: New order quantity
        price: New order price
        triggerPrice: New trigger price
        takeProfit: New take profit price
        stopLoss: New stop loss price
    
cancel_orderA

Cancel an existing order (MEDIUM risk - no confirmation required).

    Args:
        category: Product type - spot, linear, inverse, option
        symbol: Symbol name
        orderId: Order ID (either orderId or orderLinkId required)
        orderLinkId: User custom order ID
    
cancel_all_ordersA

Cancel all open orders (HIGH risk - requires confirmation).

    Args:
        category: Product type - spot, linear, inverse, option
        symbol: Symbol name
        baseCoin: Base coin
        settleCoin: Settle coin
    
get_positionsB

Query real-time position data.

    Args:
        category: Product type - linear, inverse, option
        symbol: Symbol name
        baseCoin: Base coin
        settleCoin: Settle coin
        limit: Limit per page (max 200, default 20)
        cursor: Pagination cursor
    
get_closed_pnlA

Query closed profit and loss records.

    Args:
        category: Product type - linear, inverse
        symbol: Symbol name
        startTime: Start timestamp in milliseconds
        endTime: End timestamp in milliseconds
        limit: Limit per page (max 100, default 50)
        cursor: Pagination cursor
    
set_leverageA

Set leverage for a position (HIGH risk - requires confirmation).

    Args:
        category: Product type - linear, inverse
        symbol: Symbol name
        buyLeverage: Buy leverage (0 to max for risk limit)
        sellLeverage: Sell leverage (0 to max for risk limit)
    
set_trading_stopA

Set take profit, stop loss, or trailing stop for a position (MEDIUM risk).

    Args:
        category: Product type - linear, inverse
        symbol: Symbol name
        takeProfit: Take profit price
        stopLoss: Stop loss price
        trailingStop: Trailing stop distance
        tpTriggerBy: TP trigger price type - LastPrice, MarkPrice, IndexPrice
        slTriggerBy: SL trigger price type
        tpSize: TP order quantity
        slSize: SL order quantity
        positionIdx: Position index (0: one-way, 1: hedge buy, 2: hedge sell)
    
set_auto_add_marginA

Turn on/off auto-add-margin for isolated margin position (MEDIUM risk).

    Args:
        category: Product type - linear
        symbol: Symbol name
        autoAddMargin: 0 to turn off, 1 to turn on
        positionIdx: Position index (0: one-way, 1: hedge buy, 2: hedge sell)
    
get_coin_balanceA

Query coin balance of a specific account type.

    Args:
        accountType: Account type - UNIFIED, CONTRACT, SPOT, OPTION, FUND
        coin: Coin name
        memberId: UID (required when querying sub UID balance)
        withTransferSafeAmount: Query transfer safe amount (0 or 1)
    
get_coin_infoA

Query coin information including chain info, deposit/withdraw status.

    Args:
        coin: Coin name. If omitted, returns all coins.
    
get_transfer_historyB

Query internal transfer records.

    Args:
        transferId: UUID of transfer
        coin: Coin name
        status: Transfer status - SUCCESS, PENDING, FAILED
        startTime: Start timestamp in milliseconds
        endTime: End timestamp in milliseconds
        limit: Limit per page (max 50, default 20)
        cursor: Pagination cursor
    
internal_transferA

Transfer funds between account types under same UID (HIGH risk, requires 'full' mode).

    Args:
        transferId: UUID (generate a UUID before calling)
        coin: Coin name (e.g. USDT)
        amount: Transfer amount (as string)
        fromAccountType: Source account type - UNIFIED, CONTRACT, SPOT, OPTION, FUND
        toAccountType: Destination account type
    
confirm_orderA

Execute a previously prepared HIGH-risk operation after review.

    When a HIGH-risk tool (place_order, amend_order, cancel_all_orders, set_leverage,
    internal_transfer) is called, it returns a confirmation summary instead of executing.
    Call this tool with the confirmation_id to actually execute the operation.

    Args:
        confirmation_id: The confirmation_id returned by the HIGH-risk tool.
    

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/workspace/bybit-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server