⬢

Build with Defi-Vision

6 surfaces · live

Every depeg state transition and notable Solana MEV attack is fanned out across six independent developer surfaces. Pick the one that fits your stack — REST for one-shot queries, SDKs for apps, SSE for low-latency streams, webhooks for set-and-forget integrations, embeds for marketing sites, broadcast channels for human subscribers. They all share the same source of truth.

⬢

REST API

JSON endpoints for everything Defi-Vision tracks — markets, prices, signals, MEV, depeg, news, AI.

Full API reference ↗
  • ·Tier-gated via API key (X-API-Key header)
  • ·11 public endpoints, OpenAPI 3.1 spec at /api/v1/meta/openapi
  • ·Edge-cached on Cloudflare; sub-100ms response globally
# Programmatic clients use the workers.dev proxy host below — it
# bypasses Cloudflare's managed challenges that block curl/SDK
# User-Agents on the main defi-vision.com hostname.
curl -H "X-API-Key: $DV_KEY" \
  "https://dv-api-proxy.defivisionanalytics.workers.dev/v1/depeg/status"
◇

SDKs

First-party TypeScript and Python clients. Two-line subscribe to real-time events, same interface in both languages.

Not published to npm or PyPI yet — the snippets below will not install today. Use the REST or SSE surfaces meanwhile: both are plain HTTP and need no dependency.

  • ·TypeScript: ESM, Node 18+, browsers and edge runtimes, zero dependencies
  • ·Python: sync client over httpx, cancellation via threading.Event
  • ·Auto-picks transport (SSE when available, polling otherwise)
// Heads up: @defivision/js is not on npm yet, so this import
// fails today. The REST and Stream cards do the same job with
// plain fetch/EventSource and no dependency at all.
import { DefiVision } from '@defivision/js';

const dv = new DefiVision();
const sub = dv.subscribe({
  minSeverity: 'high',
  onItem(item) { console.log(`[${item.severity}] ${item.title}`); },
});
// later: sub.unsubscribe();
◆

Real-time Stream (SSE)

Single dedicated Cloudflare Worker holds the connection and pushes new items via Server-Sent Events.

  • ·GET /v1/stream — text/event-stream, auto-reconnect via EventSource
  • ·Filter at connect time: ?min_severity=high&types=depeg,mev
  • ·Sub-second push from server-side detection
const es = new EventSource(
  'https://dv-stream-server.defivisionanalytics.workers.dev/v1/stream?min_severity=high',
);
es.addEventListener('broadcast-item', e => {
  const item = JSON.parse(e.data);
  console.log(item.title);
});
◈

Webhooks

Register a URL; we POST signed HMAC payloads as events happen. Set-and-forget integration.

  • ·POST /api/v1/webhooks → returns id + signing_secret (shown ONCE)
  • ·Auto-disable after 10 consecutive 4xx/5xx — re-enable via the API
  • ·Verify each delivery with HMAC-SHA256 against the secret
curl -X POST https://dv-api-proxy.defivisionanalytics.workers.dev/v1/webhooks \
  -H "X-API-Key: $DV_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://your.app/dv-hook","min_severity":"high"}'
▢

Embeds

Drop-in iframe widgets for price, QMSI signals, and liquidation heatmaps.

Browse widgets ↗
  • ·No API key required — public widgets
  • ·Themeable accent color via query string
  • ·Adaptive to host page width
<iframe
  src="https://defi-vision.com/embed/price/BTC?accent=photon"
  width="360" height="180"
  frameborder="0"
  loading="lazy"
></iframe>
⬡

Broadcast Channels

RSS, JSON Feed, Bluesky, Nostr, Telegram — every depeg/MEV event fans out to all of them.

See all channels ↗
  • ·No code required — subscribe from any reader or follow on a social channel
  • ·Same source-of-truth feed all SDKs and webhooks consume
  • ·Listed handles + relay URLs published
# Browsers/readers — use the main domain (challenge solves
# automatically in interactive UAs).
https://defi-vision.com/api/feed.xml

# Programmatic — use the proxy hostname (no challenge).
https://dv-api-proxy.defivisionanalytics.workers.dev/feed.xml