Skip to main content
Glama

pm_arb_opportunities

Identify cross-market arbitrage opportunities on Polymarket by detecting price spreads between correlated markets, probability mismatches, and profit estimates.

Instructions

Get cross-market arbitrage opportunities on Polymarket. Shows price spreads between correlated markets, implied probability mismatches, and estimated profit. Cost: $0.01 per query. Source: Polymarket spread analysis.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
min_spreadNoMinimum spread threshold (0-1, default 0.05)
market_idNoFilter by specific market ID
limitNoMaximum results (default 25)

Implementation Reference

  • Registration of the 'pm_arb_opportunities' tool, including its schema and metadata definition.
    server.registerTool(
      "pm_arb_opportunities",
      {
        title: "Polymarket Arbitrage Opportunities",
        description:
          "Get cross-market arbitrage opportunities on Polymarket. Shows price spreads " +
          "between correlated markets, implied probability mismatches, and estimated profit. " +
          "Cost: $0.01 per query. Source: Polymarket spread analysis.",
        inputSchema: {
          min_spread: z
            .number()
            .min(0)
            .max(1)
            .optional()
            .describe("Minimum spread threshold (0-1, default 0.05)"),
          market_id: z
            .string()
            .optional()
            .describe("Filter by specific market ID"),
          limit: z
            .number()
            .int()
            .min(1)
            .max(100)
            .optional()
            .describe("Maximum results (default 25)"),
        },
      },
  • Handler implementation for 'pm_arb_opportunities', which calls the '/api/v1/pm/arb/opportunities' endpoint.
      async ({ min_spread, market_id, limit }) => {
        const res = await apiGet<PmArbQueryResponse>("/api/v1/pm/arb/opportunities", {
          min_spread: min_spread ?? 0.05,
          market_id,
          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} arbitrage opportunity/opportunities.`;
        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