waiaas_hl_get_sub_positions
Retrieve current trading positions for a Hyperliquid sub-account to monitor portfolio holdings and exposure in decentralized finance markets.
Instructions
Get positions for a Hyperliquid sub-account.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wallet_id | No | Wallet ID. | |
| sub_account | Yes | Sub-account address (hex, 42 chars). |
Implementation Reference
- The handler function that executes the `waiaas_hl_get_sub_positions` tool.
async (args) => { const walletId = args.wallet_id || 'default'; const result = await apiClient.get(`/v1/wallets/${walletId}/hyperliquid/sub-accounts/${args.sub_account}/positions`); return toToolResult(result); }, - packages/mcp/src/tools/hyperliquid.ts:157-169 (registration)Tool registration for `waiaas_hl_get_sub_positions`.
server.tool( 'waiaas_hl_get_sub_positions', withWalletPrefix('Get positions for a Hyperliquid sub-account.', walletContext?.walletName), { wallet_id: z.string().optional().describe('Wallet ID.'), sub_account: z.string().describe('Sub-account address (hex, 42 chars).'), }, async (args) => { const walletId = args.wallet_id || 'default'; const result = await apiClient.get(`/v1/wallets/${walletId}/hyperliquid/sub-accounts/${args.sub_account}/positions`); return toToolResult(result); }, );