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.
Use WebSocket when you need live orderbook deltas, streaming trades, or real-time account updates.
API keys can grant read and write permissions for authenticated REST endpoints and WebSocket channels.
Quick links
Jump to what you need.
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.
Account types for API users
Pick Standard or Premium.
Standard
Fee-freeStandard accounts are fee-free with 0 maker and 0 taker fees.
Premium
Lowest latency + feesPremium 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.
Does the API support WebSocket?
Yes. A WebSocket reference is available for the zkLighter WebSocket server.
Are there rate limits?
Yes. Rate limits apply to both REST and WebSocket usage.
Is Standard fee-free via API too?
Standard accounts are fee-free; Premium accounts pay maker and taker fees.