Practical overview
When it fits
Use the SDK when building software that needs programmatic order or position actions on Hyperliquid, or when a HIP-4 interface needs market discovery and readable outcome sides.
Who it is for
- Developers building trading bots or execution services for Hyperliquid.
- Teams creating portfolio tools that need to manage or close Hyperliquid positions.
- Developers building interfaces for discovering and trading HIP-4 prediction-market outcomes.
Documented uses
- Submit market orders using asset size or a notional amount.
- Modify, cancel or track orders and close positions.
- Discover HIP-4 prediction markets and trade their Yes/No sides.
- Build trading workflows for HIP-3 markets.
Requirements & limits
The public repository identifies the project as MIT-licensed. Its packages are listed on PyPI, npm, crates.io and GitHub for Go.
- Select the SDK package that matches the application’s programming language.
- HIP-4 uses USDH collateral and whole-contract order sizes, with a 10 USDH minimum order value.
- HIP-4 does not support order priority fees.
- The SDKs are unofficial community projects and are not affiliated with Hyperliquid Foundation or Hyperliquid Labs.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install and initialize the Python Hyperliquid SDK
Set up the Python SDK and create an SDK instance using an endpoint.
Before you start
- Python package installer
- A Hyperliquid API endpoint
Steps
Install the package with the command below.
pip install hyperliquid-sdkImport
HyperliquidSDKfromhyperliquid_sdk.Initialize it with
sdk = HyperliquidSDK(endpoint).
Expected outcome
A Python SDK instance is initialized with the specified endpoint.
Guide limitations
- The setup instructions do not describe endpoint acquisition or credentials.
- The SDK is an unofficial community project and is not affiliated with Hyperliquid Foundation.
Discover and trade a HIP-4 prediction-market outcome in Python
Find a HIP-4 market by underlying asset and target price, then buy and sell its Yes side.
Before you start
- An initialized Python
HyperliquidSDKinstance
Steps
Call
markets = sdk.prediction_markets().Find the market with
market = markets.find(underlying="BTC", target_price="78213").Buy 20 Yes contracts at price
0.63withsdk.buy(market.yes, size=20, price="0.63").Sell 20 Yes contracts at price
0.64withsdk.sell(market.yes, size=20, price="0.64").
Expected outcome
The SDK is used to discover the specified market and submit the example buy and sell actions for its Yes side.
Guide limitations
- HIP-4 markets use USDH collateral and whole-contract sizes.
- The minimum order value is 10 USDH.
- HIP-4 markets do not support order priority fees.
- The documented example does not establish that these orders will execute.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 6 October 2026
- Original website title
- quiknode-labs/hyperliquid-sdk · Official homepage title · retained in its source language

