nautilus_binance/spot/
mod.rs

1// -------------------------------------------------------------------------------------------------
2//  Copyright (C) 2015-2025 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 client (SBE encoded)
36//!     ├── client.rs   # BinanceSpotWebSocketClient
37//!     ├── handler.rs  # Message parsing and routing
38//!     ├── messages.rs # Internal message types
39//!     └── streams.rs  # Stream subscription management
40//! ```
41
42pub mod http;
43pub mod websocket;
44
45// Re-export main client types
46pub use http::client::BinanceSpotHttpClient;
47pub use websocket::client::BinanceSpotWebSocketClient;