canonical: https://jentic.com/apis/bybit-exchange.github.io/bybit-exchange

# Bybit Exchange Bybit V5 API

Jentic publishes the only available OpenAPI specification for Bybit V5 API, keeping it validated and agent-ready. Bybit is a cryptocurrency derivatives and spot exchange. The V5 API exposes market data - klines, orderbook, tickers, instrument info - plus trading operations and account wallet queries. This curated spec covers the most commonly used endpoints; the bybit.com main spec adds position management, asset withdrawals, and order amends. Authentication uses an API key plus HMAC-SHA256 signature header.

## For AI agents

Read Bybit market data, place and cancel orders, and query wallet balances. Authenticate with an X-BAPI-API-KEY plus signed X-BAPI-SIGN header.

## Scope

Does not handle on-chain transfers, fiat on-ramp KYC, or tax reporting - use for Bybit V5 market data, order placement, and wallet balance queries only.

## Capabilities

- Read kline (candlestick) data for any tradable instrument
- Fetch the live orderbook and 24-hour ticker stats
- Look up instrument metadata such as tick size and contract details
- Place and cancel orders against spot or derivatives markets
- List the trader's currently active orders
- Query the wallet balance across account types

## Use cases

### Algorithmic Trading Loop

Drive a live trading loop that reads market data via /v5/market/kline and /v5/market/orderbook, computes a signal, and submits orders through /v5/order/create. Quantitative traders use this for systematic spot or perpetual futures strategies. The V5 surface is unified across product types so the same loop can target spot or derivatives.

Example prompt: Pull 1-minute klines for BTCUSDT, compute a moving-average crossover, and submit a market order via POST /v5/order/create when the signal flips

### Market Data Capture

Capture historical and live market data for backtesting, research, or analytics dashboards. Researchers use /v5/market/kline for historical bars, /v5/market/orderbook for snapshots, and /v5/market/tickers for cross-section pricing. All four market endpoints are unauthenticated for read-only access.

Example prompt: For each of 50 tracked symbols, fetch 1-day klines for the last 365 days and write to a parquet file for backtesting

### Portfolio Monitoring

Monitor open orders and wallet balances continuously by polling /v5/order/realtime and /v5/account/wallet-balance. Useful for risk dashboards or alerting when positions or balances deviate from expected ranges. Polling at a moderate interval keeps within rate-limit budgets.

Example prompt: Every 30 seconds, fetch /v5/account/wallet-balance and post an alert when total equity drops more than 5% inside an hour

### AI Agent Trading Operations

Through Jentic, an AI agent can execute Bybit market and trading operations using natural language intent, with the API key kept out of the agent context. Useful for assistants that monitor positions, hedge exposure, or rebalance on a trader's behalf under guarded conditions.

Example prompt: Search Jentic for 'place a bybit order', load the schema for POST /v5/order/create, and execute with category, symbol, side, orderType, and qty

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /v5/market/kline | Read kline (candlestick) data |
| GET | /v5/market/orderbook | Read the live orderbook |
| GET | /v5/market/tickers | Read 24h ticker stats |
| GET | /v5/market/instruments-info | Read instrument metadata |
| POST | /v5/order/create | Place a new order |
| POST | /v5/order/cancel | Cancel an open order |
| GET | /v5/order/realtime | List active orders |
| GET | /v5/account/wallet-balance | Query wallet balance |

## Key resources

- **Market** — Klines, orderbook, tickers, and instrument info
- **Trade** — Place and cancel orders, list active orders
- **Account** — Wallet balance across account types

## Why Jentic

- **Setup:** Wiring the Bybit V5 API by hand means sending the X-BAPI-API-KEY header, computing the X-BAPI-SIGN HMAC-SHA256 signature for every request, and choosing between the mainnet and testnet host. Through Jentic you install once, import Bybit from the API Directory, store the key and secret once, and your agent calls it.
- **Permission scoping:** Bybit V5 addresses each request by endpoint rather than a resource id in the URL path, so scoping stays at the operation level: you limit the agent to the operations it needs, such as reading /v5/market/tickers or /v5/account/wallet-balance, so trade actions like order creation or cancellation are not included unless you add them.
- **Credential handling:** Your Bybit API key and secret are stored once, encrypted, by your own Jentic One instance, and the X-BAPI-SIGN signature is computed at execution time. The raw secret never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'place a Bybit order' or 'check my wallet balance', and Jentic returns the matching Bybit operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Bybit V5 API (extended)** — Wider Bybit V5 surface including positions and asset withdrawals
- **Binance** — Major crypto exchange with deep liquidity across spot and derivatives
- **Kraken** — Crypto exchange with strong spot and futures coverage
- **OKX** — Crypto exchange with derivatives and on-chain products

## FAQ

### Why is there no official OpenAPI spec for Bybit V5 API?

Bybit does not publish a single OpenAPI specification covering the V5 API. Jentic generates and maintains this spec so that AI agents and developers can call Bybit V5 API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Bybit V5 API use?

Authenticated endpoints require an API key in the X-BAPI-API-KEY header plus a request signature in the X-BAPI-SIGN header (HMAC-SHA256). Through Jentic, the secret is held in the encrypted vault and the signature is computed at execution time so raw secrets never enter the agent's context.

### Can I place orders with this API?

Yes. POST /v5/order/create places a new order on spot or derivatives markets; POST /v5/order/cancel cancels an open order. The category and symbol parameters select the product type and instrument.

### What are the rate limits for the Bybit V5 API?

Rate limits vary by endpoint and account tier and are not enumerated in the spec. Public market endpoints have looser limits than authenticated trade endpoints. Watch for 10006 / 429 responses and back off rather than retrying immediately.

### How do I read the orderbook through Jentic?

Run pip install jentic, then search Jentic with the query 'read bybit orderbook', load the schema for GET /v5/market/orderbook, and execute with the category and symbol parameters set to your target market.

### How does this spec differ from the bybit.com main spec?

Both target the live Bybit V5 API. This spec covers 8 commonly used endpoints across market, trade, and account. The bybit.com main spec adds position listing, order amends, and asset withdrawals for broader account operations.

### Can I limit what my agent is allowed to do with the Bybit V5 API?

Yes. Because you run Jentic One yourself, your own rules decide which Bybit V5 operations the agent may call, and scoping happens at the operation level since each request is addressed by endpoint. You can allow read-only calls such as GET /v5/market/tickers and GET /v5/account/wallet-balance while withholding trade actions like POST /v5/order/create and POST /v5/order/cancel unless you grant them. The API key and secret you store stay under your control, so the agent can only invoke the operations you have permitted.
