rhyperliquid
A Rust SDK for Hyperliquid, the high-performance perpetuals decentralized exchange. Built with type safety in mind and async-first architecture.
⚠️ Please test all desired operations on Testnet before operating on Mainnet
Features
- Market data queries (spot & perpetuals)
- Account information retrieval
- Order book snapshots
- Historical candle data
- User fills and funding history
- Order placement and cancellation
- Position management
- Vault operations
Project Status
- Complete REST Info API (market data)
- EIP-712 authentication & message signing
- Exchange API (order placement, cancellation)
- WebSocket streaming (real-time data feeds)
- CLI
Quick Start
use HyperliquidClient;
async
Trading
For order placement and cancellation examples, see examples/basic_order.rs.
For account transfer examples, see examples/account_transfer.rs.
For position leverage and managing an isolated position see examples/leverage_position.rs.
For advanced order examples see examples/advanced_order.rs.
For TWAP order placement see examples/twap_order.rs.
Stability and API Guarantees
This crate is under active development.
Breaking changes may occur between minor versions (0.1 -> 0.2).
Public API is subject to refinement based on usage feedback.
Testnet testing is strongly recommended before mainnet use.
Installation
As a Library Dependency
Add to your Cargo.toml:
[]
= "0.1"
= { = "1.41", = ["full"] }
From Source
Clone and build the repository:
# Clone the repository
# Build the library
# Run tests
# Build documentation
Getting Help
If you have any questions, first see if the answer to your question can be found in the Hyperliquid Docs.
If the answer is not there:
Open a discussion with your question, or Open an issue with the bug
Minimum Supported Rust Version (MSRV)
Rust 1.75.0 or higher is required.
# Verify your Rust version