Integration

Stream Lighter's verifiable on-chain order book and execute perpetual, RWA, and spot markets through an adapter written in Rust, with a high-performance L2 transaction signer and full account reconciliation.
On-chain verifiable order book
Perps, RWA, and Spot
Data and execution
Written in Rust 🦀
Lighter is a zero-knowledge rollup on Ethereum built for high-throughput trading. Its matching engine runs inside ZK circuits, so every order match, cancellation, and liquidation is proven cryptographically and verified on-chain, with millisecond latency and zero fees for retail traders.
NautilusTrader integrates with Lighter through nautilus-lighter, a platform adapter written in Rust with Python bindings, providing both data and execution clients. It streams the L2 order book, quotes, trades, and bars, and submits orders signed in the Rust core by its own L2 transaction signer, rather than calling the venue's reference SDK. Private account streams drive order, fill, position, and balance reconciliation.
Perpetuals, RWA, and spot, traded through one adapter and signer.
Perpetuals
Crypto majors
Linear USD-margined perpetual futures on crypto majors, matched on Lighter's verifiable on-chain order book.
Market, limit, stop, conditional
Cross and isolated margin
Zero fees for retail traders
BTC-PERP.LIGHTER
RWA perpetuals
Equities, metals, energy
Oracle-settled perpetual exposure to US equities and commodities. No custody, long or short with leverage.
Equity perps: NVDA, TSLA, AAPL
Gold, silver, oil, and metals
Same path as crypto perps
NVDA-PERP.LIGHTER
Spot
On-chain pairs
Spot markets matched on the same order book and settled against on-chain balances.
Market and limit orders
Post-only maker support
Per-asset account balances
ETH/USDC-SPOT.LIGHTER
Crypto majors and oracle-settled real-world assets, all on one verifiable order book.
Crypto majors · 200+ markets
BTC
Bitcoin
ETH
Ethereum
SOL
Solana
XRP
XRP
DOGE
Dogecoin
BNB
BNB
AVAX
Avalanche
LINK
Chainlink
+ More
US equities (RWA) · 50+ markets
NVDA
NVIDIA
TSLA
Tesla
AAPL
Apple
GOOGL
Alphabet
META
Meta
MSFT
Microsoft
AMZN
Amazon
COIN
Coinbase
+ More
Commodities (RWA) · 30+ markets
XAU
Gold
XAG
Silver
XPT
Platinum
XPD
Palladium
XCU
Copper
WTI
Crude oil
BRENT
Brent oil
+ More
These are a representative sample. Lighter lists many more markets and adds new ones continuously; the adapter discovers the full live instrument set from the venue at startup and maps each Lighter market index to a NautilusTrader instrument.
On-chain verifiable order book
Every match, cancel, and liquidation is proven by ZK circuits and verified on Ethereum. The adapter streams that same L2 book.
Fast L2 signing
A Rust signer (Schnorr / ECgFp5 with Poseidon2 hashing) built into the adapter rather than an external SDK, signing roughly two to three times faster than the Go reference.
Data and execution
One adapter covers both market data and order execution, with full account, position, and balance reconciliation.
L2 order book depth
Maintains the visible book from a snapshot plus deltas, emitting MBP deltas and top-ten depth as native data types.
Perps, RWA, and Spot
Linear crypto perpetuals, oracle-settled RWA perps, and on-chain spot pairs through a single client.
Mainnet and testnet
Select the environment with one config flag. The data client runs on public endpoints; execution adds account credentials.
Each Lighter feed maps to a native NautilusTrader data type.
Data feed
NautilusTrader type
Notes
Order book (L2 MBP)
OrderBookDeltaSnapshot then incremental deltas; the book initializes from the subscribed snapshot frame.
Order book depth
OrderBookDepth10Top-ten levels maintained from the live order book.
Quotes
QuoteTickBest bid and offer from the ticker stream.
Trades
TradeTickLive trades over WebSocket, plus REST trade history.
Bars
Bar1m through 1d over WebSocket, 1w via REST; emitted on period close.
Mark price
MarkPriceUpdatePerpetual mark price updates.
Index price
IndexPriceUpdatePerpetual index price updates.
Funding rate
FundingRateUpdatePerpetual funding rate updates.
Instruments
CryptoPerpetual / CurrencyPairPerpetual and spot definitions replayed from venue order-book metadata.
Status
InstrumentStatusActive and inactive market snapshots.
Supported order types per product. Conditional types are perpetuals only.
Type
Perpetuals
Spot
Notes
All four supported time-in-force options apply across products.
The execution instructions and account operations traders rely on.
Post-only
Maker-only orders that override time in force and send Lighter's PostOnly flag.
Reduce-only
Position-reducing flag on perpetual orders so a fill never flips the position.
Leverage updates
Per-market cross or isolated leverage through a signed UpdateLeverage transaction.
Order modification
Modify quantity, price, or trigger price in place without cancel and replace.
Batch operations
Submit or cancel up to 15 independent orders per sendTxBatch request.
Scoped cancel-all
Cancel-all is scoped per instrument, so orders on unrelated markets are untouched.
Data client
Public REST and WebSocket streams
Feeds: L2 order book, top-ten depth, quotes, trades, bars, and mark / index / funding.
No credentials: runs on public endpoints, so research and backtest data need no account.
Resilience: reconnecting WebSocket with snapshot-driven book initialization.
Execution client
Single orders over WebSocket, batches over REST
Orders: signed L2CreateOrder, in-place modify, and batch cancel up to 15 per request.
Account: five private streams for orders, fills, positions, assets, and margin.
Reconciliation: private streams are the ground truth, reconciled on connect.
The adapter is written in Rust and benchmarked across its hot paths: market-data ingress decoded to native types, order egress built and signed to the wire, and the L2 signer that sits on every order.
Order signing
Operation
Median
Schnorr sign
68.6 µs
Sign order tx
70.8 µs
Verify signature
144 µs
vs Go reference
~2-3x faster
Order egress (build to wire)
Operation
Median
Submit limit
74.7 µs
Submit market
74.5 µs
Submit stop-market
74.5 µs
Cancel
70.4 µs
Modify
74.6 µs
Market data ingress (decode to type)
Record
Median
Order book delta
2.05 µs
Order book depth
2.02 µs
Quote
664 ns
Trade
1.42 µs
Bar
1.48 µs
Account and stats ingress
Record
Median
Fill report
1.57 µs
Order status
2.25 µs
Mark price
1.83 µs
Funding rate
1.84 µs
Measured 2026-06-27 on Apple M4 Pro (12-core), rustc 1.96.0, bench-lto profile (fat LTO, single codegen unit). Each row is a Criterion median over a local hot path (one decoded record for ingress, one built-and-signed transaction for egress, signer primitives for signing), run against fixed test keys and captured fixtures, not live venue latency. In separate side-by-side testing the Rust signer runs roughly two to three times faster than Lighter's Go reference implementation. Absolute numbers vary by machine; only same-machine deltas are meaningful.
Adapter crate
Data client
Execution client
Signer
Environments
Authentication
Considerations
Data uses public endpoints; execution needs the account index, API key index, and private key.
Order books initialize from the snapshot frame; earlier delta frames are dropped until it arrives.
Conditional orders (stop, MIT, LIT) are perpetuals only; spot conditional orders are rejected.
Batch submit and cancel are independent, not atomic. No OCO, OTO, bracket, TWAP, trailing-stop, or iceberg orders.
Private account streams are the ground truth; connect waits for the first frame on all five.
Submitted orders carry the NautilusTrader integrator attribution (one-time zero-fee approval at startup).
Clone-and-run starting points for the Lighter adapter.
A worked example that trades Lighter markets with NautilusTrader.
Integration guide
Read the full integration guide
The guide covers installation, account setup, configuration, order handling, the L2 signer, and worked examples for trading Lighter.
NautilusTraderâ„¢ is a product of Nautech Systems Pty Ltd (ABN 88 609 589 237). Nautech Systems provides algorithmic trading software only. We do not operate as a broker, dealer, or exchange, nor offer financial advisory services. Users are solely responsible for compliance with applicable laws and regulations. Subject to non-excludable consumer guarantees, we make no warranties and accept no liability for trading losses or regulatory violations arising from use of the software. Read full disclaimer.
We use essential cookies and, with your consent, optional analytics cookies, as described in our Privacy Policy. Manage your Cookie Preferences.