Complete Hyperliquid REST + WebSocket toolkit with secure signing, pagination helpers, and runnable examples.
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install -e .Copy .env.example to .env and populate the required values. Toggle NETWORK=testnet to target the sandbox URLs.
from dotenv import load_dotenv
from hyperliquid_rest import InfoClient, ExchangeClient
load_dotenv()
info = InfoClient(network="testnet")
print(info.get_all_mids())
exchange = ExchangeClient(
account="0x...",
private_key="0x...",
network="testnet",
)
print(exchange.get_account_summary())See examples/ for workflow scripts, docs/tutorial.md for a guided run, and docs/api_reference.md for API coverage.
pytestNote: This library was generated with Codex automation to speed up development. While the critical flows are covered, please review the code and test thoroughly before trading with live capital—bugs or breaking API changes may still exist.