Skip to main content
Glama

pm_micro_thin

Identify markets with thin order books that risk slippage or manipulation by detecting liquidity below specified thresholds and analyzing spread metrics.

Instructions

Detect markets with thin order books that may be susceptible to slippage or manipulation. Shows markets below a liquidity threshold with spread metrics. Cost: $0.005 per query. Source: Polymarket order book analysis.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
thresholdNoLiquidity threshold in USD (markets below this are flagged)
limitNoMaximum results (default 25)

Implementation Reference

  • The 'pm_micro_thin' tool is registered and implemented within 'src/tools/pm_micro.ts'. The handler makes an API call to '/api/v1/pm/micro/thin' and processes the result.
    server.registerTool(
      "pm_micro_thin",
      {
        title: "Polymarket Thin Book Detection",
        description:
          "Detect markets with thin order books that may be susceptible to slippage or " +
          "manipulation. Shows markets below a liquidity threshold with spread metrics. " +
          "Cost: $0.005 per query. Source: Polymarket order book analysis.",
        inputSchema: {
          threshold: z
            .number()
            .optional()
            .describe("Liquidity threshold in USD (markets below this are flagged)"),
          limit: z
            .number()
            .int()
            .min(1)
            .max(100)
            .optional()
            .describe("Maximum results (default 25)"),
        },
      },
      async ({ threshold, limit }) => {
        const res = await apiGet<PmMicroQueryResponse>("/api/v1/pm/micro/thin", {
          threshold: threshold ?? 50,
          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} thin book market(s).`;
        const json = JSON.stringify(data, null, 2);
    
        return {
          content: [{ type: "text" as const, text: `${summary}\n\n${json}` }],
        };
      },
    );

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/carrierone/verilexdata-mcp'

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