Skip to content

Rust library designed to facilitate the retrieval of price information for various cryptocurrencies and assets from diverse sources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

bandprotocol/bothan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Bothan

MIT Licensed Apache 2.0 Licensed Rust 1.85+

A high-performance cryptocurrency price data aggregation system built in Rust.

Overview

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.

Project Structure

This project comprises primarily of 6 main components:

  • bothan-core - Core functionality and shared types
  • bothan-lib - Common utilities and shared code
  • bothan-api - Main API server implementation
  • bothan-api-proxy - API proxy for load balancing and caching
  • bothan-{exchange} - Exchange-specific implementations
  • proto - Protocol buffer definitions

Supported Data Sources

Features

  • 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

Quick Start

Prerequisites

Running the API Stack

  1. Configure the services:

    • Copy bothan-api/server/config.toml.example to bothan-api/server/config.toml
    • Update the configuration files with your API keys and settings
  2. Start the services:

    docker-compose up

Generating Protobuf Files

Bothan uses Buf for protobuf file generation and linting.

  1. 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.yaml configuration.

  2. 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.

Support

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

Contributing

We welcome contributions from the community! Please read open a Pull Request and follow the checklist in the pull request template.

Resources

License

Copyright © 2024 Informal Systems Inc. and Bothan authors.

Licensed under either of:

at your option.

About

Rust library designed to facilitate the retrieval of price information for various cryptocurrencies and assets from diverse sources

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 10

Languages