pm_movements
Track recent buys, sells, and position size changes by whale wallets on Polymarket prediction markets using on-chain data.
Instructions
Get recent position changes by whale wallets on Polymarket. Shows buys, sells, and position size changes across prediction markets. Cost: $0.01 per query. Source: Polymarket on-chain data.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| market_id | No | Filter by market ID | |
| wallet | No | Filter by wallet address | |
| hours | No | Lookback period in hours (default 24) | |
| limit | No | Maximum results (default 25) |
Implementation Reference
- src/tools/pm.ts:183-212 (handler)The handler for pm_movements which fetches position change data from the /api/v1/pm/movements endpoint.
async ({ market_id, wallet, hours, limit }) => { const res = await apiGet<PmQueryResponse>("/api/v1/pm/movements", { market_id, wallet, hours: hours ?? 24, limit: limit ?? 25, }); if (!res.ok) { return { content: [ { type: "text" as const, text: `API error (${res.status}): ${JSON.stringify(res.data)}`, }, ], isError: true, }; } const { count, data } = res.data; const warn = stalenessWarning(res); const summary = `${warn}Found ${count} position movement(s).`; const json = JSON.stringify(data, null, 2); return { content: [{ type: "text" as const, text: `${summary}\n\n${json}` }], }; }, ); - src/tools/pm.ts:152-182 (schema)The input schema definition for the pm_movements tool.
{ title: "Polymarket Position Movements", description: "Get recent position changes by whale wallets on Polymarket. Shows buys, sells, " + "and position size changes across prediction markets. " + "Cost: $0.01 per query. Source: Polymarket on-chain data.", inputSchema: { market_id: z .string() .optional() .describe("Filter by market ID"), wallet: z .string() .optional() .describe("Filter by wallet address"), hours: z .number() .int() .min(1) .max(168) .optional() .describe("Lookback period in hours (default 24)"), limit: z .number() .int() .min(1) .max(100) .optional() .describe("Maximum results (default 25)"), }, }, - src/tools/pm.ts:150-151 (registration)The registration of the pm_movements tool.
server.registerTool( "pm_movements",