qldata
Modern Python library for cryptocurrency market data
Why qldata?¶
qldata is a modern, Pythonic library designed for quantitative traders and researchers who need reliable access to cryptocurrency market data. Built with production systems in mind, it combines a beautiful fluent API with enterprise-grade resilience features.
🎯 Beautiful API
Fluent, chainable interface that reads like English. Write expressive queries in a single line of code.
📡 Real-Time Streaming
WebSocket connections with auto-reconnect, rate limiting, and sequence tracking built-in.
🔄 Data Transforms
Clean, resample, and validate data with a powerful transform pipeline. Handles missing data intelligently.
🛡️ Built for Reliability
Monitoring, alerts, and resilience features designed for 24/7 operation in production environments.
🏦 Multi-Exchange
Unified API across Binance and Bybit. Easily extend to support additional exchanges.
📊 Type Safe
Full type hints throughout. Rich data models for bars, ticks, order books, and more.
Quick Example¶
import qldata as qd
# Historical data with cleaning
df = qd.data("BTCUSDT", source="binance", category="spot") \
.last(30, "days") \
.resolution("1h") \
.clean(remove_outliers=True) \
.fill_forward() \
.get()
# Live streaming with callbacks
stream = qd.stream(["BTCUSDT", "ETHUSDT"], source="binance") \
.resolution("tick") \
.on_data(lambda df: print(f"Price: {df['price'].iloc[-1]}")) \
.on_error(lambda e: print(f"Error: {e}")) \
.get(start=True)
Installation¶
Supported Exchanges¶
| Exchange | Spot | Perpetuals | Live Streaming | Status |
|---|---|---|---|---|
| Binance | ✅ | ✅ USDM | ✅ | Stable |
| Bybit | ✅ | ✅ Linear | ✅ | Stable |
What's Next?¶
📖 Installation Guide
Set up qldata in your environment with our step-by-step guide.
🚀 Quick Start
Get up and running with your first data query in minutes.
📓 Cookbook
Real-world examples and recipes for common use cases.