Bybit is one of the largest crypto exchanges by spot and derivatives volume, with a developer-friendly REST and WebSocket API that algorithmic traders can wire ONNX models into. Unlike forex where the MT5 ecosystem is mandatory, on Bybit you write your own trading loop in Python (or any language) and call onnxruntime directly.

This article covers the integration pattern, why Bybit specifically works well for algo traders, and the geographic restriction that affects some readers.

Why Bybit specifically

Three reasons Bybit comes up in algo-trader conversations:

Geographic restrictions (Brazil, US)

Bybit has progressively restricted access in certain regions. As of 2026:

If derivatives are blocked in your jurisdiction, you can still run an ONNX-driven spot-trading bot — the API surface is similar.

The integration stack

Unlike the MT5 ecosystem (where MQL5 hosts everything), the Bybit-side stack is just Python:

requirements.txt
pybit==5.7.0 # official Bybit SDK onnxruntime==1.17.0 # or onnxruntime-gpu for CUDA numpy<2.0 pandas

This stack runs equally well on a local machine, a Linux GPU cloud instance, or a Windows VPS. No MetaTrader involved.

A worked example: ONNX signal → Bybit order

bot.py — minimal Bybit + ONNX
import numpy as np import onnxruntime as ort from pybit.unified_trading import HTTP # Load model once sess = ort.InferenceSession("btc_signal.onnx") # Bybit client (testnet first) client = HTTP(testnet=True, api_key=API_KEY, api_secret=API_SECRET) def fetch_features(): # Pull last 120 1-hour candles, return feature vector klines = client.get_kline(category="spot", symbol="BTCUSDT", interval="60", limit=120) closes = [float(k[4]) for k in klines["result"]["list"]][::-1] features = np.array(closes, dtype=np.float32).reshape(1, 120, 1) # ... apply same normalization as training ... return features def predict_and_trade(): x = fetch_features() y = sess.run(None, {"input": x})[0] signal = float(y[0]) if signal > 0.55: client.place_order( category="spot", symbol="BTCUSDT", side="Buy", orderType="Market", qty="0.001", ) elif signal < 0.45: client.place_order( category="spot", symbol="BTCUSDT", side="Sell", orderType="Market", qty="0.001", ) # Run every hour at minute 0:01 while True: try: predict_and_trade() except Exception as e: print(f"Error: {e}") time.sleep(3600)

That's the whole pattern. The ONNX model and the Bybit SDK are independent — you can swap the model file without touching the trading logic, and vice versa. Production-grade versions add error retry, position-tracking, drawdown limits, and structured logging.

Open Bybit account → (affiliate link — up to 50% lifetime on fees)