pm_micro_changes
Retrieve recent Polymarket order book microstructure changes since a specified timestamp to track market movements and liquidity shifts.
Instructions
Get recent changes to Polymarket microstructure data since a given timestamp. Cost: $0.003 per query. Source: Polymarket order book analysis.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| since | Yes | ISO 8601 timestamp to get changes since (e.g. 2026-03-01T00:00:00Z) | |
| limit | No | Maximum results (default 50) |
Implementation Reference
- src/tools/pm_micro.ts:162-189 (handler)The handler function for the `pm_micro_changes` tool which calls the API and processes the response.
async ({ since, limit }) => { const res = await apiGet<PmMicroQueryResponse>("/api/v1/pm/micro/changes", { since, limit: limit ?? 50, }); 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} microstructure change(s) since ${since}.`; const json = JSON.stringify(data, null, 2); return { content: [{ type: "text" as const, text: `${summary}\n\n${json}` }], }; }, ); - src/tools/pm_micro.ts:144-161 (schema)The schema definition (input parameters) for the `pm_micro_changes` tool.
{ title: "Polymarket Microstructure Changes", description: "Get recent changes to Polymarket microstructure data since a given timestamp. " + "Cost: $0.003 per query. Source: Polymarket order book analysis.", inputSchema: { since: z .string() .describe("ISO 8601 timestamp to get changes since (e.g. 2026-03-01T00:00:00Z)"), limit: z .number() .int() .min(1) .max(100) .optional() .describe("Maximum results (default 50)"), }, }, - src/tools/pm_micro.ts:142-143 (registration)The registration call for the `pm_micro_changes` tool.
server.registerTool( "pm_micro_changes",