Skip to main content
Glama
yigitabi5444

Polymarket MCP Server

by yigitabi5444

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
NameRequiredDescriptionDefault
condition_idYesMarket condition ID
limitNoNumber of holders to return
offsetNoPagination offset

Implementation Reference

  • 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,
        };
      }
    },
  • 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,
          };
        }
      },
    );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yigitabi5444/yigit_polymarket_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server