Lighter API/MM Updates
1.02K subscribers
1 photo
1 video
78 links
Official Channel for API and Market-maker updates on Lighter
Download Telegram
- The Python SDK has been updated: https://github.com/elliottech/lighter-python/commit/54d3582ff64571aa7230de1f682188d32fa38561

- API Docs have been revamped: https://apidocs.lighter.xyz/docs/get-started

- The exchangeMetrics endpoint (the same used by the Stats page) now allows you to query historical values for the exchange activity: https://apidocs.lighter.xyz/reference/exchangemetrics

- Rate Limits for the block explorer endpoints have been increased, from 15 to 90 weighted requests per minute: https://apidocs.lighter.xyz/docs/rate-limits

- To access read-only data via Websocket e.g. if you're connecting from a restricted region (⁠general-info), add ?readonly=true to the WS URL
πŸ‘3❀2
- The Rate Limits page has been revamped, adding some details on the cooldown period: https://apidocs.lighter.xyz/docs/rate-limits

- Fees have been updated according to the new staking tiers: https://apidocs.lighter.xyz/docs/account-types

- The accountLimits endpoint now returns details on the fee tier you’re in: https://apidocs.lighter.xyz/reference/accountlimits

- Latency for cancels on a standard account has been changed to 200ms

- More error codes have been added here: https://apidocs.lighter.xyz/docs/data-structures-constants-and-errors

- The export endpoint now allows users to query custom timeframes up to 3 months, with plans to allow up to 12 months and to aggregate fills soon. Additionally, spot trades now use buy/sell instead of long/short: https://apidocs.lighter.xyz/reference/export
❀7
We will be performing a network upgrade on February 12th, 2026 at 10:00 PM UTC. Expected downtime is under 15 minutes. Please manage your positions in advance, as order placement will be unavailable during the upgrade.
πŸ‘4
Following the funding rates rebates and unified trading account updates, we have added new fields to our api responses:

- discount field in positionFunding, expressed in USDC

- funding_fee_discounts_enabled field for each asset on orderBookDetails

- total_discount field to the WS/AccountAllPositions channel, expressed in USDC

- account_trading_mode field in the account and accountsByL1Address endpoints (simple mode:0, unified mode:1)
❀1
gm

$XAU and $XAG are now available under cross margin and function like standard perpetual markets. They are quoted by LLP and are subject to the platform’s standard liquidation mechanics. Additional RWA markets will transition to cross margin in the coming days.
πŸ‘6
We will be performing a network upgrade on February 16th, 2026 at 10:00 PM UTC. Expected downtime is under 15 minutes. Please manage your positions in advance, as order placement will be unavailable during the upgrade.

We will be deploying new LLP strategies -- more on this after the upgrade.
Recent updates:

- A new WebSocket channel for BBO data has been added: https://apidocs.lighter.xyz/docs/websocket-reference#best-bid-and-offer-bbo
- The account_trading_mode field has been added to the user_stats WebSocket channel
❀5
Recent updates:

- The exchangeMetrics endpoint now supports a new tps parameter, which returns transactions per seconds on lighter's app-chain for all available resolutions
- The export endpoint now allows users to query trades in custom timeframes up to 12 months, or 1m events
- Added more details on tx types subject to volume quota requirements: https://apidocs.lighter.xyz/docs/volume-quota-program
- Max connections per minute via WebSocket have been increased to 80
πŸ‘4
The market_stats/all and spot_market_stats/all WebSocket channels will start sending updates every 50ms.

This change will take effect on February 25, 2026 at 11:00 AM UTC.

The behavior when filtering for individual markets will not change.
πŸ‘2
Recent updates:

- You can now retrieve realized PnL for both perps and spot positions using the trades endpoint, via bid_account_pnl (only perps) and ask_account_pnl. Only the PnL for the queried account index will be displayed.

- You can now track the average entry price for spot assets using the account_spot_avg_entry_prices WebSocket channel: https://apidocs.lighter.xyz/docs/websocket-reference#average-entry-prices
πŸ‘4
The Python SDK has been updated to the 1.0.4 version. Main changes include:

- New endpoints are now supported
- Fixed a memory leak issue
- Support market orders using quote amount
- Fixed order book updates for the WebSocket client

Commits can be found here: https://github.com/elliottech/lighter-python/commits/main/
The SDK is also available on PyPI: https://pypi.org/project/lighter-sdk/1.0.4/
πŸ‘2
Update re: Volume Quota

Going forward, only order-related transactions will count toward your volume quota consumption. All other transaction types will have separate rate limits and will no longer consume quota. The following transaction types will continue to count toward volume quota:

L2CreateOrder
L2CancelAllOrders
L2ModifyOrder
L2CreateGroupedOrders
πŸ‘4
Rate limits for sending transactions have been improved, providing up to an order of magnitude increase for the best staking tier. These changes apply to premium accounts only, and are tied to staked $LIT. Purchasing fee credits counts as staked $LIT for this purpose.

Changes include:
- Separate rate limit buckets. Other GET/POST endpoints and WebSocket channels will fall into a separate bucket, with unchanged rate limits. Getting rate limited in one of the two buckets will not affect activity on the other one
- sendTx and sendTxBatch will now only have L1 checks, while IP checks have been lifted

Complete details can be found in our api docs: https://apidocs.lighter.xyz/docs/rate-limits
❀5
On March 20, 2026 at 9:30 PM UTC, the following WebSocket changes will go live to improve performance and stability:

- The server will no longer send application-level ping messages
- To keep the connection alive, clients will be expected to send a WebSocket ping frame (or any message) at least once every 2 minutes
- If the server does not receive any frames from a client for 2 minutes, the connection will be closed
- Clients that fall behind on reading messages (e.g. not consuming order book updates quickly enough) may be disconnected more aggressively than before
- The 24-hour forced connection lifetime will be removed, so well-behaved connections will be able to remain open indefinitely
- WebSocket compression (permessage-deflate) will be enabled, so clients that support it can benefit from reduced bandwidth usage

Additionally, the above changes will be deployed on testnet in a few days, allowing ample time to test the new logic.
πŸ‘5❀4
Quick heads up β€” we’ll run a short maintenance at 12:59AM UTC (in 20mins). It should last around 2 minutes, after which everything will be back to normal. Thanks for your patience.
πŸ‘3
The following WebSocket channels now send a millisecond timestamp attached to subscribe and update messages:
- ticker
- market_stats
- spot_market_stats
- account_all_assets
- account_spot_avg_entry_prices
- user_stats
- height

Recent updates:
- CCXT added Lighter support: https://t.me/ccxt_announcements/107
- Docs have been updated to include partner attribution integration details: https://apidocs.lighter.xyz/docs/partner-integration
- Python & Go SDKs have been updated to support partner attribution. Moreover, APIs have been updated and support for staking & unstaking has been added
❀2
Recent updates:

- Volume quota generation has been improved, now requiring $5 of notional traded to increase quota by one. Complete details are available here: https://apidocs.lighter.xyz/docs/volume-quota-program
- The accountActiveOrders endpoint does not require a market_id query parameter anymore, defaulting to all markets
- The markets/logs explorer endpoint now allows querying spot markets too, using the base-quote format, e.g. eth-usdc
❀9
Currently, only api_key_index:0 and api_key_index:1 are being reserved to serve desktop and mobile users on the lighter front-end

Starting March 22, 2026 at 2:30 PM UTC, the following indexes will be reserved to serve web and mobile users:

- api_key_index:0
- api_key_index:1
- api_key_index:2
- api_key_index:3

If you're currently using indexes 2, 3 for programmatic api trading, you should switch to any other other index in the 4-254 range to avoid any disruption.
πŸ‘4
FYI: We will be updating our WTI methodology to a continuously rolling method in the near future. Starting Monday March 16th, WTI will track 100% CLK6 until further notice, expected in early April. We will keep you updated.
πŸ‘6❀1πŸ‘Ž1