Expand description
NautilusTrader adapter for the Lighter DEX.
The nautilus-lighter crate provides integration with the Lighter API for trading
perpetual futures and spot markets on a zk-rollup decentralized exchange.
§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.extension-module: Builds as a Python extension module.
Python bindings for the Lighter adapter are intentionally scoped to configuration, enums, factory wiring, and integrator revocation. Data and execution clients are consumed directly through the Rust trait surface.
High-precision mode (128-bit value types) is enabled by default.
§Integrator attribution
Submitted create and modify order transactions carry the NautilusTrader integrator account index
in Lighter’s L2TxAttributes. This helps us gauge real usage of the integration and prioritize
ongoing maintenance. Maker and taker integrator fees are set to zero, so attribution adds no
trading cost.
Lighter requires an ApproveIntegrator approval before these attributes can be attached to
orders. During startup, the execution client submits the required zero-fee approval for the
configured L2 account. See the
Lighter integration guide
for approval and revocation details.
Modules§
- common
- Cross-cutting types, constants, and helpers shared across HTTP and WebSocket layers.
- config
- Configuration structures for the Lighter adapter.
- data
- Live data client for the Lighter adapter.
- execution
- Live execution client for the Lighter adapter.
- factories
- Factory functions for creating Lighter clients and components.
- http
- HTTP client surface for Lighter REST endpoints.
- python
- Python bindings from
pyo3. - signing
- Lighter L2 transaction signing.
- websocket
- WebSocket client surface for Lighter streaming endpoints.