Release Notes: v0.1.0¶
Release Date: 2026-04-13
Overview¶
polymarket-go v0.1.0 is the initial release of a Go SDK for building AI trading agents on Polymarket prediction markets. This release provides a complete foundation for autonomous trading with multi-agent workflows, LLM integration, and full Polymarket API access.
Highlights¶
- Polymarket API Client: Complete Go client for Gamma (markets) and CLOB (trading) APIs
- Multi-Agent Workflows: Schema-driven agent orchestration using multi-agent-spec format
- Portable Agents: Same agent definitions work with Claude Code subagents or Go servers
- LLM Integration: Built on omnillm for provider-agnostic LLM access
Features¶
Polymarket Client¶
Full API client for interacting with Polymarket:
client := polymarket.NewClient()
// Fetch active markets
markets, _ := client.GetMarkets(ctx, polymarket.GetMarketsParams{
Active: &active,
LiqMin: 50000,
Order: "liquidity",
})
// Get order book
book, _ := client.GetOrderBook(ctx, tokenID)
// Price data
mid, _ := client.GetMidPrice(ctx, tokenID)
spread, _ := client.GetSpread(ctx, tokenID)
Supported endpoints:
| Method | Description |
|---|---|
GetMarkets() |
Fetch markets with filters (liquidity, status, category) |
GetMarket() |
Fetch single market by condition ID |
GetOrderBook() |
Get bids and asks for a token |
GetPrice() |
Current price for a token |
GetMidPrice() |
Mid-market price |
GetSpread() |
Bid-ask spread |
Agent Specifications¶
Three specialized agents for the trading pipeline:
| Agent | Model | Role |
|---|---|---|
| market-analyst | sonnet | Discovers trading opportunities with edge calculation |
| superforecaster | sonnet | Generates calibrated probability estimates |
| trader | haiku | Executes trades with Kelly criterion sizing |
Agents are defined in portable markdown format with YAML frontmatter:
---
name: market-analyst
model: sonnet
tools: [WebSearch, WebFetch, Read, Write]
role: Market Research Analyst
goal: Identify mispriced markets with >10% expected edge
---
You are a market analyst specializing in prediction markets...
Workflow Execution¶
Graph-based workflow with automatic dependency resolution:
The executor performs topological sort to determine execution order and routes data between steps via port mappings.
CLI Tool¶
# Run with live market data
polymarket-agent --demo
# Custom configuration
polymarket-agent --team agents/specs/team.json --agents agents/specs/agents
LangChainGo Integration¶
Bridge to LangChainGo via omnillm-langchaingo adapter:
import (
"github.com/plexusone/omnillm-core/provider"
omnillm "github.com/plexusone/omnillm-langchaingo"
)
model := omnillm.New(provider, "claude-sonnet-4-20250514")
// Use with LangChainGo chains, prompts, memory
Architecture¶
┌─────────────────────────────────────────────────────────────┐
│ polymarket-go │
├─────────────────────────────────────────────────────────────┤
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────────┐ │
│ │ CLI Tool │ │ Executor │ │ Spec Loader │ │
│ │ (cmd/...) │ │ (workflow) │ │ (agents/teams) │ │
│ └──────────────┘ └──────────────┘ └──────────────────┘ │
│ │ │ │ │
│ └───────────────┴───────────────────┘ │
│ │ │
│ ┌────────────────────────┴────────────────────────────┐ │
│ │ Polymarket Client │ │
│ │ (Gamma API + CLOB API) │ │
│ └──────────────────────────────────────────────────────┘ │
│ │ │
│ ┌────────────────────────┴────────────────────────────┐ │
│ │ omnillm + omnillm-langchaingo │ │
│ │ (LLM Provider Abstraction) │ │
│ └──────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
Deployment Options¶
Claude Code¶
Deploy agents as subagents invocable via Task tool:
{
"platform": "claude-code",
"config": {
"agent_dir": "agents/specs/agents",
"model_mapping": {
"sonnet": "sonnet",
"haiku": "haiku"
}
}
}
Go Server¶
Deploy as a standalone server with in-process execution:
{
"platform": "go-server",
"config": {
"server": {"port": 8080},
"llm": {"provider": "omnillm"},
"risk": {
"max_position_percent": 10,
"kelly_multiplier": 0.25
}
}
}
Dependencies¶
| Module | Version | Purpose |
|---|---|---|
github.com/plexusone/omnillm-core |
v0.15.0 | LLM provider abstraction |
github.com/plexusone/omnillm-langchaingo |
v0.1.0 | LangChainGo adapter |
github.com/tmc/langchaingo |
v0.1.14 | LLM application primitives |
gopkg.in/yaml.v3 |
v3.0.1 | YAML parsing |
Getting Started¶
Installation¶
Quick Start¶
package main
import (
"context"
"fmt"
"github.com/grokify/polymarket-go/internal/polymarket"
)
func main() {
client := polymarket.NewClient()
ctx := context.Background()
active := true
markets, _ := client.GetMarkets(ctx, polymarket.GetMarketsParams{
Active: &active,
Limit: 5,
Order: "liquidity",
})
for _, m := range markets {
fmt.Printf("%s - $%.0f liquidity\n", m.Question, m.LiquidityNum)
}
}
Known Limitations¶
- Order placement is read-only (no trading execution yet)
- WebSocket streaming not yet implemented
- Self-directed workflow types (crew, swarm, council) not yet supported
Roadmap¶
See TRD.md for the full roadmap including:
- Phase 2: Production trading with order execution
- Phase 3: Kubernetes deployment
- Phase 4: Backtesting framework