Convergence Tracker API

All CT API requests require a Bearer token with ct_ prefix, generated via /apikey in the bot.

Authorization: Bearer ct_your_api_key_here

Endpoints

MethodPathDescription
GET/v1/ct/targetsList tracked targets
POST/v1/ct/targetsAdd target. Body: {"handle": "username"}
DELETE/v1/ct/targets/{handle}Remove target
GET/v1/ct/convergenceCurrent convergence detections
GET/v1/ct/convergence/historyLast 50 convergence events
GET/v1/ct/settingsGet CT settings (min_convergence, time_window_hours, min_member_count)
PATCH/v1/ct/settingsUpdate settings. Body, all optional: min_convergence (2-20), time_window_hours (1-168), min_member_count (0 or more)
GET/v1/ct/webhookGet webhook URL
PUT/v1/ct/webhookSet webhook URL. Body: {"url": "https://..."}. Delivery starts immediately
GET/v1/ct/statusHandles tracked, handle limit, convergences in the last 24h

WebSocket

wss://api.xanguard.tech/v1/ct/ws?api_key=ct_your_key

Receives one JSON frame per convergence detected for your targets:

{
  "type": "convergence",
  "data": {
    "community_id": "1493446837214187523",
    "community_name": "Example Builders",
    "member_count": 1234,
    "converging_handles": ["example_dev", "example_fund", "example_whale"],
    "convergence_count": 3,
    "detected_at": 1784645998000
  }
}

Webhook

Once a URL is set with PUT /v1/ct/webhook, each convergence is POSTed automatically with the same data:

{
  "event": "convergence_detected",
  "timestamp": 1784646000000,
  "data": { "community_id": "…", "community_name": "…", "member_count": 1234, "converging_handles": ["…"], "convergence_count": 3, "detected_at": 1784645998000 }
}

Deliveries are signed like Community Watch: X-Signature (lowercase hex HMAC-SHA256 of the raw body, keyed with your webhook secret) plus X-CT-Client-Id. Up to 2 retries (after 1s, then 2s) on a network error or 5xx; 4xx is not retried. Timestamps are epoch milliseconds.