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
Email and JSON subscription to maintenance updates:

https://status.lighter.xyz/
5
Updates:

We are deprecating the accountTxs (REST) endpoint as it is not heavily used. This will happen on November 20, 2025 at 4:30 PM UTC

You can use the Block Explorer to fetch account logs. This is the endpoint: https://explorer.elliot.ai/api/accounts/%7BaccountID%7D/logs?pub_data_type=&limit=20&offset=0
4
We're doing a network upgrade on November 23, 2025 at 12:00 PM UTC. Downtime should be under 15 minutes. Manage your positions in advance, orders will not get placed during downtime.
Added Lighter Explorer API endpoints section in the API reference docs

https://apidocs.lighter.xyz/reference

There are different rate limits that apply to these endpoints: https://apidocs.lighter.xyz/docs/rate-limits#-explorer-rest-api-endpoint-limits
3👍1
We will prune old transactions and orders on Tuesday at 9:00 AM UTC.

Items older than 3 months (and certain unfilled canceled/expired orders older than 3 days) will be removed.
We're doing a network upgrade on Sunday November 30th at 12PM UTC. Downtime should be under 15 minutes. Manage your positions in advance, orders will not get placed during downtime.
Update:

We've just merged some breaking changes for the Python SDK.
As you might have noticed, the GO SDK was updated a while ago, changing the interface.
Major changes on that side include:
each sign operation returns the TxType, TxInfo & TxHash
each sign operation receives two new arguments: account_index & api_key_index
These changes allow the Python SDK to support multiple accounts & API keys easier.

Changes have been made to the Python SDK to accommodate the changes, as well as updated examples.
Now, both the examples and the SignerClient use multiple API keys by default.
Note that the SignerClient is tied to one account index. You can create multiple instances of SignerClient.
The shared library is designed as a singleton so that there will be just one instance of it, so it's loaded just once.

You can instance a SignerClient as follows:

client = lighter.SignerClient(
url="https://mainnet.zklighter.elliot.ai",
account_index=...,
api_private_keys={
3: "c180...",
4: "ef13...",
...
}
)


HTTP calls should not be affected by these changes.

For WS operations, which use sign_create_order for example, directly, you'll need to update the list of returned values.
Each sign_ operation returns a tuple of (TxType, TxInfo, TxHash, error).
On how to use these values to send the transaction, please refer to the ./examples/create_modify_cancel_order_ws.py.
It includes example on nonce management and sending the transactions.
Specifically for WS operations, the fact that you have access to the TxHash might allow you to track your transaction easier, in an async way.
4
Lighter API/MM Updates
Update: We've just merged some breaking changes for the Python SDK. As you might have noticed, the GO SDK was updated a while ago, changing the interface. Major changes on that side include: each sign operation returns the TxType, TxInfo & TxHash each sign…
On the spot side of things, there's an open PR with some changes on the Lighter Go.
It includes precompiled binaries if you want to use it stand alone.
The major changes there include changing the marketId from uint8 to int16 and significant changes to Transfer and Withdraw.

You should be able to use an old Python SDK to trade perpetual markets on testnet right now, with no problems.
All HTTP/WS endpoints are backward compatible.


We've postponed the launch of the Python SDK as we're trying to polish the HTTP / WS endpoints as much as possible.
I'll create a PR shortly with examples specific for spot, including:
- getting all order books
- getting the amount of assets owned by an address
- transferring USDC between perp <> spot account
- receiving WS updates on asset changes due to trades / placed orders

Placing orders has not changed. Spot market ids start from 2048. All order-related endpoints are the same.
👍5
Update:

We are deprecating /txs endpoint at 2PM UTC December 3.

You can utilize these Block Explorer endpoints to fetch transactions:
https://apidocs.lighter.xyz/reference/get_accounts-param-logs#/
https://apidocs.lighter.xyz/reference/get_logs-hash#/
👍31
We're doing a network upgrade on December 4, 2025 at 12:00 PM UTC. Downtime should be under 20 minutes. Manage your positions in advance, orders will not get placed during downtime.
As spot was just launched, the spot Python SDK PR has been merged.
Now you test spot SDK directly on mainnet. The PIP release will be available in ~2H.

Notable changes since last message:
- added pool examples, on how to get / burn / mint pool shares
- added example on how to create a public pool
- system_setup example takes an optional ACCOUNT_INDEX field, which, if set, can be used to setup a sub account or pool
- added a lot of details about pools / transfers in ./examples/README.md
- added example of fast & normal withdraw -- thanks @zen for all PRs with examples
- fixed memo usage in go-sdk -- now fast withdrawals can just call sign_transfer and pass the memo, hex encoded

If you have any questions in regard to transfers, how to send money from spot <> perp or vice versa, to sub accounts, to other people, check out the README.
If it's not covering everything, we'll update it accordingly. All these changes / notes will be reflected in the public docs soon.

As a reminder, old SDKs can still trade perpetual markets. What will not work are transfers and withdrawals using the SDK. If you were relaying on those, please upgrade to the new SDK.
👍1
Lighter API/MM Updates
As spot was just launched, the spot Python SDK PR has been merged. Now you test spot SDK directly on mainnet. The PIP release will be available in ~2H. Notable changes since last message: - added pool examples, on how to get / burn / mint pool shares - added…
FYI, if you're using the Lighter-GO (https://github.com/elliottech/lighter-go/releases/tag/v1.0.1) library directly, you can get the precompiled binaries directly from the release notes.

They should be up to date w/ the current main branch.
You can find instructions on how to compile them youself in the repo & in the justfile (similar to Makefile)
Building for linux / windows has docker commands.
AFAIK building for OSX can be done only from OSX device.

At the moment, the supported architectures are:
linux x64
linux arm64
windows x64
apple M series

All the precompiled files are created by the team.

Next step would be to have an official TS SDK. The WASM build for spot should come shortly.
The latest Python SDK 1.0.1 has been released to pip.
You can get the latest version by running pip install lighter-sdk
4
We're doing a network upgrade on December 14, 2025 at 12:00 PM UTC. Downtime should be under 15 minutes. Manage your positions in advance, orders will not get placed during downtime.
3
We’re rolling out an immediate change to API key generation. More details will be shared shortly. This applies to accounts that get the following API error message:

(21136, "invalid PublicKey, update the sdk to the latest version")

If you trade programmatically, please update to the latest SDK version and re-generate your API keys.

As part of this change, older API keys have been invalidated, you need to re-generate new ones. If you’re not seeing this error when sending transactions, no action is required. Frontend users also require no action.
We will deprecate the endpoints below on December 21, 2025 at 14:00 PM UTC.

/api/v1/blocks
/api/v1/blockTxs
/api/v1/currentHeight

You can utilize the Block Explorer endpoints to fetch the desired data.
re: WS Batching

Orderbook updates are now coming in periods of 50ms. Before this, we were sending every update. The logic stays the same. Previously, we sent order book diffs on every nonce update.
4
We are doing a second network upgrade for today, December 21st at 10PM UTC. Downtime will be 5 mins or less.
Lighter API/MM Updates
re: WS Batching Orderbook updates are now coming in periods of 50ms. Before this, we were sending every update. The logic stays the same. Previously, we sent order book diffs on every nonce update.
We will add a begin_nonce field to order book WebSocket updates

On subscription, you will receive an update with a nonce and begin_nonce = 0. The nonce represents the last nonce included in that update. To ensure your local order book stays consistent, verify that the begin_nonce of each update matches the nonce from the previous update

This will be pushed in the next few hours. We’ll update you here once it’s live
👍4