KO
RN
Docs
Telegram Bots
Whale Alerts Spread Alerts

How it works

Real-time market data dashboard for Pacifica perpetual futures DEX on Solana.

Whale Tracker

Problem

No way to see what the biggest traders on Pacifica are doing - who's opening, who's closing, who's getting liquidated
Leaderboard on Pacifica shows static numbers - no history, no portfolio drill-down, no alerts

Solution

Full whale intelligence dashboard: leaderboard of 25,000 traders, portfolio viewer with positions and equity charts, real-time trade alerts via Telegram bot

How it works

Source: Pacifica REST API /api/v1/leaderboard?limit=25000 polled every 10 minutes. Full trader data: equity, PnL (1d/7d/30d/all-time), volume, open interest
5 smart categories computed from leaderboard data: Smart Money (consistency-scored), Big Positions (equity + OI), Most Active (1d volume), Top Gainers (1d PnL), Whales (highest equity). ~85 unique addresses tracked
Real-time trades via Pacifica WebSocket account_trades channel. Subscribes to all category whale addresses. Trades forwarded to Telegram bot for instant alerts
Portfolio viewer: click any whale to see account stats, open positions with live mark prices, trade history, and equity chart (7d/30d/90d). Data cached with 5min TTL, rate-limit aware queue
Telegram bot: per-user min trade size filter, personal watchlist, mute/unmute. Alerts show wallet, symbol, side (LONG/SHORT/CLOSE/LIQ), price, size, PnL if closing
Alert thresholds: PnL spike >= $10K, big win/loss >= $50K, new whale >= $500K equity, OI spike >= $1M. Leaderboard sortable by 11 columns. Top-100 report auto-generated in 9 categories. Telegram bot: @pacificawhalebot

Funding Arb

Problem

Funding rates on Pacifica differ from CEX rates, but no tool compares them across 17 exchanges in real time
Manual checking is impossible - 63 pairs x 17 exchanges = 1,000+ combinations to monitor

Solution

Real-time arbitrage dashboard: discovers pairs tradeable on Pacifica + any CEX, computes spread and annualized APR, ranks opportunities by profitability

How it works

Discovery: on startup and every 30 min, fetches all active perp markets from Pacifica REST API and 17 CEXs via CCXT. Pairs on 2+ venues = arb targets. Typically ~61 tradeable pairs
Hub-and-spoke model: Pacifica is the hub. Only Pacifica vs. each CEX spreads are computed (O(N) not O(N²)). Supported: Binance, Bybit, OKX, Bitget, Gate, HTX, Phemex, MEXC, Hyperliquid, Aster, Lighter, Backpack, KuCoin, BingX, Deribit
Spread computation: two scenarios per pair - Long Pacifica/Short CEX and Long CEX/Short Pacifica. Takes the profitable direction. spread = (bid_short / ask_long - 1) * 100%
Opportunity scoring: HIGH = APR > 50% or spread > 0.5%, MEDIUM = APR > 20% or spread > 0.2%, LOW = APR > 5% or spread > 0.1%. Stale data (> 30s) excluded
Live streaming: Pacifica via native WebSocket (REST fallback every 3s), CEXs via WebSocket where available + CCXT REST polling every 5s. All updates pushed to browser via Socket.io
Dashboard shows: bid/ask entry prices, funding rates with pay/receive labels, countdown to next funding, live BBO spread, and real P&L projection for next two funding events. Filter by opportunity level, exchange, or symbol. Telegram bot: @pacificaspreadbot

Orderbook Imbalance

Problem

No way to see bid/ask pressure across all 63 pairs at once
Traders need to open each market individually to check the book

Solution

Real-time imbalance bars for every pair, grouped by category and sorted by imbalance strength. Cyan = buy pressure, red = sell pressure. Market-wide aggregate bar at the top

How it works

Source: Pacifica WebSocket bbo (best bid/offer) channel. Wire format: b (bid price), B (bid size), a (ask price), A (ask size), s (symbol)
Imbalance per symbol = bid_size / (bid_size + ask_size). Above 0.5 = buy pressure, below 0.5 = sell pressure. Computed server-side on each BBO update
Market aggregate = weighted by notional: SUM(bid_price * bid_size) / SUM(bid_price * bid_size + ask_price * ask_size) across all symbols. Computed client-side
In-memory, not persisted. Server keeps latest BBO per symbol in bboState object. Throttled to max 1 SSE push per symbol per 500ms
Pulse detection: bar glows when imbalance crosses 70% (bid) or 30% (ask) threshold. Category aggregates update on every symbol change
BBO = top of book only (1 level). Does not reflect full orderbook depth. SSE stream at /api/stream/bbo, snapshot at /api/bbo. Tooltip shows bid/ask price, size, notional, imbalance %, and spread.

Heatmap

Problem

Pacifica has 63 perp markets but no way to see where volume is flowing at a glance
Raw trade feed is a firehose of individual fills - no structure, no categories, no context

Solution

Treemap visualization of all 63 markets grouped into 7 categories (Majors, Layer 1, DeFi, Meme, Commodities, Stocks, Forex). Cell size = volume, color = category

How it works

Source: Pacifica WebSocket trades channel. Server subscribes for all 63 symbols on startup via wss://ws.pacifica.fi/ws
Every trade parsed from compact wire format: h (history_id), s (symbol), a (amount), p (price), d (direction), tc (cause), t (timestamp). Notional = amount * price
All trades saved to SQLite - no filter, no threshold, includes dust. Deduped by history_id (UNIQUE constraint). Persists across restarts
Daily reset at 00:00 UTC. Heatmap queries: SELECT symbol, SUM(notional) as volume, COUNT(*) as count, MAX(notional) as largest WHERE timestamp >= today_start
Live updates via SSE (/api/stream/all). Each trade broadcasts compact payload {s, n, d} to all connected clients. Cell flashes and volume updates in-place
Treemap uses squarified layout algorithm. Categories sized by log10(volume), symbols within categories also log-scaled so small pairs stay visible. Full re-render debounced to 3s for new symbols
Client checks for day change every 30s. Tooltip shows: volume, % of total, % of category, trade count, largest trade. Long/short volume tracked per symbol.
BUILT BY