waiaas_pm_setup
Configure Polymarket API keys and optionally approve CTF contracts for a specified wallet to enable prediction market operations.
Instructions
Set up Polymarket API keys and optional CTF contract approval for a wallet.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wallet_id | Yes | Wallet ID (required). | |
| auto_approve | No | Automatically approve CTF contracts. |
Implementation Reference
- The tool 'waiaas_pm_setup' is registered and implemented in this handler. It takes a wallet_id and auto_approve flag, sending a POST request to the Polymarket setup endpoint.
server.tool( 'waiaas_pm_setup', withWalletPrefix('Set up Polymarket API keys and optional CTF contract approval for a wallet.', walletContext?.walletName), { wallet_id: z.string().describe('Wallet ID (required).'), auto_approve: z.boolean().optional().describe('Automatically approve CTF contracts.'), }, async (args) => { const walletId = args.wallet_id; const body: Record<string, unknown> = {}; if (args.auto_approve !== undefined) body.auto_approve = args.auto_approve; const result = await apiClient.post(`/v1/wallets/${walletId}/polymarket/setup`, body); return toToolResult(result); }, );