A high-performance cryptocurrency price data aggregation system built in Rust.
Bothan is a collection of libraries for querying and interacting with various cryptocurrency price data APIs. It provides a unified interface for accessing real-time and historical cryptocurrency price data from multiple exchanges and data providers.
This project comprises primarily of 6 main components:
bothan-core- Core functionality and shared typesbothan-lib- Common utilities and shared codebothan-api- Main API server implementationbothan-api-proxy- API proxy for load balancing and cachingbothan-{exchange}- Exchange-specific implementationsproto- Protocol buffer definitions
- Binance
- Bitfinex
- Bybit
- Coinbase
- CoinGecko
- CoinMarketCap
- CryptoCompare
- HTX
- Kraken
- OKX
- Band/kiwi
- Band/macaw
- Unified API: Consistent interface across all supported exchanges
- High Performance: Built with Rust and Tokio for maximum efficiency
- Real-time Data: Support for streaming and websocket connections
- Caching: Built-in caching to minimize API calls
- Load Balancing: Distributed architecture for high availability
- Rate Limiting: Intelligent rate limit management
- Error Handling: Robust error handling and retry mechanisms
-
Configure the services:
- Copy
bothan-api/server/config.toml.exampletobothan-api/server/config.toml - Update the configuration files with your API keys and settings
- Copy
-
Start the services:
docker-compose up
Bothan uses Buf for protobuf file generation and linting.
-
Generate all proto files for Go client, Rust client, and server:
Run the following command from the root of the project:
buf generate
This command will generate protobuf files for all supported languages (Go, Rust, server stubs, etc.) as specified in the
buf.gen.yamlconfiguration. -
Generate the descriptor file for the server:
To create a protobuf descriptor file needed by the server, run:
buf build -o bothan-api/server/src/proto/descriptor.pb
This will output the descriptor file to
bothan-api/server/src/proto/descriptor.pb.
For more information on modifying or generating protobuf files, refer to Buf documentation.
If you encounter any issues or have questions related to Bothan, we encourage you to open a GitHub issue. This ensures a streamlined process for tracking and resolving problems.
Please use the following link to report your issue: https://github.com/bandprotocol/bothan/issues/new
We welcome contributions from the community! Please read open a Pull Request and follow the checklist in the pull request template.
Copyright © 2024 Informal Systems Inc. and Bothan authors.
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT License (LICENSE-MIT)
at your option.