What it watches
- Liquidation distance — recomputed every 60s against the live mark price, with your accumulated funding cost folded into effective collateral (funding quietly drags your liquidation price toward the market; most DIY monitors miss this). Two bands:
liq_warnandliq_critical, with hysteresis so a position oscillating on a threshold doesn't spam you, and a 6-hour re-alert while you remain in breach. - Funding flips —
funding_flipfires when the perp funding rate changes sign: your carry just flipped from earning to paying (or back). - Vol regime —
vol_regimefires when realized volatility shifts regime (checked hourly from fresh daily candles). - Expiry —
expiry_warningbefore your monitor lapses, thenexpired.
Try it in 30 seconds (free, no webhook needed)
The 48-hour trial (one per IP per 30 days) works with zero infrastructure — alerts are recorded server-side and readable by polling, so you don't need a public endpoint just to evaluate:
curl -X POST https://api.quantoracle.dev/v1/watch/trial \
-H "Content-Type: application/json" \
-d '{
"asset": "BTC",
"direction": "long",
"entry_price": 62000,
"position_size": 5000,
"collateral": 1000,
"thresholds": {"warn_pct": 15, "critical_pct": 7}
}'
# → {
# "monitor_id": "w_7tIxfwKc",
# "token": "q-HX-...",
# "tier": "trial",
# "status": "active",
# "liquidation_price": 49910,
# "distance_pct": 19.5,
# "expires_at": "2026-06-13T02:44:38Z",
# "check_interval_seconds": 60,
# "status_url": "https://api.quantoracle.dev/v1/watch/w_7tIxfwKc"
# }Then poll status with the token — live snapshot plus everything that has fired:
curl "https://api.quantoracle.dev/v1/watch/w_7tIxfwKc?token=q-HX-..."
# → {
# "status": "active",
# "current": {
# "mark": 61973.3,
# "liquidation_price": 49909.99,
# "distance_pct": 19.4653,
# "funding_accum_est": -0.0005
# },
# "alerts": [
# {"ts": "2026-06-11T02:44:45Z", "type": "liq_warn",
# "payload": {"mark": 61995, "liquidation_price": 49910,
# "distance_pct": 19.49, "threshold_pct": 25}}
# ],
# ...
# }(Those are real responses — that liq_warn is the first alert the watcher ever fired, on its first 60-second tick, against a monitor registered with a deliberately tight 25% warn threshold.)
Webhooks: signed, retried, SSRF-safe
Provide a webhook_url (any public http(s) endpoint) and alerts POST to you as JSON with two headers: X-QO-Monitor (the monitor id) and X-QO-Signature — an HMAC-SHA256 of the raw body, keyed with your monitor token. Verify in a few lines:
import crypto from "node:crypto";
function verifyWatchWebhook(rawBody: string, signature: string, token: string) {
const expected = crypto.createHmac("sha256", token).update(rawBody).digest("hex");
return crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(signature));
}A delivered alert body looks like:
{
"monitor_id": "w_7tIxfwKc",
"type": "liq_warn",
"ts": 1781145885.81,
"asset": "BTC",
"direction": "long",
"mark": 61995,
"liquidation_price": 49910,
"distance_pct": 19.49,
"threshold_pct": 25,
"funding_accum_est": -0.0001
}Failed deliveries retry with backoff, and every alert is recorded server-side regardless — the status endpoint is the source of truth. Webhook targets are SSRF-guarded (public-unicast hosts only, re-checked at send time, redirects refused).
Production: $5 per position per 30 days, settled by your agent
POST /v1/watch/position is identical to the trial endpoint but runs 30 days. It's paid-only via x402: calling it unpaid returns a standard 402 quoting $5.00 USDC on Base or Solana, and any x402-capable client (Coinbase AgentKit, AgentCash, x402-fetch) completes payment automatically — no signup, no API key, no card. Renewal is the same motion: POST /v1/watch/extend with your {monitor_id, token} adds 30 days (it's also how a trial upgrades without re-registering).
The economics are deliberately lopsided: a DIY loop polling liquidation-price once a minute past the free tier costs ~$7.20/day in per-call fees. Watch is $5 for 30 days, checks just as often, folds in funding drift, and you don't babysit a scheduler.
The API surface
POST /v1/watch/trial— free 48h monitor, one per IP per 30 daysPOST /v1/watch/position— $5.00 / position / 30 days (x402)POST /v1/watch/extend— $5.00, +30 days, also upgrades a trialGET /v1/watch/{monitor_id}— free status + alert history (token auth)PATCH /v1/watch/{monitor_id}— free; update position params (added margin, resized, moved) so alerts keep tracking realityDELETE /v1/watch/{monitor_id}— free cancel
All of it is exposed over MCP too — the hosted server at https://mcp.quantoracle.dev/mcp includes watch_trial, watch_position, and watch_extend alongside the other 76 tools, so an MCP agent can register a monitor as a tool call.
Design notes (what Watch deliberately is not)
Watch reads public market data and sends webhooks. It holds no exchange keys, no custody, no execution path — the worst possible failure is a missed alert, and a watcher heartbeat is published at /health (watcher_heartbeat_age_s) so you can verify the loop is alive before trusting it. Capacity is capped (200 active monitors, 5 per IP) so check cadence never degrades. Alerts are informational, not financial advice.
Related
- Live crypto volatility & funding for agents — the data tier Watch is built on (fetch fresh vol/funding yourself, one call)
- Chaining x402 paid tool calls — how agents settle the $5 payment automatically
- Crypto liquidation calculator — the one-shot version of the math Watch runs on a loop
- Pricing — Watch, the live data tier, and the x402 settlement model in full