nautilus_data/lib.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//! Data engine and market data processing for [NautilusTrader](http://nautilustrader.io).
17//!
18//! The *data* crate provides a comprehensive framework for handling market data ingestion,
19//! processing, and aggregation within the NautilusTrader ecosystem. This includes real-time
20//! data streaming, historical data management, and various aggregation methodologies:
21//!
22//! - High-performance data engine for orchestrating data operations.
23//! - Data client infrastructure for connecting to market data providers.
24//! - Bar aggregation machinery supporting tick, volume, value, and time-based aggregation.
25//! - Order book management and delta processing capabilities.
26//! - Subscription management and data request handling.
27//! - Configurable data routing and processing pipelines.
28//!
29//! # Platform
30//!
31//! [NautilusTrader](http://nautilustrader.io) is an open-source, high-performance, production-grade
32//! algorithmic trading platform, providing quantitative traders with the ability to backtest
33//! portfolios of automated trading strategies on historical data with an event-driven engine,
34//! and also deploy those same strategies live, with no code changes.
35//!
36//! NautilusTrader's design, architecture, and implementation philosophy prioritizes software correctness and safety at the
37//! highest level, with the aim of supporting mission-critical, trading system backtesting and live deployment workloads.
38//!
39//! # Feature flags
40//!
41//! This crate provides feature flags to control source code inclusion during compilation,
42//! depending on the intended use case, i.e. whether to provide Python bindings
43//! for the [nautilus_trader](https://pypi.org/project/nautilus_trader) Python package,
44//! or as part of a Rust only build.
45//!
46//! - `ffi`: Enables the C foreign function interface (FFI) from [cbindgen](https://github.com/mozilla/cbindgen).
47//! - `python`: Enables Python bindings from [PyO3](https://pyo3.rs).
48//! - `high-precision`: Enables [high-precision mode](https://nautilustrader.io/docs/nightly/getting_started/installation#precision-mode) to use 128-bit value types.
49//! - `defi`: Enables DeFi (Decentralized Finance) support.
50
51#![warn(rustc::all)]
52#![deny(unsafe_code)]
53#![deny(nonstandard_style)]
54#![deny(missing_debug_implementations)]
55#![deny(clippy::missing_errors_doc)]
56#![deny(clippy::missing_panics_doc)]
57#![deny(rustdoc::broken_intra_doc_links)]
58
59pub mod aggregation;
60pub mod client;
61pub mod engine;
62
63// Re-exports
64pub use client::{DataClient, DataClientAdapter};