Skip to main content
Glama

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
NameRequiredDescriptionDefault
wallet_idNoWallet ID.
sub_accountYesSub-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);
    },
  • 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);
      },
    );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/minhoyoo-iotrust/WAIaaS'

If you have feedback or need assistance with the MCP directory API, please join our Discord server