6 releases

0.2.4 Aug 19, 2024
0.2.3 Mar 13, 2024
0.2.2 Sep 30, 2023
0.1.0 Sep 26, 2023
0.0.0 Sep 11, 2023

#85 in #exchange

Download history 16/week @ 2024-07-24 7/week @ 2024-07-31 100/week @ 2024-08-14 30/week @ 2024-08-21 6/week @ 2024-09-11 7/week @ 2024-09-18 11/week @ 2024-09-25 4/week @ 2024-10-02

345 downloads per month

MIT license

79KB
2K SLoC

Hyperliquid

Rust Rust

About

A Rust library for Hyperliquid API

Install

Cargo.toml

[dependencies]

hyperliquid = { version = "0.2.4" }

Usage

use hyperliquid::{Hyperliquid, Chain, Info};

#[tokio::main]
async fn main() {
    let user: Address = "0xc64cc00b46101bd40aa1c3121195e85c0b0918d8"
        .parse()
        .expect("Invalid address");


    let info:Info = Hyperliquid::new(Chain::Dev);

    // Retrieve exchange metadata
    let metadata = info.metadata().await.unwrap();
    println!("Metadata \n{:?}", metadata.universe);
}

Examples

See examples/ for examples. You can run any example with cargo run --example <example_name>.

Dependencies

~28–45MB
~816K SLoC