lighter-rust

Crates.iolighter-rust
lib.rslighter-rust
version0.2.0
created_at2025-08-30 03:31:12.11645+00
updated_at2025-11-06 00:35:31.370443+00
descriptionA comprehensive Rust SDK for the Lighter trading platform with async/await, WebSocket support, and Ethereum wallet integration
homepagehttps://github.com/yongkangc/lighter-rust
repositoryhttps://github.com/yongkangc/lighter-rust
max_upload_size
id1817218
size547,807
YK (yongkangc)

documentation

https://docs.rs/lighter-rust

README

Lighter Rust SDK (WIP)

Crates.io Documentation CI License: MIT

Rust SDK for Lighter (v2)

Installation

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" }

Quick Start

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(())
}

Documentation

API Documentation & Coverage

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Disclaimer

This is an unofficial SDK. Use at your own risk. Always test thoroughly before using in production.

Support

For issues and questions:

Related

Commit count: 10

cargo fmt