canonical: https://jentic.com/apis/bybit.com/bybit

# 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. This spec covers the V5 API across market data, order placement and amendment, position listing, account wallet queries, and asset withdrawals - broader than the bybit-exchange.github.io main slice. Authentication uses an API key plus HMAC-SHA256 signature and timestamp headers.

## For AI agents

Trade on Bybit V5: read market data, place, amend, and cancel orders, list positions, query wallet balances, and initiate asset withdrawals. Authenticate with X-BAPI-API-KEY plus signed X-BAPI-SIGN and X-BAPI-TIMESTAMP headers.

## Scope

Does not handle on-chain transfers outside the withdraw flow, fiat on-ramp KYC, or tax reporting - use for Bybit V5 trading, position, wallet, and withdrawal operations only.

## Capabilities

- Read klines, orderbook, tickers, and instrument metadata across spot and derivatives
- Place new orders with full Bybit V5 parameter support
- Amend an existing open order's price or quantity
- Cancel open orders and list currently active orders
- List open positions across account types
- Query wallet balances across unified, contract, and spot accounts
- Initiate asset withdrawals to whitelisted addresses

## Use cases

### Programmatic Trading and Position Management

Run a full trading lifecycle through one spec - place, amend, and cancel orders, then track resulting positions via /v5/position/list. Quant teams use this when they need order amendment without cancel-and-replace and a unified view across spot and derivatives. Initial integration takes 1-2 days including signature handling.

Example prompt: Place a limit buy on BTCUSDT, watch /v5/position/list for fill, then amend the take-profit price via POST /v5/order/amend

### Treasury and Withdrawal Automation

Automate periodic sweeps of stablecoin balances from the exchange to a custodial address using /v5/asset/withdraw/create. Treasury teams use this to enforce balance caps on the exchange and reduce custodial risk. Withdrawals require a whitelisted address configured in the Bybit account.

Example prompt: When USDT spot balance exceeds 100,000, POST /v5/asset/withdraw/create to move the excess to the whitelisted treasury address

### Risk and Margin Monitoring

Combine /v5/account/wallet-balance, /v5/position/list, and /v5/order/realtime to feed a real-time risk dashboard. Risk teams use this to monitor margin utilisation, unrealised PnL, and open order exposure across the firm's Bybit accounts. Polling at moderate cadence keeps within rate limit budgets.

Example prompt: Every 60 seconds, fetch wallet balance and position list, compute margin utilisation, and alert if it exceeds 70%

### Market Data Capture for Research

Capture historical klines and live orderbook snapshots across spot and derivatives for backtesting, microstructure research, or feature engineering. The market endpoints are unauthenticated for read-only access, so this can be parallelised aggressively.

Example prompt: For 100 symbols, fetch 1-hour klines for the last 90 days from /v5/market/kline and write to a research datastore

### AI Agent Trading Operations

Through Jentic, an AI agent can execute Bybit V5 trading and treasury operations using natural language intent. The signature is computed at execution time so the raw secret never enters the agent context. Useful for assistants that monitor or rebalance positions under guarded conditions.

Example prompt: Search Jentic for 'amend a bybit order', load the schema for POST /v5/order/amend, and execute with category, symbol, orderId, and the new price

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /v5/market/kline | Read kline data |
| GET | /v5/market/orderbook | Read live orderbook |
| POST | /v5/order/create | Place an order |
| POST | /v5/order/amend | Amend an open order |
| POST | /v5/order/cancel | Cancel an open order |
| GET | /v5/position/list | List open positions |
| GET | /v5/account/wallet-balance | Query wallet balance |
| POST | /v5/asset/withdraw/create | Initiate an asset withdrawal |

## Key resources

- **Market** — Klines, orderbook, tickers, and instrument info
- **Order** — Place, amend, cancel, and list active orders
- **Position** — List open positions across account types
- **Account** — Query wallet balances across account types
- **Asset** — Initiate asset withdrawals to whitelisted addresses

## 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 and X-BAPI-TIMESTAMP on every request, and picking between the api.bybit.com and api.bytick.com 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/position/list or /v5/account/wallet-balance, so state-changing actions like order amendment or /v5/asset/withdraw/create 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 and X-BAPI-TIMESTAMP are 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 'amend a Bybit order' or 'submit a withdrawal', 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 (curated)** — Lighter 8-endpoint slice without amend, position list, or 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 X-BAPI-API-KEY, an HMAC-SHA256 signature in X-BAPI-SIGN, and a millisecond timestamp in X-BAPI-TIMESTAMP. Through Jentic, the secret is held in the encrypted vault and the signature is computed at execution time.

### Can I amend an open order with this API?

Yes. POST /v5/order/amend updates an open order's price or quantity in place - useful for adjusting limit orders without the cancel-and-replace race window. The /bybit-exchange.github.io/main spec does not include this endpoint.

### 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 are looser than authenticated trade endpoints. Watch for 429 / Bybit-specific rate-limit codes and back off rather than retrying immediately.

### How do I initiate a withdrawal through Jentic?

Run pip install jentic, then search Jentic with the query 'withdraw bybit asset', load the schema for POST /v5/asset/withdraw/create, and execute with the coin, chain, address, and amount fields. The address must be whitelisted in your Bybit account.

### How does this spec differ from the bybit-exchange.github.io main spec?

Both target the live Bybit V5 API at api.bybit.com. This spec covers 11 endpoints including /v5/order/amend, /v5/position/list, and /v5/asset/withdraw/create. The bybit-exchange.github.io main spec covers a tighter 8-endpoint slice without amend, position list, or withdrawals.

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

Yes. Because you run Jentic One yourself, you decide which Bybit V5 operations your agent may call, and Bybit scopes access at the operation level rather than by a resource id in the URL. You can grant read-only calls like GET /v5/position/list and GET /v5/account/wallet-balance while withholding state-changing operations such as POST /v5/order/amend and POST /v5/asset/withdraw/create. The stored API key and secret stay under your own instance's control, so the agent only exercises the operations and credentials your rules permit.
