Data infrastructure built with ♥︎ by Laakhay
Project description
Laakhay Data
Beta-stage async-first cryptocurrency market data aggregation library.
⚠️ Beta Software: This library is in active development. Use with caution in production environments. APIs may change between versions.
Unified API for multi-exchange market data with support for Binance, Bybit, OKX, Hyperliquid, Kraken, and Coinbase. Modular provider architecture with REST/WebSocket abstraction, type-safe Pydantic models, and high-level streaming feeds.
Installation
pip install laakhay-data
Quick Start
import asyncio
from laakhay.data.core import DataAPI, MarketType, Timeframe
async def main():
async with DataAPI() as api:
# Fetch OHLCV data
ohlcv = await api.fetch_ohlcv(
symbol="BTCUSDT",
timeframe=Timeframe.H1,
exchange="binance",
market_type=MarketType.SPOT,
limit=100,
)
print(f"Fetched {len(ohlcv)} bars")
# Stream real-time trades
async for trade in api.stream_trades(
symbol="BTCUSDT",
exchange="binance",
market_type=MarketType.SPOT,
):
print(f"{trade.symbol}: ${trade.price} ({trade.side})")
break
asyncio.run(main())
Supported Exchanges
| Exchange | Spot | Futures | REST | WebSocket |
|---|---|---|---|---|
| Binance | ✅ | ✅ | ✅ | ✅ |
| Bybit | ✅ | ✅ | ✅ | ✅ |
| OKX | ✅ | ✅ | ✅ | ✅ |
| Hyperliquid | ❌ | ✅ | ✅ | ✅ |
| Kraken | ✅ | ✅ | ✅ | ✅ |
| Coinbase | ✅ | ❌ | ✅ | ✅ |
Data Types
| Type | REST | WebSocket | Markets |
|---|---|---|---|
| OHLCV Bars | ✅ | ✅ | Spot, Futures |
| Order Book | ✅ | ✅ | Spot, Futures |
| Trades | ✅ | ✅ | Spot, Futures |
| Liquidations | ❌ | ✅ | Futures |
| Open Interest | ✅ | ✅ | Futures |
| Funding Rates | ✅ | ✅ | Futures |
| Mark Price | ❌ | ✅ | Futures |
| Symbol Metadata | ✅ | ❌ | Spot, Futures |
Key Features
- Unified DataAPI: Single interface across all exchanges
- Universal Symbol Mapping (URM): Use any symbol format
- Capability Discovery: Check feature support before requests
- Type-Safe Models: Immutable Pydantic v2 models
- High-Level Feeds: OHLCV, liquidation, and open interest feeds
- Stream Relay: Forward streams to Redis, Kafka, or custom sinks
Documentation
Comprehensive documentation is available in the docs/ directory:
- Getting Started - Quick start guide
- Examples - Code examples for common use cases
- API Reference - Complete API documentation
- Architecture - System architecture and design decisions
- Guides - Usage guides and best practices
See the Documentation Index for complete navigation.
Requirements
- Python 3.12+
pydantic>=2.0aiohttp>=3.8websockets>=10
License
MIT License - see LICENSE
Built by Laakhay Corporation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file laakhay_data-0.2.7.tar.gz.
File metadata
- Download URL: laakhay_data-0.2.7.tar.gz
- Upload date:
- Size: 187.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4dd5bc2677332f7cc5417e9f42c8f62e26b1bc90e783cc4027a94c271a35f187
|
|
| MD5 |
e42314bdb764be058c8d78f747273655
|
|
| BLAKE2b-256 |
14d4bebfb2f562ad34dc627f61864803ad911652defcd5d60b875414177652f0
|
File details
Details for the file laakhay_data-0.2.7-py3-none-any.whl.
File metadata
- Download URL: laakhay_data-0.2.7-py3-none-any.whl
- Upload date:
- Size: 337.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f2eef70759f6209a3cfcc0e3b039bfd2c04496de35c30ac67dc4135a6522d42
|
|
| MD5 |
f4326b5bccd90d3a2864d1d3ac611447
|
|
| BLAKE2b-256 |
e6f061f4307752bd802019aba1cc9fbf3291d587bca259f0ec619dce8c26cf11
|