nautilus_binance/spot/
mod.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//! Binance Spot market adapter with full SBE (Simple Binary Encoding) support.
17//!
18//! This module provides high-performance market data and execution clients for
19//! Binance Spot markets using SBE encoding for both REST API and WebSocket streams.
20//!
21//! ## Features
22//!
23//! - **SBE REST API**: All REST responses decoded from SBE format.
24//! - **SBE WebSocket Streams**: Market data streams with microsecond timestamps.
25//! - **Ed25519 Authentication**: Required for SBE market data streams.
26//!
27//! ## Architecture
28//!
29//! ```text
30//! spot/
31//! ├── http/               # REST API client (SBE encoded)
32//! │   ├── client.rs       # BinanceSpotHttpClient
33//! │   ├── models.rs       # Response types
34//! │   └── query.rs        # Query parameter builders
35//! └── websocket/          # WebSocket clients (SBE encoded)
36//!     ├── streams/        # Market data streams (pub/sub)
37//!     │   ├── client.rs   # BinanceSpotWebSocketClient
38//!     │   └── handler.rs  # Message parsing and routing
39//!     └── trading/        # Trading API (request/response)
40//!         ├── client.rs   # BinanceSpotWsTradingClient
41//!         └── handler.rs  # Request/response handling
42//! ```
43
44pub mod enums;
45pub mod http;
46pub mod websocket;
47
48// Re-export main client types
49pub use enums::{BinanceCancelReplaceMode, BinanceOrderResponseType, BinanceSpotOrderType};
50pub use http::client::BinanceSpotHttpClient;
51pub use websocket::{BinanceSpotWebSocketClient, BinanceSpotWsTradingClient};