Programmatic Trading Interfaces for Hyperliquid Spot and Perpetuals
Summary
This guide walks through programmatic access to Hyperliquid spot and perpetual markets through the FMZ platform. It covers connecting a wallet, configuring a proxy wallet, distinguishing mainnet from testnet settings, and querying market metadata, order books, account balances, orders, and positions. It also demonstrates placing and cancelling orders, changing leverage and cross or isolated margin settings, and transferring assets among wallets, vaults, spot, and perpetual accounts.
The guide supplements REST-based examples with a WebSocket subscription for recent trades, which it says are not available through the REST interface described. Its examples are operational demonstrations rather than a trading strategy or performance study. Testnet behavior is described as unstable, and the instructions depend on FMZ’s exchange objects and a recent version of its Docker. Wallet credentials, network configuration, and API behavior therefore need careful handling and may differ as the platform or exchange changes.
Key ideas
- Hyperliquid spot and perpetual markets use separate FMZ exchange objects.
- The guide covers wallet and proxy wallet configuration for programmatic trading.
- REST examples demonstrate market data, orders, account queries, leverage, and asset transfers.
- A WebSocket subscription provides recent trade data not covered by the described REST interface.
- Testnet reliability and platform version can affect whether the examples work as shown.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.