waiaas_pm_get_balance
Retrieve Polymarket USDC.e balance and CTF token positions for a wallet to monitor trading capital and market exposure.
Instructions
Get Polymarket USDC.e balance and CTF token positions for a wallet.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wallet_id | No | Wallet ID. Auto-resolved for single-wallet sessions. |
Implementation Reference
- Implementation of the waiaas_pm_get_balance tool handler, which fetches the Polymarket USDC.e balance and CTF token positions for a given wallet via an API call.
server.tool( 'waiaas_pm_get_balance', withWalletPrefix('Get Polymarket USDC.e balance and CTF token 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/balance`); return toToolResult(result); }, );