UpdateAccountAssetConfig#150
Open
mihaimarcu2004 wants to merge 1 commit intomainfrom
Open
Conversation
lavrric
approved these changes
Apr 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Python SDK support for the new
UpdateAccountAssetConfigL2 tx (toggles whether an asset is used as margin for an account). Mirrors the changes in the corresponding lighter-go PR (elliottech/lighter-go#67) and ships rebuilt signer binaries.Changes:
lighter/signer_client.py:SignUpdateAccountAssetConfigexport (int16, uint8, uint8, longlong, int, longlong→SignedTxResponse).ASSET_MARGIN_MODE_DISABLED = 0andASSET_MARGIN_MODE_ENABLED = 1.sign_update_account_asset_config(asset_index, asset_margin_mode, ...)and asyncupdate_account_asset_config(...)(decorated with@process_api_key_and_nonce, sends viasend_tx).lighter/signers/*: rebuilt prebuilt shared libraries for darwin-arm64, linux-amd64, linux-arm64, and windows-amd64, plus their generated.hheaders (adds theSignUpdateAccountAssetConfigsymbol).examples/: new runnable examplesenable_eth_as_margin.py,disable_eth_as_margin.py, andadd_eth_margin.py(full flow: flip trading mode → enable ETH as margin → transfer spot→perp and wait for state change).