All examples

Execution · TypeScript

Sports Prediction Market Router

Aggregates live odds and liquidity across prediction markets and routes trades toward better execution.

View repository

Gordon boundary

Gordon governs the project's paid agent actions. The repository keeps its own strategy, runtime, data ingestion, and execution logic.

How it works

The router fetches live odds across venues and calls Gordon-brokered data APIs to enrich each market with recent news and reference prices. Gordon enforces per-call and daily spend limits, while session_id groups calls for reporting. The planned approval step would add a hard block before any signed order reaches an exchange.

Integration recipe

How Gordon fits

Paid data access

Supported

Broker premium odds and enrichment APIs through Gordon so every data fetch is capped and audited.

Route approval

Planned

Evaluate order size and venue policy via Gordon before signing any execution.

Integration code

Gordon MCP in Claude Code / TypeScript
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic();

async function routeMarket(market: Market, gordonKey: string) {
  const response = await client.beta.messages.create({
    model: "claude-opus-4-5",
    max_tokens: 1024,
    mcp_servers: [
      {
        type: "url",
        url: "https://api.withgordon.ai/mcp",
        name: "gordon",
        authorization_token: gordonKey,
      },
    ],
    tools: [{ type: "mcp_toolset", mcp_server_name: "gordon" }],
    betas: ["mcp-client-2025-11-20"],
    messages: [
      {
        role: "user",
        content:
          `Look up recent news for "${market.title}" using gordon_call_service ` +
          `(operation: exa.search.web, max_payment_units: 15000). ` +
          `Then recommend YES, NO, or SKIP with a one-sentence rationale.`,
      },
    ],
  });
  return response;
}

Connection path

01

Create an agent

Give this project its own Gordon identity, wallet, and API key.

02

Add MCP or SDK

Use Gordon MCP for hosted agents or gordon.fetch for application code.

03

Set policy

Allow only required services, then cap calls and daily spend.