Skip to content
This repository was archived by the owner on Dec 29, 2025. It is now read-only.

yongkangc/lighter-rust

Repository files navigation

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.2.0"

Or install via cargo:

cargo add lighter-rust

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

About

Rust SDK for Lighter trading platform

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages