get_market_holders
Retrieve top holders and positions for a Polymarket prediction market to analyze investor activity and market concentration.
Instructions
Get top holders/positions for a Polymarket market. Shows the largest positions and who holds them.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| condition_id | Yes | Market condition ID | |
| limit | No | Number of holders to return | |
| offset | No | Pagination offset |
Implementation Reference
- src/tools/data/holders.ts:14-28 (handler)The handler function that executes the get_market_holders tool, calling dataApi.getHolders.
async (args) => { try { const data = await dataApi.getHolders({ conditionId: args.condition_id, limit: args.limit, offset: args.offset, }); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error: ${(error as Error).message}` }], isError: true, }; } }, - src/tools/data/holders.ts:6-29 (registration)Registration of the get_market_holders tool within the MCP server.
server.tool( "get_market_holders", "Get top holders/positions for a Polymarket market. Shows the largest positions and who holds them.", { condition_id: z.string().describe("Market condition ID"), limit: z.number().min(1).max(500).default(20).describe("Number of holders to return"), offset: z.number().min(0).default(0).describe("Pagination offset"), }, async (args) => { try { const data = await dataApi.getHolders({ conditionId: args.condition_id, limit: args.limit, offset: args.offset, }); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error: ${(error as Error).message}` }], isError: true, }; } }, );