Skip to content

This release fixes issues for SREs watching stability and regressions.

Published 1mo MCP Developer Tools
✓ No known CVEs patched
Read the diff → Tool health → What is this tool? →

✓ No known CVEs patched in this version

Topics

ai-agent ai-trading anthropic blockchain claude copy-trading
+11 more
defi mcp mcp-server model-context-protocol polymarket portfolio-management prediction-markets smart-money trading typescript websocket

Summary

AI summary

Fixed market‑resolver filter, price quality checks, buy outcome routing, and ID truncation bugs.

Full changelog

1.6.3 — Market Data Layer Bug Fixes

End-to-end testing of the README usage examples surfaced a cluster of bugs in the market data layer. This patch release fixes six of them — they share a single root cause: silent failures in the Polymarket API integration (ignored query params, wrong array index assumptions) that cascaded through buy, compare, and search flows.

🐛 Bug Fixes

  • market-resolver — Gamma /markets?condition_id= silently ignored the filter and returned the first DB row, so every buy/watch/compare call resolved to the wrong market. Now uses CLOB /markets/{conditionId}, which filters correctly and returns both YES and NO tokens with prices.
  • market-filter + price-service.getMarketPrice — Polymarket CLOB /book returns bids ascending and asks descending, so bids[0] was the worst bid and asks[0] the worst ask. Every liquid market was failing the quality check with a phantom ~98% spread. Fixed with Math.max/Math.min.
  • price-service.getMarketPriceByCondition — Same Gamma → CLOB migration as the resolver.
  • buy tool — The outcome parameter was validated by Zod but never actually used; the tool always bought the YES token regardless of NO input. Now correctly routed through pickTokenId/pickPrice helpers.
  • search-markets — Output truncated condition_id to 12 characters + ..., so the returned IDs could not be fed back into buy/compare. Now shows the full ID in backticks.
  • trending-markets — Used volume24hr field even for 7d/30d requests, and sent category as tag=<slug> which Gamma also silently ignores. Now resolves slugs to numeric tag_id via /tags/slug/<slug> and selects the period-specific volume field.

✅ Verification

  • npm test — 207/207 pass across 40 files
  • Tests for market-resolver and price-service rewritten against the new CLOB response shape
  • Real API smoke tests: buy YES, buy NO, compare (distinct metrics), search (full IDs), trending 7d crypto (category filter)

📦 Install

npm install [email protected]
# or
npx polymarket-agent-mcp

Full diff: https://github.com/demwick/polymarket-agent-mcp/compare/v1.6.2...v1.6.3

Weekly OSS security release digest.

The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.

No spam, unsubscribe anytime.

Share this release

Track demwick/polymarket-agent-mcp

Get notified when new releases ship.

Sign up free

About demwick/polymarket-agent-mcp

49-tool Polymarket prediction market suite for AI agents. Direct trading, smart money flow detection, copy trading with auto-monitor, backtesting, arbitrage scanning, portfolio optimization, and real-time WebSocket price streaming. Preview mode for simulation, live mode for real orders.

All releases →

Beta — feedback welcome: [email protected]