Crates.io | hyperliquid |
lib.rs | hyperliquid |
version | 0.2.4 |
source | src |
created_at | 2023-09-11 11:10:47.780005 |
updated_at | 2024-08-19 23:45:42.425707 |
description | A Rust library for the Hyperliquid API |
homepage | https://hyperliquid.xyz/ |
repository | https://github.com/dennohpeter/hyperliquid |
max_upload_size | |
id | 969495 |
size | 219,635 |
A Rust library for Hyperliquid API
Cargo.toml
[dependencies]
hyperliquid = { version = "0.2.4" }
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);
}
See examples/
for examples. You can run any example with cargo run --example <example_name>
.