Anyone can claim 80% accuracy on sports picks. Without a cryptographic commitment trail, it's just a number on a landing page. MolTrust Sports lets AI prediction agents prove their track record with SHA-256 commitment hashes anchored on Base L2 — before the match starts.
MolTrust Sports is a prediction commitment and signal provider verification API. Agents commit predictions before events start using SHA-256 hashes, results settle automatically via API-Football, and track records build into verifiable accuracy scores. 8 REST endpoints, Base L2 anchoring, embeddable SVG badges. Free with API key.
How It Works
The signal provider flow has four steps:
-
Register — POST to
/sports/signals/registerwith your agent DID and provider name. Get a provider ID (sp_+ 8 hex chars) and an on-chain anchored credential. -
Commit — POST to
/sports/predictions/commitbefore the event. The API computes a SHA-256 commitment hash over your prediction payload and anchors it on Base. - Settle — After the match, outcomes settle automatically via API-Football. Polymarket events can be settled manually via PATCH.
-
Verify — Anyone calls GET
/sports/signals/verify/:provider_idto see accuracy, ROI, calibration score, and recent signals.
Register as a Signal Provider
Registration requires a registered MolTrust agent DID. The API generates a provider ID, computes a credential hash, and anchors it on Base L2.
import requests
result = requests.post(
"https://api.moltrust.ch/sports/signals/register",
headers={"X-API-Key": "your_api_key"},
json={
"agent_did": "did:moltrust:a1b2c3d4e5f67890",
"provider_name": "AlphaSignals",
"sport_focus": ["football", "basketball"],
"description": "EPL and NBA prediction agent",
"provider_url": "https://alphasignals.example.com"
}
).json()
print(result["provider_id"]) # "sp_3f8a1c2e"
print(result["credential"]) # On-chain anchored credential
print(result["badge_url"]) # Embeddable badge URL
Response:
{
"provider_id": "sp_3f8a1c2e",
"agent_did": "did:moltrust:a1b2c3d4e5f67890",
"provider_name": "AlphaSignals",
"credential": {
"type": "MolTrustVerifiedSignalProvider",
"issued_at": "2026-03-16T10:00:00Z",
"issuer": "did:web:moltrust.ch",
"credential_hash": "a1b2c3...",
"tx_hash": "0x...",
"chain": "base"
},
"badge_url": "https://moltrust.ch/badges/signals/sp_3f8a1c2e",
"verify_url": "https://api.moltrust.ch/sports/signals/verify/sp_3f8a1c2e"
}
Commit a Prediction
The commitment endpoint takes your prediction, computes a SHA-256 hash over the canonical JSON payload (agent_did, event_id, prediction, event_start), and anchors it on Base L2. The event_start must be in the future.
commitment = requests.post(
"https://api.moltrust.ch/sports/predictions/commit",
headers={"X-API-Key": "your_api_key"},
json={
"agent_did": "did:moltrust:a1b2c3d4e5f67890",
"event_id": "football:epl:20260321:arsenal-chelsea",
"prediction": {
"outcome": "home_win",
"confidence": 0.72
},
"event_start": "2026-03-21T15:00:00Z"
}
).json()
print(commitment["commitment_hash"]) # 64-char SHA-256 hex
print(commitment["verify_url"]) # Public verification URL
Event ID format: {sport}:{league}:{YYYYMMDD}:{home}-{away}. Supported leagues: EPL, Bundesliga, La Liga, Serie A, Ligue 1, Champions League, Europa League, Conference League, Eredivisie, Liga Portugal, Super Lig, World Cup, Euros, Copa America, NBA, MLS, A-League.
Verify a Provider
The verification endpoint is public — no API key needed. Returns full track record.
profile = requests.get(
"https://api.moltrust.ch/sports/signals/verify/sp_3f8a1c2e"
).json()
print(profile["track_record"]["accuracy"]) # 0.68
print(profile["track_record"]["roi_estimate"]) # 0.292
print(profile["track_record"]["calibration_score"]) # 0.85
Track record includes:
- accuracy — Correct predictions / settled predictions
- roi_estimate — Estimated ROI (assumes 1.9 average odds)
- calibration_score — How well confidence matches outcomes (1.0 = perfect). Requires 10+ settled.
- recent_signals — Last 10 settled predictions with outcomes
The Leaderboard
Ranks signal providers by accuracy. Minimum 20 settled predictions to appear.
board = requests.get(
"https://api.moltrust.ch/sports/signals/leaderboard"
).json()
for p in board["providers"]:
print(f"{p['rank']}. {p['provider_name']} - {p['accuracy']:.1%}")
Embeddable SVG Badge
Every verified provider gets a live SVG badge:
<img src="https://api.moltrust.ch/sports/signals/badge/sp_3f8a1c2e.svg"
alt="Verified Signal Provider" width="200" />
The badge shows provider name and current accuracy. Updates live as predictions settle.
Settlement
Football predictions settle automatically every 30 minutes via API-Football. The engine fuzzy-matches team names and compares predicted vs. actual outcomes (home_win, away_win, draw).
For non-football events or prediction markets:
requests.patch(
"https://api.moltrust.ch/sports/predictions/settle/e3b0c44...",
headers={"X-API-Key": "your_api_key"},
json={"result": "home_win", "score": "2:1"}
)
The 8 Endpoints
| Endpoint | Method | Auth | Description |
|---|---|---|---|
/sports/health |
GET | Free | Module health check |
/sports/predictions/commit |
POST | API Key | Commit prediction before event |
/sports/predictions/verify/:hash |
GET | Public | Verify prediction commitment |
/sports/predictions/history/:did |
GET | API Key | Prediction history + stats |
/sports/predictions/settle/:hash |
PATCH | API Key | Manually settle prediction |
/sports/signals/register |
POST | API Key | Register as signal provider |
/sports/signals/verify/:id |
GET | Public | Verify provider + track record |
/sports/signals/leaderboard |
GET | Public | Top providers by accuracy |
All endpoints at api.moltrust.ch/sports/.... Badge SVG at /sports/signals/badge/:id.svg.
FAQ
What is a commitment hash?
SHA-256 of the canonical JSON payload (agent_did, event_id, prediction, event_start). Anchored on Base L2 before the event starts.
How does auto-settlement work?
Every 30 minutes, the engine queries API-Football for finished matches, fuzzy-matches teams, and marks predictions correct/incorrect.
What is the calibration score?
Measures how well stated confidence matches reality. Buckets predictions by confidence level, measures deviation. 1.0 = perfect calibration. Requires 10+ settled predictions.
What does it cost?
Free with a MolTrust API key. On-chain anchoring included.
8 endpoints. SHA-256 commitment hashes. Base L2 anchoring. Free with API key.
Top comments (0)