Integration

Lighter

Trade Lighter with NautilusTrader

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.

Products

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

Markets

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.

Data feeds

Each Lighter feed maps to a native NautilusTrader data type.

Data feed

NautilusTrader type

Notes

Order book (L2 MBP)

OrderBookDelta

Snapshot then incremental deltas; the book initializes from the subscribed snapshot frame.

Order book depth

OrderBookDepth10

Top-ten levels maintained from the live order book.

Quotes

QuoteTick

Best bid and offer from the ticker stream.

Trades

TradeTick

Live trades over WebSocket, plus REST trade history.

Bars

Bar

1m through 1d over WebSocket, 1w via REST; emitted on period close.

Mark price

MarkPriceUpdate

Perpetual mark price updates.

Index price

IndexPriceUpdate

Perpetual index price updates.

Funding rate

FundingRateUpdate

Perpetual funding rate updates.

Instruments

CryptoPerpetual / CurrencyPair

Perpetual and spot definitions replayed from venue order-book metadata.

Status

InstrumentStatus

Active and inactive market snapshots.

Order types

Supported order types per product. Conditional types are perpetuals only.

Type

Perpetuals

Spot

Notes

MARKET

Cap derived from the cached far-side quote plus slippage.

LIMIT

Requires a limit price.

STOP_MARKET

Perpetuals only; cap from the trigger plus slippage.

STOP_LIMIT

Perpetuals only; maps to a Lighter stop-loss limit.

MARKET_IF_TOUCHED

Perpetuals only; cap from the trigger plus slippage.

LIMIT_IF_TOUCHED

Perpetuals only; maps to a take-profit limit.

Time in force

All four supported time-in-force options apply across products.

Type

Perpetuals

Spot

Notes

GTC

Limit uses GoodTillTime; market falls back to IOC.

DAY

Positive order expiry within the venue window.

GTD

Uses the supplied expiry, within the venue's 5-minute to 30-day window.

IOC

Immediate-or-cancel; expiry zero.

Data and execution clients

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.

Benchmarks

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.

How the integration works

Adapter crate

nautilus-lighter, a Rust core with Python bindings.

Data client

LighterDataClient streams instruments, books, quotes, trades, and bars.

Execution client

LighterExecutionClient handles orders, account streams, and reconciliation.

Signer

Rust L2 signer (Schnorr / ECgFp5, Poseidon2 hashing), no external dependency.

Environments

Mainnet and testnet, selected by LighterEnvironment.

Authentication

Account index, API key index, and a 40-byte hex private key.

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).

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.

footer-logo

© 2026 Nautech Systems Pty Ltd. All rights reserved.

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.