Watches and webhooks

A watch runs a check on a schedule and posts to your webhook when the answer changes, so an agent does not have to poll. Create one in the cabinet or with POST /account/watches:

kindRunsNotifies when
tokentoken_deep_check, every 60 min (at least 15)the verdict changes, top-10 concentration (as listed or merged) or the largest entity moves by the threshold (5 points), or the number of linked wallets changes
holderstoken_holders_delta, every 60 min (at least 15)tracked holders enter or leave, large holders sell, concentration or holder count changes, signals or history coverage changes
rangeclmm_range_stats, every 60 min (at least 15)price, liquidity share, 7d/30d time in range, fee yield, impermanent loss, LP/net returns or history coverage changes
marketmarket_snapshot, every 60 min (at least 15)funding APR or open interest changes per venue, the reference price moves, cheapest execution venues change, or a source becomes unavailable
walletwallet_check, every 60 min (at least 15)the verdict, behaviour class or known exchange changes, or the wallet creates tokens
poolpool_health, every 60 min (at least 15)TVL moves by the threshold in percent (10), or liquidity flow, sandwich or bot share moves by it in points
launchesnew_launches, every 2 min (at least 1)new launches appear, each once, optionally above min_liquidity_usd

GET /account/watches returns the supported kinds and each kind’s current credits per run, interval bounds and default threshold. Market targets are tickers such as SOL; other targeted kinds take Solana addresses.

For market, options.size_usd sets execution size (default 10000, maximum 5000000 USD). For range, options.width_pct sets a centered range width (default 10%, maximum 100%). The range is recentered on each run; it does not track a fixed personal LP position.

Numeric thresholds use percentage points for concentration, yields and funding APR, and relative percent for TVL, price, holder count and open interest. Label and coverage changes notify without a numeric threshold. Each run uses the same tool and source coverage as a one-off analysis.

curl -X POST "https://api.dexra.dev/account/watches" \
  -H "Authorization: Bearer dxr_…" -H "content-type: application/json" \
  -d '{"kind":"token","target":"DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263","webhook_url":"https://your-agent.example/hooks/dexra","options":{"threshold":5}}'
  • The answer carries secret (whsec_…) once; keep it to verify webhooks.
  • Each run uses credits like a call and shows in the call log as watch. Without credits left a run is skipped, never paid per call.
  • The first run records a baseline; later runs notify on change. The watch limit and run costs follow your current account and plan.
  • Webhooks must be public https URLs; redirects are not followed. POST /account/watches/<id>/test sends a ping.

Every webhook is a JSON POST with X-Dexra-Event (changed, new_launches or ping) and a signature:

Event
{
    "event": "changed",
    "watch": { "id": 7, "kind": "token", "target": "DezX…" },
    "at": "2026-10-16T19:22:57Z",
    "tool": "token_deep_check",
    "changes": [{ "field": "top10_merged_pct", "before": 31.2, "after": 44.8 }],
    "verdict": "avoid",
    "summary": "…",
    "result": {}
  }

X-Dexra-Signature: t=<unix seconds>,v1=<hex>, where v1 is HMAC-SHA256 of t + "." + raw body with your secret. Check it on the raw body and reject old timestamps:

import { createHmac, timingSafeEqual } from 'node:crypto'

  function verify(secret, header, rawBody) {
    const { t, v1 } = Object.fromEntries(header.split(',').map((part) => part.split('=')))
    if (Math.abs(Date.now() / 1000 - Number(t)) > 300) return false
    const expected = createHmac('sha256', secret).update(`${t}.${rawBody}`).digest('hex')
    return expected.length === v1.length && timingSafeEqual(Buffer.from(expected), Buffer.from(v1))
  }