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
| Name | Required | Description | Default |
|---|---|---|---|
| min_spread | No | Minimum spread threshold (0-1, default 0.05) | |
| market_id | No | Filter by specific market ID | |
| limit | No | Maximum results (default 25) |
Implementation Reference
- src/tools/pm_arb.ts:30-57 (registration)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)"), }, }, - src/tools/pm_arb.ts:58-86 (handler)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}` }], }; }, );