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.
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
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#/
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#/
👍3❤1
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.
Lighter API/MM Updates
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.
Regarding the upgrade above:
Deposits will pause for 10 minutes before the upgrade and reopen immediately after.
Deposits will pause for 10 minutes before the upgrade and reopen immediately after.
Lighter API/MM Updates
Regarding the upgrade above: Deposits will pause for 10 minutes before the upgrade and reopen immediately after.
We'll need 7 more minutes or less for this upgrade to be done.
❤4
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.
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.
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.
GitHub
Release Better support for transfer memo · elliottech/lighter-go
Transfer memo is accepted either as str of len 32 (in which case, they are interpreted as bytes) or as 64 hex encoded string or 0x[hex]
The latest Python SDK 1.0.1 has been released to pip.
You can get the latest version by running
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:
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.
(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.
You can utilize the Block Explorer endpoints to fetch the desired data.
/api/v1/blocks/api/v1/blockTxs/api/v1/currentHeightYou 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.
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
On subscription, you will receive an update with a
This will be pushed in the next few hours. We’ll update you here once it’s live
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 updateThis will be pushed in the next few hours. We’ll update you here once it’s live
👍4
We have tightened rate limits for POST requests to HTTP endpoints (except sendTx and sendTxBatch). You can find the updated weights here: https://apidocs.lighter.xyz/docs/rate-limits
👍2
We will deprecate the endpoint below on December 25, 2025 at 4:00 PM UTC.
As an alternative, you can use the blocks endpoint from the explorer API: https://apidocs.lighter.xyz/reference/get_blocks-blockid
/api/v1/blockAs an alternative, you can use the blocks endpoint from the explorer API: https://apidocs.lighter.xyz/reference/get_blocks-blockid
👍1
We're doing a network upgrade on December 26, 2025 at 12:00 PM UTC. Downtime should be under 15 minutes. Manage your positions in advance, orders will not get placed during downtime.
We will deprecate the endpoint below on December 29, 2025 at 4:00 PM UTC.
As an alternative (same weight), you can use the candles endpoint: https://apidocs.lighter.xyz/reference/candles.
Query parameters and values returned don’t change, but variables in the response have a different name, and we will omit variables when they are zero.
/api/v1/candlesticksAs an alternative (same weight), you can use the candles endpoint: https://apidocs.lighter.xyz/reference/candles.
Query parameters and values returned don’t change, but variables in the response have a different name, and we will omit variables when they are zero.
We're doing a network upgrade on December 28, 2025 at 9:30 PM UTC. Downtime should be under 10 minutes. Manage your positions in advance, orders will not get placed during downtime.
❤1
On December 29, 2025 at 4 PM UTC we will start requiring authentication to access the
See details here: https://apidocs.lighter.xyz/docs/websocket-reference#account-all-positions
account_all_positions websocket channel, except when specifying a public pool as account index.See details here: https://apidocs.lighter.xyz/docs/websocket-reference#account-all-positions
👍1