Skip to main content
Glama

waiaas_pm_get_positions

Retrieve Polymarket prediction market positions for a wallet to track investments and analyze market exposure.

Instructions

Get Polymarket prediction market positions for a wallet.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
wallet_idNoWallet ID. Auto-resolved for single-wallet sessions.

Implementation Reference

  • The handler for 'waiaas_pm_get_positions' is implemented using server.tool within the registerPolymarketTools function. It fetches positions from the API.
    // pm_get_positions
    server.tool(
      'waiaas_pm_get_positions',
      withWalletPrefix('Get Polymarket prediction market positions for a wallet.', walletContext?.walletName),
      {
        wallet_id: z.string().optional().describe('Wallet ID. Auto-resolved for single-wallet sessions.'),
      },
      async (args) => {
        const walletId = args.wallet_id || 'default';
        const result = await apiClient.get(`/v1/wallets/${walletId}/polymarket/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