Skip to main content

kraken_api_client/
lib.rs

1//! # Kraken Client
2//!
3//! An async Rust client library for the Kraken exchange REST and WebSocket v2 APIs.
4//!
5//! ## Features
6//!
7//! - Full REST API support for Kraken Spot trading
8//! - WebSocket v2 API with automatic reconnection
9//! - Built-in rate limiting
10//! - Strong typing for all request/response types
11//! - Financial precision with `rust_decimal`
12//!
13//! ## Quick Start
14//!
15//! ```rust,no_run
16//! use kraken_api_client::spot::rest::SpotRestClient;
17//!
18//! #[tokio::main]
19//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
20//!     let client = SpotRestClient::new();
21//!     let time = client.get_server_time().await?;
22//!     println!("Server time: {:?}", time);
23//!     Ok(())
24//! }
25//! ```
26
27pub mod auth;
28pub mod error;
29pub mod rate_limit;
30pub mod spot;
31pub mod types;
32
33// Placeholder for future Kraken Futures API support
34pub mod futures;
35
36// Re-export commonly used types at crate root
37pub use error::KrakenError;
38pub use types::common::{BuySell, OrderStatus, OrderType};
39
40/// Result type alias using KrakenError
41pub type Result<T> = std::result::Result<T, KrakenError>;