FairLinedocs

The feed in 30 seconds

FairLine publishes fair odds for a soccer match as an SSE feed of Ed25519-signed envelopes, and logs its edge against the TxLINE StablePrice de-margined consensus.

curl -N "/api/feed?mode=replay"     # SSE: one signed envelope per second
curl "/api/state?mode=live"          # one envelope (the current tick)
curl "/api/edge-log?mode=replay&format=csv"   # edge history
curl "/api/key"                      # Ed25519 public key + canonicalization

Every envelope carries: an honest dataSource block (synthetic replay vs real TxLINE), match state (score/clock/cards/phase), model probabilities + fair prices (1X2, totals), the de-margined consensus, per-outcome edge in probability points and EV, and the signature. Verify by re-serializing the envelope without signature (recursive key sort, no whitespace) and checking Ed25519 against /api/key — the live view does exactly this in your browser on every tick.

The model in 30 seconds

Remaining goals are independent Poissons with a rising in-match intensity profile (≈53% of goals still to come at half-time), a fitted Dixon-Coles low-score correction, and red-card multipliers (0.67× short-handed / 1.12× opponent). Baseline intensities are calibrated to the pre-match de-margined board — all four probabilities reproduced to <0.5pp — so the model starts where the market starts and every point of in-play edge comes from repricing dynamics.

Full write-ups in the repo: model.md · feed.md · architecture.md · txline.md

For agents

Landing here as an agent? Start with /llms.txt — a plain-text index of everything below, sized for a model's context window.

FairLine ships an MCP server (mcp/server.mjs, stdio, official @modelcontextprotocol/sdk) that wraps the read endpoints on this page as three tools, plus a Claude Code plugin bundle (.claude-plugin/plugin.json, .mcp.json, skills/fairline/SKILL.md) documenting how to use them:

get_fair_odds({ mode })              # -> current envelope: state + model + consensus + edge
get_market_edge({ mode, sinceMs, limit })  # -> edge/divergence history over time
get_signing_key({})                  # -> Ed25519 public key + canonicalization rule

mode is replay (default, a labeled synthetic fixture) or live (the real TxLINE feed, ~60s upstream delay, may be unconfigured on a given deployment — an honest error/503 there, not a bug). Repo, install steps, and the Codex-compatible mcp_servers config are in the README's "For agents" section.

No MCP available? Every tool above is a thin wrapper — hit the same endpoints directly over raw HTTP:

curl "/api/state?mode=replay"                          # same shape as get_fair_odds
curl "/api/edge-log?mode=replay&format=json&sinceMs=0"  # same shape as get_market_edge
curl "/api/key"                                          # same shape as get_signing_key