nautilus_kraken/lib.rs
1// -------------------------------------------------------------------------------------------------
2// Copyright (C) 2015-2026 Nautech Systems Pty Ltd. All rights reserved.
3// https://nautechsystems.io
4//
5// Licensed under the GNU Lesser General Public License Version 3.0 (the "License");
6// You may not use this file except in compliance with the License.
7// You may obtain a copy of the License at https://www.gnu.org/licenses/lgpl-3.0.en.html
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14// -------------------------------------------------------------------------------------------------
15
16//! Kraken exchange adapter for NautilusTrader.
17//!
18//! This adapter provides integration with the Kraken cryptocurrency exchange,
19//! supporting both Spot and Futures markets.
20//!
21//! # Features
22//!
23//! - REST API v2 client for market data and account operations.
24//! - WebSocket v2 client for real-time data feeds.
25//! - Support for Spot and Futures markets.
26//! - Comprehensive instrument, ticker, trade, orderbook, and OHLC data.
27//! - Prepared for execution support (orders, positions, balances).
28//!
29//! # API Documentation
30//!
31//! - [Kraken REST API](https://docs.kraken.com/api/)
32//! - [Kraken WebSocket v2](https://docs.kraken.com/websockets-v2/)
33//!
34//! # Feature Flags
35//!
36//! This crate provides feature flags to control source code inclusion during compilation,
37//! depending on the intended use case, i.e. whether to provide Python bindings
38//! for the [nautilus_trader](https://pypi.org/project/nautilus_trader) Python package,
39//! or as part of a Rust only build.
40//!
41//! - `python`: Enables Python bindings from [PyO3](https://pyo3.rs).
42//! - `extension-module`: Builds as a Python extension module (used with `python`).
43//!
44//! [High-precision mode](https://nautilustrader.io/docs/nightly/getting_started/installation#precision-mode) (128-bit value types) is enabled by default.
45
46pub mod common;
47pub mod config;
48pub mod data;
49pub mod execution;
50pub mod factories;
51pub mod http;
52pub mod websocket;
53
54#[cfg(feature = "python")]
55pub mod python;
56
57pub use config::{KrakenDataClientConfig, KrakenExecClientConfig};
58pub use data::{KrakenFuturesDataClient, KrakenSpotDataClient};
59pub use execution::{KrakenFuturesExecutionClient, KrakenSpotExecutionClient};
60pub use http::{
61 KrakenFuturesHttpClient, KrakenFuturesRawHttpClient, KrakenHttpError, KrakenSpotHttpClient,
62 KrakenSpotRawHttpClient,
63};
64pub use websocket::{
65 futures::client::KrakenFuturesWebSocketClient, spot_v2::client::KrakenSpotWebSocketClient,
66};