Expand description
§DataMaxi+ Rust SDK
This is the official implementation of Rust SDK for DataMaxi+. The package can be used to fetch both historical and latest data using DataMaxi+ API.
§Installation
[dependencies]
datamaxi = { git = "https://github.com/bisonai/datamaxi-rust.git" }§Minimum Supported Rust Version (MSRV)
This crate requires Rust 1.86 or newer. The MSRV is verified in CI and may be raised in a minor version bump.
§Configuration
Private API endpoints are protected by an API key. You can get the API key upon registering at https://datamaxiplus.com/auth.
| Option | Explanation |
|---|---|
api_key | Your API key |
base_url | If base_url is not provided, it defaults to https://api.datamaxiplus.com. |
§Examples
§CEX Candle
The client is async by default (requires a runtime such as tokio). For a
synchronous client, enable the sync feature; everything the sync API
needs then lives under the single datamaxi::sync module, e.g.
use datamaxi::sync::{Client, CexCandle};.
use datamaxi::{
CexCandleExchangesMarket, CexCandleMarket, CexCandleOptions, CexCandleSymbolsOptions,
Client,
};
let client = Client::new("my_api_key");
let candle = client.cex_candle();
// Supported exchanges, symbols and intervals
let _ = candle.exchanges(CexCandleExchangesMarket::Spot).await?;
let _ = candle.symbols("binance", CexCandleSymbolsOptions::new()).await?;
let _ = candle.intervals().await?;
// Fetch CEX candle data
let _ = candle
.get(
"binance",
"BTC-USDT",
CexCandleOptions::new().market(CexCandleMarket::Spot),
)
.await?;§Links
§Contributing
We welcome contributions! If you discover a bug in this project, please feel free to open an issue to discuss the changes you would like to propose.
§License
Re-exports§
pub use api::Client;pub use api::ClientBuilder;pub use reqwest;
Modules§
- api
- API definitions and related utilities.