lighter-rust 0.2.0

A comprehensive Rust SDK for the Lighter trading platform with async/await, WebSocket support, and Ethereum wallet integration
docs.rs failed to build lighter-rust-0.2.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: lighter-rust-0.1.0

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