Skip to main content

Crate nautilus_testkit

Crate nautilus_testkit 

Source
Expand description

Test utilities and data management for NautilusTrader.

The nautilus-testkit crate provides testing utilities including test data management, file handling, and common testing patterns. This crate supports robust testing workflows across the entire NautilusTrader ecosystem with automated data downloads and validation:

  • Test data management: Automated downloading and caching of test datasets.
  • File utilities: File integrity verification with SHA-256 checksums.
  • Path resolution: Platform-agnostic test data path management.
  • Precision handling: Support for both 64-bit and 128-bit precision test data.
  • Common patterns: Reusable test utilities and helper functions.

§NautilusTrader

NautilusTrader is an open-source, production-grade, Rust-native engine for multi-asset, multi-venue trading systems.

The system spans research, deterministic simulation, and live execution within a single event-driven architecture, providing research-to-live semantic parity.

§Feature Flags

This crate provides feature flags to control source code inclusion during compilation, depending on the intended use case, i.e. whether to provide Python bindings for the nautilus_trader Python package, or as part of a Rust only build.

  • python: Enables Python bindings from PyO3.
  • high-precision: Enables high-precision mode to use 128-bit value types.
  • extension-module: Builds the crate as a Python extension module.

Re-exports§

pub use testers::DataTester;
pub use testers::DataTesterConfig;
pub use testers::ExecTester;
pub use testers::ExecTesterConfig;

Modules§

common
files
itch
NASDAQ TotalView-ITCH 5.0 parsing utilities for test data curation.
testers
Test actors and strategies for live testing and development.