Skip to main content

Crate nautilus_binance

Crate nautilus_binance 

Source
Expand description

NautilusTrader adapter for the Binance cryptocurrency exchange.

The nautilus-binance crate provides client bindings (HTTP & WebSocket) and data models for the official Binance API. Live data and execution clients are available for:

  • Spot markets, including Binance US (api.binance.com)
  • USD-M Futures (fapi.binance.com)
  • COIN-M Futures (dapi.binance.com)

The crate also includes shared enums, endpoint constants, URL routing, and credential plumbing for adjacent Binance surfaces such as Margin and European Options. Those surfaces do not have live data or execution clients in this crate.

The official Binance API reference can be found at https://binance-docs.github.io/apidocs/.

§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 (Rust-only builds vs. Python bindings through PyO3).

  • examples: Enables the crate’s example binaries.
  • extension-module: Builds as a Python extension module.
  • high-precision (default): Enables high-precision mode to use 128-bit value types.
  • python: Enables Python bindings from PyO3.

Modules§

arrow
Arrow serialization for Binance adapter types.
common
Common types, constants, and utilities for the Binance adapter.
config
Binance adapter configuration structures.
data_types
Binance-specific custom data types.
factories
Factory functions for creating Binance clients and components.
futures
Binance Futures adapter components.
python
Python bindings for the Binance adapter.
spot
Binance Spot market adapter with full SBE (Simple Binary Encoding) support.