This Rust project implements a cryptocurrency data aggregator. It focuses on capturing real-time Bitcoin (BTC) price data via WebSocket connections to various cryptocurrency exchanges, processing this data in a distributed client environment, and ensuring secure communication through digital signature verification.
- WebSocket Communication: Connects to cryptocurrency exchanges like Binance for real-time BTC price data.
- Distributed Client Processing: Manages multiple client processes to fetch and aggregate data concurrently.
- Digital Signature Verification: Ensures the integrity and authenticity of data using ECDSA signatures.
Before you begin, ensure you have met the following requirements:
- Rust Programming Language
- Cargo (Rust's package manager)
- Access to cryptocurrency exchange APIs
To install the project, follow these steps:
git clone [your-repo-url]
cd [your-repo-directory]
cargo build
The project can be operated in two main modes: cache
and read
.
In cache mode, the client listens to a WebSocket for a given number of times and caches the BTC price data.
./simple --mode=cache --times=[number_of_times]
In read mode, the program reads from the cached file and displays the data points and the calculated average.
./simple --mode=read
cargo run --bin aggregator
This command starts the aggregator process along with five client processes.