| Crates.io | lighter-rust |
| lib.rs | lighter-rust |
| version | 0.2.0 |
| created_at | 2025-08-30 03:31:12.11645+00 |
| updated_at | 2025-11-06 00:35:31.370443+00 |
| description | A comprehensive Rust SDK for the Lighter trading platform with async/await, WebSocket support, and Ethereum wallet integration |
| homepage | https://github.com/yongkangc/lighter-rust |
| repository | https://github.com/yongkangc/lighter-rust |
| max_upload_size | |
| id | 1817218 |
| size | 547,807 |
Rust SDK for Lighter (v2)
Add this to your Cargo.toml:
[dependencies]
lighter-rust = "0.1.0"
Or use the latest from GitHub:
[dependencies]
lighter-rust = { git = "https://github.com/yongkangc/lighter-rust" }
use lighter_rust::{LighterClient, Config, api::account::AccountBy};
#[tokio::main]
async fn main() -> Result<()> {
let config = LighterConfig::new()
.with_api_key_private(YOUR_API_KEY_PRIVATE)
.with_account_index(YOUR_ACCOUNT_INDEX)
.with_api_key_index(YOUR_API_KEY_INDEX);
let client = HttpClient::builder()
.with_config(config)
.with_account()
.build()?;
let account = client
.api()
.account()?
.account(AccountBy::L1Address, YOUR_ACCOUNT_ADDRESS)
.await?;
println!("Account: {:?}", account);
Ok(())
}
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
This is an unofficial SDK. Use at your own risk. Always test thoroughly before using in production.
For issues and questions: