nautilus_binance/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//! [NautilusTrader](https://nautilustrader.io) adapter for the
17//! [Binance](https://www.binance.com/) cryptocurrency exchange.
18//!
19//! The `nautilus-binance` crate provides client bindings (HTTP & WebSocket), data
20//! models, and helper utilities that wrap the official **Binance API**. Live data and
21//! execution clients are available for:
22//!
23//! - Spot markets, including Binance US (api.binance.com)
24//! - USD-M Futures (fapi.binance.com)
25//! - COIN-M Futures (dapi.binance.com)
26//!
27//! The crate also includes shared enums, endpoint constants, URL routing, and
28//! credential plumbing for adjacent Binance surfaces such as Margin and European Options.
29//! Those surfaces do not have live data or execution clients in this crate.
30//!
31//! The official Binance API reference can be found at <https://binance-docs.github.io/apidocs/>.
32//!
33//! # NautilusTrader
34//!
35//! [NautilusTrader](https://nautilustrader.io) is an open-source, production-grade, Rust-native
36//! engine for multi-asset, multi-venue trading systems.
37//!
38//! The system spans research, deterministic simulation, and live execution within a single
39//! event-driven architecture, providing research-to-live semantic parity.
40//!
41//! # Feature Flags
42//!
43//! This crate provides feature flags to control source code inclusion during compilation,
44//! depending on the intended use case (Rust-only builds vs. Python bindings through PyO3).
45//!
46//! - `python`: Enables Python bindings via [PyO3](https://pyo3.rs).
47//! - `extension-module`: Builds as a Python extension module (used together with `python`).
48//!
49//! [High-precision mode](https://nautilustrader.io/docs/nightly/getting_started/installation#precision-mode) (128-bit value types) is enabled by default.
50//!
51//! # Documentation
52//!
53//! See <https://docs.rs/nautilus-binance> for the latest API documentation.
54
55#![warn(rustc::all)]
56#![deny(unsafe_code)]
57#![deny(nonstandard_style)]
58#![deny(missing_debug_implementations)]
59#![deny(clippy::missing_errors_doc)]
60#![deny(clippy::missing_panics_doc)]
61#![deny(rustdoc::broken_intra_doc_links)]
62
63pub mod arrow;
64pub mod common;
65pub mod config;
66pub mod data_types;
67pub mod factories;
68pub mod futures;
69pub mod spot;
70
71#[cfg(feature = "python")]
72pub mod python;