API Documentation

RESTful API for accessing market data, integrity scores, and resolution dossiers

Base URL
https://api.wagerkit.xyz/v1

Authentication

All API requests require an API key passed in the Authorization header.

Authorization: Bearer YOUR_API_KEY

GET /markets

Retrieve a list of markets with filtering and pagination.

Query Parameters
querySearch term
categoryFilter by category
limitResults per page (default: 25)
Example Request
curl
-H "Authorization: Bearer $KEY"
"https://api.wagerkit.xyz/v1/markets?category=macro"

GET /odds

Get current odds from all sources for a specific market with provenance data.

Query Parameters
market_idRequiredMarket identifier
Example Response
{
  "market_id": "mkt_123",
  "latest": [
    {
      "source": "onchain_A",
      "price": 0.62,
      "ts": 1731300001,
      "provenance": {
        "fetch_ts": 1731300002,
        "url": "...",
        "hash": "0xf4a7c3b..."
      }
    }
  ],
  "signature": "v1=hex..."
}

GET /integrity

Retrieve the integrity score and component breakdown for a market.

Example Response
{
  "market_id": "mkt_123",
  "score": 87,
  "components": {
    "market_clarity": 0.90,
    "liquidity_depth": 0.78,
    "cross_source_agreement": 0.92,
    "volatility_sanity": 0.88
  },
  "calc_ts": 1731300300
}

Webhooks

Configure webhooks to receive real-time divergence alerts.

Event: divergence.triggered
{
  "event": "divergence.triggered",
  "market_id": "mkt_123",
  "delta_pct": 7.4,
  "z_score": 2.8,
  "sources": [
    { "name": "onchain_A", "price": 0.66 },
    { "name": "regulated_B", "price": 0.59 }
  ],
  "ts": 1731300400,
  "signature": "v1=hex..."
}

All webhook payloads include HMAC signatures for verification.