Ultra-fast, unified market data for HFT & algo-traders — powered by Rust ⚡
soqa-sdk is an open-source Rust-based tool designed to empower algo-traders and HFT teams by aggregating and normalizing market data from multiple exchanges. Our mission is to simplify access to clean, low-latency data, enabling traders to build high-performance strategies without the hassle of inconsistent APIs.
- 🚀 Ultra-low latency: Real-time L1 orderbook data from top crypto exchanges
- 🦀 Rust-powered: Safe, fast, and reliable
- 🔗 Unified API: One interface for all supported exchanges
- 🛠️ Easy to extend: Add new exchanges in minutes
- 📦 Async & modern: Built on Tokio, reqwest, and tungstenite
- 🧩 Open-source: MIT licensed, PRs welcome!
- Binance
- Bybit
- OKX
- Kraken
- KuCoin
- Rust (latest stable recommended)
- Tokio (async runtime)
- reqwest (HTTP client)
- tokio-tungstenite (WebSocket)
- serde/serde_json (JSON parsing)
cargo build --release
Example: Get ETHUSDT data from KuCoin:
cargo run --release -- start --exchange kucoin --symbol ETHUSDT
Parameters:
--exchange
— exchange name (binance, bybit, okx, kraken, kucoin)--symbol
— trading pair (e.g., BTCUSDT, ETHUSDT)
The console prints OrderBookL1
objects:
OrderBookL1 {
exchange: "bybit",
symbol: "ETHUSDT",
bid: 2498.57,
bid_volume: 0.38006,
ask: 2498.58,
ask_volume: 7.90089,
timestamp: SystemTime { tv_sec: 1749926167, tv_nsec: 147185000 }
}
soqa-sdk/
├── src/
│ ├── exchanges/
│ │ ├── binance.rs
│ │ ├── bybit.rs
│ │ ├── okx.rs
│ │ ├── kraken.rs
│ │ ├── kucoin.rs
│ │ └── mod.rs
│ ├── models.rs
│ ├── error.rs
│ └── main.rs
├── Cargo.toml
└── README.md
- Each exchange has a dedicated client that connects to its WebSocket API.
- After connecting, a subscription message is sent for the selected trading pair.
- Incoming messages are parsed, and L1 orderbook data (bid/ask) is extracted and passed to a callback.
- For KuCoin and some other exchanges, a REST API token is required before connecting to WebSocket.
let client = KuCoinClient::new(config);
client.subscribe_l1(|orderbook| {
println!("{:?}", orderbook);
}).await?;
- Binance
cargo run --release -- start --exchange binance --symbol BTCUSDT
- Bybit
cargo run --release -- start --exchange bybit --symbol ETHUSDT
- OKX
cargo run --release -- start --exchange okx --symbol BTC-USDT
- Kraken
cargo run --release -- start --exchange kraken --symbol XBT/USD
- KuCoin
cargo run --release -- start --exchange kucoin --symbol ETHUSDT
Q: Why am I not receiving data from KuCoin?
- Check the symbol format (e.g., ETH-USDT).
- Make sure you are subscribing to the correct topic (
/market/ticker:SYMBOL
). - Check logs — sometimes the exchange does not send data if there is no activity.
Q: How do I add my own exchange?
- Implement a client structure and subscription method similar to the existing ones.
- Register the new module in
mod.rs
and add handling in the main match statement.
Q: What data can I get?
- Only L1 orderbook (bid/ask) for the selected trading pair.
Contact & Support:
Issues and suggestions — via GitHub Issues
Pull Requests are welcome!
LinkedIn: SOQA