Expand description
§Live Token Monitor
This module implements a real-time terminal UI for monitoring token metrics. It displays live-updating charts for price, volume, transactions, and liquidity across four switchable layout presets with responsive terminal sizing.
§Usage
Directly from the command line (no interactive mode required):
scope monitor USDC
scope mon PEPE --chain ethereum --layout chart-focus --refresh 3
scope monitor 0x1234... -c solana -s log --color-scheme blue-orangeOr from interactive mode:
scope> monitor USDC
scope> mon 0x1234...§Layout Presets
- Dashboard – Charts top, gauges middle, transaction feed bottom (default)
- ChartFocus – Full-width candles (~85%), minimal stats overlay below
- Feed – Transaction log takes priority (~75%), small metrics + buy/sell on top
- Compact – Price sparkline and metrics only, for small terminals (<80x24)
The monitor auto-selects a layout based on terminal dimensions (responsive
breakpoints). Manual switching via L/H disables auto-selection until A.
§Features
- Real-time price chart (line, candlestick, or volume profile) with sliding window
- Volume bar chart
- Buy/sell ratio gauge
- Scrollable activity feed (transaction log)
- Key metrics panel with sparkline and stats table
- Config-driven widget visibility (toggle any widget on/off)
- Four layout presets switchable at runtime
- Responsive terminal sizing with auto-layout
- Log/linear Y-axis scale toggle
- Three color schemes (Green/Red, Blue/Orange, Monochrome)
- On-chain holder count integration (when chain client is available)
- Per-pair liquidity depth breakdown across DEXes
- Configurable price alerts (min/max thresholds, whale detection, volume spikes)
- CSV export mode (toggle with
E, writes to./scope-exports/) - Auto-pause on user input (toggle with
Shift+P)
§Keyboard Controls
Q/Escquit,Rrefresh,P/SpacepauseShift+Ptoggle auto-pause on inputEtoggle CSV export (REC indicator when active)L/Hcycle layout forward/backwardW+1-5toggle widget visibilityAre-enable auto layoutCtoggle chart mode,Stoggle log/linear scale,/cycle color schemeT/Tabcycle time period,1-6select periodJ/Kscroll activity log,+/-adjust refresh speed
Structs§
- Active
Alert - An active (currently firing) alert with a description.
- Alert
Config - Alert configuration for price and whale detection.
- Color
Palette - Named color palette derived from a ColorScheme.
- Data
Point - A data point with timestamp, value, and whether it’s real (from API) or synthetic.
- Export
Config - CSV export configuration.
- Monitor
App - Main monitor application, generic over terminal backend for testability.
- Monitor
Args - Arguments for the top-level
monitorcommand. - Monitor
Config - Monitor-specific configuration.
- Monitor
State - State for the live token monitor.
- Ohlc
Candle - OHLC (Open-High-Low-Close) candlestick data for a time period.
- Widget
Visibility - Controls which widgets are visible in the monitor.
Enums§
- Chart
Mode - Chart display mode.
- Color
Scheme - Color scheme for the monitor TUI.
- Layout
Preset - Layout preset for the monitor TUI.
- Scale
Mode - Y-axis scaling mode for price charts.
- Time
Period - Time period for chart display (limited to 24 hours of data retention).
Functions§
- run
- Entry point for the monitor command from interactive mode.
- run_
direct - Entry point for the top-level
scope monitorcommand.