Bybit Setup Guide
Time: 10 minutes | Difficulty: Moderate | Market: Crypto Mode: Full automation | API: V5 Unified API (REST + WebSocket) | Docs: bybit-exchange.github.io/docs
This guide wires a Bybit trading bot to the V5 Unified API using the botwir3 runtime. Configure API credentials, connect to spot or derivatives markets, and run automated crypto trading locally.
Before you start
Verify that automated operation is permitted under Bybit's current terms of service before deploying. botwir3 provides tools for building structured automation. The user is responsible for compliance with the platform's terms and all applicable regulations.
⚠ Jurisdiction. Bybit is not available in the United States or the United Kingdom. Bybit is also scaling back services in Japan in 2026. Verify availability in the applicable jurisdiction before proceeding.
Bybit Terms of Service | Last verified: May 2026
What you need
- A Bybit account with identity verification complete
- The botwir3 runtime downloaded and unzipped
- A strategy config file from the builder
Step 1: Create API credentials
- Log in to bybit.com
- Navigate to Account → API Management
- Click Create New Key and select System-generated API Keys
- Under Permissions, enable Read-Write for the relevant account type (Unified Trading)
- Under IP Access Restrictions, bind the key to the IP address of the machine running the bot
- Copy the API Key and Secret Key
Permissions required: Read-Write access for Unified Trading Account. Permissions to disable: Withdrawal, Transfer. These scopes are not required for trading and can be left disabled.
🔒 Security. IP binding is required for Bybit API keys with trade permissions. New accounts have a 48-hour lockout before API key creation is available.
Step 2: Configure the adapter
Create adapter.json in the bot directory:
{
"adapter": "bybit",
"credentials": {
"api_key": "paste-api-key-here",
"api_secret": "paste-api-secret-here"
},
"trading_pair": "BTCUSDT",
"category": "spot",
"environment": "live",
"rate_limit_ms": 100
}
Common trading pairs: BTCUSDT, ETHUSDT, SOLUSDT. Set category to "spot", "linear" (USDT perpetuals), or "inverse" depending on the strategy.
API keys are stored in a local config file on the machine running the bot. They are not transmitted to botwir3 or any third party. botwir3 never sees, stores, or has access to platform credentials.
Step 3: Test the connection
botwir3 test --adapter bybit
Expected output:
[botwir3] Adapter: bybit
[botwir3] Connection: OK
[botwir3] Permissions: READ_WRITE (unified)
[botwir3] Rate limit: weight-based (120 requests/5s for orders)
Step 4: Start the bot
botwir3 start --config my-strategy.json
The runtime loads the strategy, computes the spec hash, connects to Bybit via the local API credentials, and begins evaluating signals. The gate function compares proposed actions against the configured spec. The user is responsible for monitoring the bot and verifying execution outcomes.
Rate limits and considerations
| Endpoint | Limit | Notes |
|---|---|---|
| Order placement | 10 requests/second | Per UID. Applies to create, amend, cancel. |
| Market data | 120 requests/5 seconds | Per UID. |
| WebSocket | 500 subscriptions/connection | Per connection. |
Common Bybit bot configurations include perpetual futures grid trading, spot DCA strategies, and derivatives momentum trading on high-leverage pairs. Bybit's native bot suite (Grid, DCA, AI-powered Aurora) is a hosted alternative — botwir3 provides the local, air-gapped version with configurable discipline features. All actions and decisions are recorded in the local ledger.
Troubleshooting
| Error | Cause | Fix |
|---|---|---|
CONNECTION_REFUSED | API key invalid or IP not bound | Verify API key and bind the machine's IP in API Management |
RATE_LIMITED | Request limit exceeded | Increase rate_limit_ms in adapter config |
PERMISSION_DENIED | Read-Only key used for trading | Create a new key with Read-Write permissions |
INSUFFICIENT_FUNDS | Account balance cannot cover the proposed trade | Reduce position sizing in strategy config |
MANDATE_INTEGRITY_VIOLATION | Config file modified while bot is running | Stop the bot, verify config, restart |
Related guides
- Binance Setup Guide — crypto, global exchange (not US)
- Kraken Setup Guide — crypto, US-friendly
- Coinbase Advanced Setup Guide — crypto, US-based exchange
One bot. $129. No subscription. No $749/mo platform. → Build for Bybit