refactor: restructure Lighter SDK by removing deprecated Go files and enhancing Python documentation with new examples and models

This commit is contained in:
discountry
2025-12-07 19:14:56 +08:00
parent 85705dd27c
commit 5f79b134f2
310 changed files with 47112 additions and 3698 deletions
@@ -0,0 +1,25 @@
import asyncio
from utils import default_example_setup
AMOUNT = 5.0
async def main():
client, api_client, _ = default_example_setup()
# Note: There is no limit or fee for normal withdrawal
withdraw_tx, response, err = await client.withdraw(
asset_id=client.ASSET_ID_USDC, # change this to `client.ASSET_ID_ETH` to withdraw ETH. Also, change route_type to spot
route_type=client.ROUTE_PERP, # change this to `client.ROUTE_SPOT` to withdraw from spot balance
amount=AMOUNT,
)
if err is not None:
raise Exception(f"error withdrawing {err}")
print(withdraw_tx, response)
await client.close()
await api_client.close()
if __name__ == "__main__":
asyncio.run(main())