Bybit
BetaCrypto — Major Exchanges
connectorType: "bybit"Bybit is one of the fastest-growing cryptocurrency derivatives exchanges, offering perpetual contracts, inverse perpetuals, and spot trading with deep liquidity.
Connection Architecture
Bybit
WebSocket / REST→
Connector
libs/exchange-bybit→
Provider
:8081/api→
Detector
Advisor
Studio
The connector receives data from the exchange and feeds it to Provider (port 8081). From there — to Detector, Advisor, and Studio.
Technologies
Transport
WebSocketREST
Authentication
API Key + SecretData Format
JSONFeatures
Rate LimiterUnified Account
Best for
- Bybit is the top choice for perpetual futures strategies requiring high liquidity in USDT-denominated contracts at lower fees than Binance.
- It is well-suited for delta-neutral hedging, funding-rate arbitrage (Bybit funding resets every 8 hours), and leveraged directional trend-following on BTC and ETH.
- Barfinex users running cross-exchange perpetual strategies often combine Bybit with Binance for the best blended execution quality.
Connect via code
1Environment variables (.env)
BYBIT_API_KEY=your_key_here BYBIT_API_SECRET=your_secret_here
2Connector configuration
// config/config.provider.json
{
"provider": {
"connectors": [
{
"connectorType": "bybit",
"enabled": true,
"key": "${BYBIT_API_KEY}",
"secret": "${BYBIT_API_SECRET}",
"markets": [
{ "marketType": "spot", "symbols": [{ "name": "BTCUSDT" }] }
],
"subscriptions": [
{ "type": "PROVIDER_MARKETDATA_CANDLE", "symbols": ["BTCUSDT"], "intervals": ["min1", "h1"], "active": true },
{ "type": "PROVIDER_MARKETDATA_TRADE", "symbols": ["BTCUSDT"], "active": true },
{ "type": "PROVIDER_MARKETDATA_ORDERBOOK", "symbols": ["BTCUSDT"], "active": true }
]
}
]
}
}3Verify and query data
# Verify connection curl -H "Authorization: Bearer $PROVIDER_API_TOKEN" \ https://localhost:8081/api/exchanges/runtime-proof # Candles (last 7 days) curl -H "Authorization: Bearer $PROVIDER_API_TOKEN" \ "https://localhost:8081/api/candles/bybit/spot/BTCUSDT/h1?days=7"
Available via Barfinex API
/api/candles/bybit/...
/api/trades/bybit/...
/api/orderbook/bybit/...
/api/account/bybit/...
/api/symbols/bybit/...
/api/assets/bybit/...
Studio graphical setup — in development, coming in the next release.
Important
Permissions required: Read + Unified Trade (covers spot and derivatives under the unified account).
Rate limit: 120 requests/min on most private REST endpoints.
Bybit uses a unified account model — ensure your account is upgraded to Unified Trading Account (UTA) for access to all markets under a single API key.
IP restriction is available and recommended.
Note that testnet keys and mainnet keys are entirely separate; do not mix environments in Barfinex connector config.