Expand description
NautilusTrader adapter for the Lighter DEX.
The nautilus-lighter crate provides integration with the Lighter protocol for trading
perpetual futures and spot markets on the Lighter and Robinhood Chain deployments.
The official Lighter API reference can be found at https://docs.lighter.xyz/api.
§NautilusTrader
NautilusTrader is an open-source, production-grade, Rust-native trading engine with a deterministic, event-driven architecture for multi-asset, multi-venue systems.
The system spans research, simulation, and live execution, providing research-to-live semantic parity.
§Feature Flags
Feature flags control code inclusion for Rust builds and Python bindings:
examples: Enables the crate’s example binaries.extension-module: Builds as a Python extension module.fuzz: Enables libFuzzer integration for fuzz targets.high-precision(default): Enables high-precision mode to use 128-bit value types.python: Enables Python bindings from PyO3.
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.
§Integrator Attribution
On Lighter and Robinhood mainnets, the execution client adds NautilusTrader’s integrator account index
to create and modify transactions with zero integrator fees. At startup it attempts to approve the
integrator and apply the NAUTILUS referral code. Both testnets omit attribution.
See attribution details for approval, maker-only keys, and revocation.
§Documentation
Modules§
- common
- Common HTTP and WebSocket definitions.
- 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.