Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[!feat] Refactor and Add Bitfinex #108

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
239 changes: 136 additions & 103 deletions Cargo.lock

Large diffs are not rendered by default.

56 changes: 25 additions & 31 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,40 @@ members = [
"bothan-api/client/rust-client",
"bothan-api/server",
"bothan-api/server-cli",
"bothan-binance",
"bothan-bybit",
"bothan-coinbase",
"bothan-coingecko",
"bothan-coinmarketcap",
"bothan-core",
"bothan-cryptocompare",
"bothan-htx",
"bothan-kraken",
"bothan-okx",
"bothan-*",
]
exclude = ["bothan-api", "bothan-api-proxy"]
resolver = "2"

[workspace.dependencies]
bothan-api = { path = "bothan-api/server" }
bothan-core = { path = "bothan-core" }
bothan-client = { path = "bothan-api/client/rust-client" }
bothan-lib = { path = "bothan-lib" }

bothan-binance = { path = "bothan-binance" }
bothan-bitfinex = { path = "bothan-bitfinex" }
bothan-bybit = { path = "bothan-bybit" }
bothan-coinbase = { path = "bothan-coinbase" }
bothan-coingecko = { path = "bothan-coingecko" }
bothan-coinmarketcap = { path = "bothan-coinmarketcap" }
bothan-htx = { path = "bothan-htx" }
bothan-kraken = { path = "bothan-kraken" }
bothan-okx = { path = "bothan-okx" }

anyhow = "1.0.86"
async-trait = "0.1.77"
chrono = "0.4.38"
derive_more = { version = "1.0.0-beta.6", features = ["full"] }
bincode = "2.0.0-rc.3"
chrono = "0.4.39"
derive_more = { version = "2.0.1", features = ["full"] }
dirs = "6.0.0"
futures = "0.3.30"
futures-util = "0.3.31"
humantime-serde = "1.1.1"
itertools = "0.13.0"
itertools = "0.14.0"
mockito = "1.4.0"
opentelemetry = { version = "0.26.0", features = ["metrics"] }
num-traits = "0.2.19"
opentelemetry = { version = "0.28.0", features = ["metrics"] }
prost = "0.13.1"
protoc-gen-prost = "0.4.0"
protoc-gen-tonic = "0.4.1"
Expand All @@ -43,26 +52,11 @@ reqwest = { version = "0.12.3", features = ["json"] }
rust_decimal = "1.10.2"
semver = "1.0.23"
serde = { version = "1.0.197", features = ["std", "derive", "alloc"] }
serde_json = "1.0.116"
thiserror = "2.0.6"
serde_json = "1.0.138"
thiserror = "2.0.11"
tokio = { version = "1.36.0", features = ["full"] }
tokio-tungstenite = { version = "0.24.0", features = ["native-tls"] }
tonic = "0.12.1"
tracing = "0.1.40"
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
url = "2.5.0"

bothan-core = { path = "bothan-core" }

bothan-client = { path = "bothan-api/client/rust-client" }
bothan-api = { path = "bothan-api/server" }

bothan-binance = { path = "bothan-binance" }
bothan-bybit = { path = "bothan-bybit" }
bothan-coinbase = { path = "bothan-coinbase" }
bothan-coingecko = { path = "bothan-coingecko" }
bothan-coinmarketcap = { path = "bothan-coinmarketcap" }
bothan-cryptocompare = { path = "bothan-cryptocompare" }
bothan-htx = { path = "bothan-htx" }
bothan-kraken = { path = "bothan-kraken" }
bothan-okx = { path = "bothan-okx" }
25 changes: 8 additions & 17 deletions bothan-api/server-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bothan-api-cli"
version = "0.0.1-beta.1"
version = "0.0.1-beta.2"
rust-version = "1.81"
edition.workspace = true
license.workspace = true
Expand All @@ -11,20 +11,12 @@ name = "bothan"
path = "src/main.rs"

[dependencies]
bothan-client = { workspace = true }
bothan-core = { workspace = true }

bothan-api = { workspace = true }
bothan-binance = { workspace = true }
bothan-bybit = { workspace = true }
bothan-coinbase = { workspace = true }
bothan-coingecko = { workspace = true }
bothan-coinmarketcap = { workspace = true }
bothan-cryptocompare = { workspace = true }
bothan-htx = { workspace = true }
bothan-kraken = { workspace = true }
bothan-okx = { workspace = true }
bothan-core = { workspace = true }
bothan-client = { workspace = true }
bothan-lib = { workspace = true }

dirs = { workspace = true }
reqwest = { workspace = true }
semver = { workspace = true }
serde_json = { workspace = true }
Expand All @@ -33,8 +25,7 @@ tonic = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }

anyhow = "1.0.94"
clap = { version = "4.5.23", features = ["derive"] }
anyhow = "1.0.95"
clap = { version = "4.5.29", features = ["derive"] }
inquire = "0.7.5"
dirs = "5.0.1"
toml = "0.8.19"
toml = "0.8.20"
22 changes: 10 additions & 12 deletions bothan-api/server-cli/config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ url = "wss://stream.binance.com:9443/stream"
# Internal channel size for Binance data streams.
internal_ch_size = 1000

# Configuration for Bitfinex.
[manager.crypto.source.bitfinex]
# REST API URL for querying data from Bitfinex.
url = "https://api-pub.bitfinex.com/v2/"
# Update interval for polling data from Bitfinex.
update_interval = "1m"

# Configuration for Bybit.
[manager.crypto.source.bybit]
# WebSocket URL for streaming data from Bybit.
Expand All @@ -68,13 +75,13 @@ internal_ch_size = 1000

# Configuration for Coingecko.
[manager.crypto.source.coingecko]
# REST API URL for querying data from Coingecko.
# REST API URL for querying data from CoinGecko.
url = "https://api.coingecko.com/api/v3/"
# API key for authentication (if required).
api_key = ""
# User agent string for HTTP requests to Coingecko.
# User agent string for HTTP requests to CoinGecko.
user_agent = "Bothan"
# Update interval for pulling data from Coingecko.
# Update interval for polling data from CoinGecko.
update_interval = "30s"

# Configuration for CoinMarketCap.
Expand All @@ -86,15 +93,6 @@ api_key = ""
# Update interval for pulling data from CoinMarketCap.
update_interval = "1m"

# Configuration for CryptoCompare.
[manager.crypto.source.cryptocompare]
# REST API URL for querying data from CryptoCompare.
url = "wss://data-streamer.cryptocompare.com"
# API key for authentication (required for access).
api_key = ""
# Internal channel size for cryptocompare data streams.
internal_ch_size = 1000

# Configuration for HTX (Huobi).
[manager.crypto.source.htx]
# WebSocket URL for streaming data from HTX.
Expand Down
Loading
Loading