Wallet Setup
Hyperliquid authentication in this client is wallet-based, not API-key based.
Public Usage
No credentials are required for:
InfoStreams
Authenticated Usage
Exchange and Hyperliquid sign requests with an Ethereum private key.
The simplest setup is:
Then:
from hyperliquid import Hyperliquid
async with Hyperliquid.http() as client:
result = await client.exchange.noop()
Direct Wallet Usage
You can also pass a wallet or private key directly:
from hyperliquid import Hyperliquid
async with Hyperliquid.http('0xyour_private_key') as client:
result = await client.exchange.noop()
Exchange-Only Usage
If you only need signed actions, you can instantiate Exchange directly with a wallet object.
Security Notes
- never commit your private key
- treat
HYPERLIQUID_PRIVATE_KEYas a high-sensitivity secret - keep public read workflows on
InfoorStreamswhenever possible - treat exchange examples as mainnet-sensitive unless you explicitly set
mainnet=False