Bybit API Documentation

website·Indexed 30 days ago

https://bybit-exchange.github.io/docs/

Comprehensive technical documentation for Bybit's V5 REST and WebSocket APIs, as well as the FIX API. Covers trading for Spot, Margin, Contracts, and Options, including order management, market data, Unified Trading Accounts, RFQ trading, crypto loans, and institutional services. Includes detailed endpoint specifications, response codes, and connection guides for low-latency trading.

Tokens
752K
Snippets
2.8K
Records
4.5K
Agent score
74%

What's inside Bybit

  1. Overview of Broker Dedicated Connection

    v5
    Broker Dedicated Connection is a dedicated connectivity solution for approved brokers and qualified high-volume API users. It provides optimized infrastructure and dedicated routing to reduce latency fluctuations and improve connection stability, specifically for latency-sensitive trading environments. Key benefits include lower/more stable latency, improved execution consistency for orders, better private WebSocket push delivery, and support for SBE (Simple Binary Encoding) order entry and market data workflows.
  2. Overview of Market Maker Gateway (MMGW)

    v5
    The Market Maker Gateway (MMGW) is a dedicated HTTP access path for market makers and institutional clients to send order-related API requests. It is designed to improve routing quality and connection stability, helping to reduce routing drift, intermittent request timeouts, and unexpected HTTP session terminations. Note that MMGW focuses on stability and does not guarantee an absolute latency advantage over the standard api.bybit.com.
  3. Overview of Market Maker WebSocket (MMWS)

    v5
    Market Maker WebSocket (MMWS) is a dedicated WebSocket access path for market makers and institutional clients. It provides a more stable entry point for private channels, trading channels, public market data channels, and SBE WebSocket traffic. The primary goal of MMWS is connection stability—reducing unexpected disconnections and the frequency of push latency—rather than providing an absolute latency advantage over the standard stream.bybit.com endpoint.
  4. Overview of SBE Level 1 BBO Market Data

    v5
    The BBO (Best Bid and Offer) stream provides real-time Level 1 order book data. It is exclusively available via private MMWS and is not open on public WebSockets. Data is transmitted as SBE binary frames using little-endian byte order. Timestamps are provided in microseconds (µs), and price/size values are represented as a mantissa with a corresponding exponent.
  5. Overview of Bybit Open API V5

    v5
    Bybit Open API V5 integrates all business lines—including Spot, Futures (Linear and Inverse), and Options—into a single, unified API. This eliminates the need to switch between multiple API sets to build different business models. It features a unified global dictionary to ensure consistent naming across different business lines and returns actual numerical values without requiring manual conversion adjustments.
  6. Overview of Private MM WebSocket Level 1 Orderbook (SBE)

    v5
    The Private MM WebSocket provides real-time Level 1 Orderbook data using SBE binary frames. This channel is only available on the Private MM WebSocket, not on public WebSockets. Data is transmitted in little-endian format with timestamps in microseconds (µs). Prices and sizes are provided as mantissas with corresponding exponents.
  7. Overview of Bybit V5 API Unification

    v5
    The Bybit V5 API unifies Spot, Derivatives (Linear, Inverse), and Options into a single set of specifications. This allows developers to manage orders and query wallet data across different product lines using a single interface, eliminating the need to switch between multiple product-specific APIs.
  8. Overview of SBE Level 50 OrderBook Market Data

    v5
    The SBE Level 50 OrderBook channel provides market depth data for up to 50 levels on each side (Asks and Bids). It is available exclusively via the MMWS domain and pushes snapshots or deltas every 20ms. Data is transmitted as SBE binary frames (opcode = 2) using little-endian byte order. Timestamps are in microseconds (µs), and prices/sizes are represented as a mantissa combined with an exponent.
  9. Overview of TradFi and V5 API Support

    v5
    Bybit-native Spot, Futures, and Options products (including TradFi instruments) are supported via the V5 API. However, TradFi CFD products use MetaTrader 5 (MT5) and are not available through the V5 API.
  10. Overview of Broker Dedicated Connection

    v5
    The Broker Dedicated Connection is a specialized connectivity solution for approved brokers and high-volume API users. It provides a dedicated route and optimized infrastructure to reduce latency volatility, improve connection stability, and ensure consistent execution performance during high-traffic periods. Key benefits include lower latency compared to the shared stream.bybit.com route, improved private WebSocket delivery, and support for SBE (Simple Binary Encoding) order and market data flows.
  11. Understand Bybit Unified Account 2.0 margin sharing

    v5
    Unified Account 2.0 is the most integrated account mode on Bybit. It incorporates Inverse contracts, USDT perpetual and delivery contracts, USDC perpetual and delivery contracts, Spot, and Options into a single trading system. Under Cross Margin and Portfolio Margin modes, all these trading activities share the same margin pool.
  12. Understand the asset-overview response structure

    v5

    The response returns a totalEquity (string) representing the total value across all accounts in the requested valuation currency, and a list array containing detailed account holdings.

    Each item in the list includes:

    • accountType: The type of account.
    • totalEquity: Total equity for that specific account.
    • valuationCurrency: The currency used for the account's valuation.
    • snapshotTime: Unix timestamp (ms) of the data.
    • coinDetail: An array of coin-level holdings (returned for accounts without sub-categories).
    • categories: An array of sub-category breakdowns (e.g., Earn, TradingBot, CopyTrading, UnifiedTradingAccount).
      • For UnifiedTradingAccount, categories are split into crypto and stocks.
      • Each category contains its own equity and coinDetail list.
      • If accountType=Alpha and category=farm, an extMap object is returned containing priceUpper, priceLower, and equityUnit.