waiaas_hl_get_account_state
Retrieve Hyperliquid account details including balances, margins, and positions to monitor trading status and manage risk.
Instructions
Get Hyperliquid account state (balances, margins, positions).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wallet_id | No | Wallet ID. |
Implementation Reference
- Tool registration and handler implementation for waiaas_hl_get_account_state, which fetches Hyperliquid account data via the apiClient.
// hl_get_account_state server.tool( 'waiaas_hl_get_account_state', withWalletPrefix('Get Hyperliquid account state (balances, margins, positions).', walletContext?.walletName), { wallet_id: z.string().optional().describe('Wallet ID.'), }, async (args) => { const walletId = args.wallet_id || 'default'; const result = await apiClient.get(`/v1/wallets/${walletId}/hyperliquid/account`); return toToolResult(result); },