REST + WEBSOCKET

API

Build trading systems on Lighter with REST and WebSocket.

Lighter provides API documentation for developers, including WebSocket streams, rate limits, account types, and API key permissions.

ChannelsWebSocket

Use WebSocket when you need live orderbook deltas, streaming trades, or real-time account updates.

AuthenticationAPI keys

API keys can grant read and write permissions for authenticated REST endpoints and WebSocket channels.

Quick links

Jump to what you need.

API documentation
WebSocket reference
Rate limits
API keys

Market data

Live data for trading systems.

  • orderbook snapshots and updates (WebSocket)
  • trades, tickers, and funding data (depending on endpoints)
  • instrument metadata and contract specifications

Trading & account actions (authenticated)

Control orders and accounts.

  • submit orders
  • cancel orders
  • read account state and positions
  • manage API keys and permissions where supported

Authentication & API keys

Keep keys scoped and under control.

API keys can grant permissions for both read and write operations, enabling access to authenticated REST endpoints and WebSocket channels. They can also be used to send transactions where supported.

store keys in a secret manager
rotate keys regularly
use least-privilege permissions
monitor usage and revoke on suspicion

Account types for API users

Pick Standard or Premium.

Standard

Fee-free

Standard accounts are fee-free with 0 maker and 0 taker fees.

Premium

Lowest latency + fees

Premium accounts pay maker and taker fees and are designed for lower-latency execution.

Rate limits and quotas

Respect limits across REST and WebSocket.

Rate limits apply to both REST API and WebSocket usage, and can be enforced based on IP address and L1 wallet address. Plan for retries and backoff in your clients.

WebSocket overview

Use streams for low-latency data.

WebSocket is best for live orderbook deltas, streaming trades, and real-time account updates (if enabled for authenticated channels). The reference outlines supported channels, subscription formats, and message payload structures.

Developer FAQ

Answers to common build questions.

Where do I start?

Use the Get Started for Programmers section in the API docs and follow the API key setup flow.

01

Does the API support WebSocket?

Yes. A WebSocket reference is available for the zkLighter WebSocket server.

02

Are there rate limits?

Yes. Rate limits apply to both REST and WebSocket usage.

03

Is Standard fee-free via API too?

Standard accounts are fee-free; Premium accounts pay maker and taker fees.

04