1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//! Kraken Futures API client.
//!
//! This module provides clients for the Kraken Futures (derivatives) API,
//! supporting both REST and WebSocket interfaces.
//!
//! ## Features
//!
//! - Full REST API support for Futures trading
//! - WebSocket API for real-time market data and order updates
//! - Support for perpetual and fixed-maturity contracts
//! - Position management with margin and PnL tracking
//!
//! ## Quick Start
//!
//! ```rust,no_run
//! use kraken_api_client::futures::rest::FuturesRestClient;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let client = FuturesRestClient::new();
//! let tickers = client.get_tickers().await?;
//! for ticker in tickers {
//! println!("{}: {} (funding: {:?})",
//! ticker.symbol, ticker.last, ticker.funding_rate);
//! }
//! Ok(())
//! }
//! ```
//!
//! ## Authentication
//!
//! The Futures API uses a different signature algorithm than the Spot API:
//!
//! ```text
//! Futures: HMAC-SHA512(SHA256(postData + nonce + path), secret)
//! Spot: HMAC-SHA512(path + SHA256(nonce + postData), secret)
//! ```
//!
//! Use the same `Credentials` and `CredentialsProvider` types, but the
//! signature is computed differently.
//!
//! ## API Documentation
//!
//! - REST API: <https://docs.kraken.com/api/docs/futures-api>
//! - WebSocket: <https://docs.kraken.com/api/docs/futures-api/websocket>
pub use sign_futures_request;
pub use *;
pub use ;