About this project
UNICORN Binance Depth Cache Cluster (UBDCC) provides a shared, reliable, and synchronized Binance order book data service via a REST API, addressing common challenges faced by trading bot developers. It eliminates issues like restart penalties, duplicated WebSocket connections, silent data corruption, and language limitations by offering a consistent data source accessible from Python, JavaScript, Go, Rust, Java, C#, and other languages.
The system ensures guaranteed consistency by validating every update's sequence numbers, detecting gaps, and performing automatic resyncs, while also removing orphaned price levels beyond Binance's top 1000. It features redundancy with automatic failover, smart rate limiting for API calls, and a self-healing cluster state that recovers without external databases like Redis or etcd.
UBDCC is designed for multi-bot setups, arbitrage, market making, rapid development, and polyglot stacks. Its architecture comprises a `mgmt` component for cluster state, `restapi` as the API gateway, and multiple `dcn` processes running the actual DepthCaches. This design allows it to scale from a single machine (e.g., 1 mgmt, 1 restapi, multiple DCNs) to a Kubernetes cluster with multiple servers and DCN pods.
Key features include deterministic order book state based on UBLDC, automatic failover with configurable redundancy, self-healing state replication, language-agnostic access via HTTP/JSON, smart rate limiting with support for per-account API credentials, and scalability with available resources. It offers flexible data filtering (top N asks/bids, volume threshold), full transparency with debug options, and a fully asynchronous, Cython-compiled stack for maximum performance and fast access times. The project supports various Binance exchanges, including spot, margin, futures, and options markets, along with their testnets.
Installation is straightforward with `pip install ubdcc`, and the cluster can be started with a single command (`ubdcc start`). An interactive console and CLI tools are provided for management, alongside a web-based UBDCC Dashboard with an API Builder for easy exploration and code generation.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.