Scope Blockchain Analysis
A production-grade command-line tool for blockchain data analysis, portfolio tracking, transaction investigation, and compliance-grade risk assessment.
Features
- Address Analysis: Query balances (with USD valuation), transaction history, and token holdings for blockchain addresses
- Transaction Analysis: Look up and decode blockchain transactions across all supported chains
- Token Crawling: Crawl DEX data for any token -- price, volume, liquidity, holder analysis, and risk scoring with markdown report generation
- Live Monitoring: Real-time TUI dashboard with four layout presets (Dashboard, Chart, Feed, Compact), responsive terminal sizing, config-driven widget visibility, price/volume/candlestick charts, price alerts, whale detection, CSV export, and auto-pause on input
- Portfolio Management: Track multiple addresses across chains with labels, tags, and aggregated balance views
- Compliance & Risk Assessment: Risk scoring, transaction pattern detection, taint analysis, and compliance reporting
- Data Export: Export address history and portfolio data to JSON or CSV with date range filtering
- Token Discovery: Browse trending and boosted tokens from DexScreener (
scope discover/scope disc) - Market Command (
scope market summary): Peg and order book health for stablecoin markets; CEX (Binance, Biconomy) or DEX (Ethereum, Solana) venues; repeat mode with--every/--duration;--reportand--csvexport - Token Health Suite (
scope token-health/scope health): DEX analytics with optional order book summary; venues: binance, biconomy, eth, solana - Insights (
scope insights/insight): Infer chain and type (address, tx, token) from input; run relevant analyses and present unified observations - Agent Output (
scope --ai): Global flag for markdown output to stdout (address, tx, crawl, discover, portfolio, export, token-health) - Reporting: Markdown reports for address, token, portfolio, and market commands; batch reports for multiple addresses (
scope report batch); address dossier (address + risk combined) - Shell Completion: Tab-completion for bash, zsh, and fish (
scope completions <shell>) - Progress Indicators: Spinners and progress bars for all long-running operations; auto-hidden in pipes
- Error Remediation: Actionable hints for common errors (invalid format, missing config, network, auth)
- Browser Mode (
scope web/scope serve): Locally hosted web UI (feature-gated; build with--features web) - Interactive Mode: REPL with preserved context between commands for faster workflow
- Setup Wizard: Guided first-run configuration with
scope setupfor API keys and preferences - USD Valuation: Native token balances enriched with real-time USD prices via DexScreener
- Multi-Chain Support:
- EVM chains: Ethereum, Polygon, Arbitrum, Optimism, Base, BSC
- Non-EVM chains: Solana, Tron
Installation
# Install from crates.io
Or build from source:
Shell Completion
Generate tab-completion scripts for your shell:
# Bash
# Zsh (add to your fpath)
# Then add to .zshrc: fpath=(~/.zfunc $fpath); autoload -Uz compinit && compinit
# Fish
Output Formats
Scope supports multiple output formats via --format or the global --ai flag:
| Flag | Format | Use case |
|---|---|---|
| (default) | Table | Human-readable terminal output |
--format json |
JSON | Programmatic consumption, piping to jq |
--format csv |
CSV | Spreadsheet import |
--ai |
Markdown | LLM/agent parsing (global flag, all commands) |
Use --format json when piping output to other tools or scripts. Use --ai when feeding output to an LLM or agent for analysis.
Quick Start
→ Full Quickstart Guide — workflow-oriented guide for due diligence, token research, compliance, monitoring, and more.
# Analyze an Ethereum address (auto-detects chain from address format)
# Include transaction history and token balances
# Save address report to markdown
# Wallet dossier: address + risk assessment in one view
# Analyze addresses on other chains (auto-detected or explicit)
# Look up a transaction
# Risk assessment for compliance
# Pattern detection
# Token crawling with report generation
# Live monitor -- launch directly from the command line
# Export data
# Token health (DEX + optional market)
# Market peg and order book health
# Unified insights — infer type and chain from any target
# Discover trending and boosted tokens
# Batch report for multiple addresses
# Batch report with risk assessment per address
# Agent-friendly markdown output
# Interactive mode (includes live monitor, portfolio, and all commands)
Browser Mode
Launch a local web UI with the same features as the CLI:
# Start web server (default: http://127.0.0.1:8080)
# Custom port
# Run as background daemon
# Stop running daemon
# Alias: 'serve'
The web UI provides:
- All CLI commands accessible via browser forms
- JSON REST API at
/api/*for programmatic access - Live WebSocket monitor with real-time price charts
- Configuration status and setup page
Command Map
Not sure which command to use? Here's a quick decision tree:
| I want to... | Command |
|---|---|
| Look up an address (balance, txs, tokens) | scope address <addr> |
| Look up a transaction | scope tx <hash> |
| Auto-detect input and run everything | scope insights <target> |
| Get token DEX data (price, volume, holders) | scope crawl <token> |
| Token DEX + order book health (stablecoins) | scope token-health <token> --with-market |
| Live real-time dashboard for a token | scope monitor <token> |
| Browse trending/boosted tokens | scope discover |
| Check market peg/depth for a stablecoin | scope market summary <symbol> |
| Assess compliance risk for an address | scope compliance risk <addr> |
| Manage a portfolio of watched addresses | scope portfolio add/remove/list/summary |
| Export data to JSON/CSV | scope export --address <addr> --output file.json |
| Generate a report for multiple addresses | scope report batch --addresses <...> |
Output Examples
Representative output for key commands:
Discover (table)
> scope
Featured Token Profiles (2) — limit 2
--------------------------------------------------------------------------------
1. solana | 8dAsTqYBjG...h5Acpump | 8dAsTqYBjG9jyy7RkRhH8KkwmmZA7mFViWneh5Acpump...
https://dexscreener.com/solana/8dastqybjg9jyy7rkrhh8kkwmmza7mfviwneh5acpump
2. solana | BrRhmR14uo...cc4Xpump | -
https://dexscreener.com/solana/brrhmr14uohppfeuw6dcnxlpabsv5yz56zmpcc4xpump
Discover (JSON)
> scope
Market summary (text)
> scope
USDC/USDT Market Summary (binance)
────────────────────────────────────────────
Venue: binance
Peg Target: 1.0000
Best Bid: 1.0006 (+0.060%)
Best Ask: 1.0007 (+0.070%)
Mid Price: 1.0006 (+0.065%)
Spread: 0.0001 (0.010%)
Volume (24h): ~2B USDT
Execution: 10k buy: ~0.50 bps slippage
Execution: 10k sell: ~0.50 bps slippage
Ask Side: 40 levels ... USDT depth
Bid Side: 52 levels ... USDT depth
Market summary (JSON)
> scope
Token health
Searching for 'USDC'...
Selected: USDC (USDC) on ethereum - $1.00
# Token Health: USDC (USDC)
## DEX Analytics
==================================================
Price: $1.00
24h Change: -0.02%
24h Volume: $75.47M
Liquidity: $13.36M
Market Cap: $73.24B
Compliance risk
Assessing risk for 0x742d35Cc6634C0532925a3b844Bc9e7595f1b3c2 on ethereum...
🟢 Risk Assessment Report
════════════════════════════════════════════════════════════
Address: 0x742d35Cc6634C0532925a3b844Bc9e7595f1b3c2
Chain: ethereum
Risk Score: 1.9/10
Risk Level: 🟢 Low
Assessed At: 2026-02-13 13:40 UTC
💡 Recommendations
────────────────────────────────────────────────────────────
1. Standard monitoring
Compliance Features
Scope includes enterprise-grade compliance and risk analysis. All compliance commands live under scope compliance:
Risk Assessment
See Output Examples for sample output.
# Basic risk score
# Detailed breakdown with evidence
# Export for compliance records (format auto-detected from extension: .json, .yaml, .md)
Pattern Detection
# Detect structuring, layering, and velocity anomalies
# Time-range analysis (default: 30d)
Available pattern types: structuring, layering, integration, velocity, round-numbers.
Transaction Tracing
# Trace fund flow through multiple hops (default depth: 3)
Compliance Reporting
# Generate a compliance report for a specific jurisdiction (output: markdown)
# Detailed SAR report
Available jurisdictions: us, eu, uk, switzerland, singapore.
Report types: summary (default), detailed, sar, travel-rule.
Compliance output formats: table (default), json, yaml, markdown.
Note: Set ETHERSCAN_API_KEY environment variable for full compliance analysis. Without it, basic scoring is used.
Token Crawling
Crawl DEX data for any token by address or name. Supports searching by symbol, displaying ASCII charts, and generating markdown reports. Token health output format is similar — see Output Examples.
# Crawl by contract address
# Search by token name or symbol
# Specify time period (1h, 24h, 7d, 30d)
# Generate a markdown report
# Disable ASCII charts, output as JSON
# Skip interactive prompts (use first match)
# Save the selected token as an alias for future use
Token Discovery
Browse trending and boosted tokens from DexScreener without knowing a symbol or address:
# Featured token profiles (default)
# Recently boosted tokens
# Top boosted tokens (most active)
# Filter by chain
# JSON or CSV output
Sources: profiles (featured), boosts (recent), top-boosts (most active). No API key required.
Example output:
1. solana | 8dAsTqYBjG...h5Acpump | Token description...
https://dexscreener.com/solana/8dastqybjg9jyy7rkrhh8kkwmmza7mfviwneh5acpump
Data Export
Export address history or portfolio data to JSON or CSV:
# Export address transaction history
# Export as CSV with date range and limit
# Export portfolio data
Interactive Mode
Launch a REPL where context persists between commands. Interactive mode provides access to all commands plus the live monitor:
# Uses solana chain automatically
# Launches a real-time TUI dashboard with price/volume charts
Available interactive commands:
address/addr-- Analyze a blockchain addresstx/transaction-- Analyze a transactioncrawl/token-- Crawl token analyticsmonitor/mon-- Live TUI dashboard with four layout presets, widget toggles, price/volume/candlestick charts, alerts, CSV export, and auto-pauseportfolio/port-- Portfolio management (add, remove, list, summary)tokens/aliases-- Token alias management (add, remove, list, recent)setup/config-- Configuration commandschain-- Set or show current chainformat-- Set or show output format (table, json, csv)limit-- Set or show transaction limit+tokens/+txs-- Toggle token/transaction display flags for address commandtrace/decode-- Toggle trace/decode flags for tx commandctx/context-- Show current session contextclear/reset-- Reset context to defaultshelp/?-- Show helpexit/quit-- Exit interactive mode
Live Monitor
The monitor launches a real-time TUI dashboard. You can start it two ways:
# Direct from the command line (no interactive mode needed)
# Or from interactive mode
Direct-command flags: --chain / -c, --layout / -l, --refresh / -r, --scale / -s, --color-scheme, --export / -e.
The monitor supports four layout presets that can be switched at runtime or configured in config.yaml:
| Preset | Description |
|---|---|
| Dashboard | Charts top, gauges middle, transaction feed bottom (default) |
| Chart | Full-width candles (~85%), minimal stats overlay |
| Feed | Transaction log takes priority, small metrics + buy/sell on top |
| Compact | Price sparkline and metrics only, for small terminals |
The monitor automatically selects the best layout for your terminal size (responsive breakpoints). Manual layout switching disables auto-selection until you press A.
Monitor features:
- Price/volume charts: Line, Candlestick, and Volume Profile modes
- Six timeframes: 1m, 5m, 15m, 1h, 4h, 1d
- Log/linear scale: Toggle Y-axis scaling for wide price ranges
- Color schemes: Green/Red (default), Blue/Orange, Monochrome
- Holder count: On-chain holder count (when API key is configured)
- Liquidity depth: Per-pair liquidity breakdown across DEXes
- Alerts: Configurable price min/max, whale detection, and volume spike thresholds
- CSV export: Record live data to
./scope-exports/with a single keypress - Auto-pause: Optionally pause data fetching while interacting
Monitor keybindings:
| Key | Action |
|---|---|
Q / Esc |
Quit monitor |
R |
Force refresh |
P / Space |
Pause/resume |
Shift+P |
Toggle auto-pause on input |
E |
Toggle CSV export (REC indicator when active) |
L |
Cycle layout forward (Dashboard -> Chart -> Feed -> Compact) |
H |
Cycle layout backward |
W + 1-5 |
Toggle widget visibility (1=price chart, 2=volume, 3=buy/sell, 4=metrics, 5=activity) |
A |
Re-enable auto layout |
C |
Cycle chart mode (Line / Candlestick / Volume Profile) |
S |
Toggle log/linear scale |
/ |
Cycle color scheme (Green/Red, Blue/Orange, Monochrome) |
T / Tab |
Cycle time period |
1-6 |
Select time period (1m, 5m, 15m, 1h, 4h, 1d) |
J / K |
Scroll activity log |
+ / - |
Adjust refresh speed |
Configuration
On first run, Scope detects that no configuration file exists and offers to launch the interactive setup wizard. The wizard walks you through configuring API keys, RPC endpoints, and output preferences, then saves the result to ~/.config/scope/config.yaml.
You can revisit the setup wizard at any time without editing the config file directly:
# Re-run the full setup wizard
# View current configuration status
# Configure a single API key
# Reset configuration to defaults
The generated config file follows this structure:
chains:
# EVM-compatible chains
ethereum_rpc: "https://mainnet.infura.io/v3/YOUR_KEY"
bsc_rpc: "https://bsc-dataseed.binance.org"
# Non-EVM chains
solana_rpc: "https://api.mainnet-beta.solana.com"
tron_api: "https://api.trongrid.io"
# Block explorer API keys
api_keys:
etherscan: "YOUR_API_KEY"
bscscan: "YOUR_API_KEY"
solscan: "YOUR_API_KEY"
tronscan: "YOUR_API_KEY"
output:
format: table # table, json, csv, or markdown
color: true
portfolio:
data_dir: "~/.local/share/scope"
# Monitor TUI configuration (all optional, shown with defaults)
monitor:
layout: dashboard # dashboard | chart-focus | feed | compact
refresh_seconds: 10
scale: linear # linear | log
color_scheme: green-red # green-red | blue-orange | monochrome
auto_pause_on_input: false # pause data fetching while interacting
widgets:
price_chart: true
volume_chart: true
buy_sell_pressure: true
metrics_panel: true
activity_log: true
holder_count: true
liquidity_depth: true
alerts:
price_min: null # alert when price drops below (e.g., 0.50)
price_max: null # alert when price exceeds (e.g., 2.00)
whale_min_usd: null # whale detection threshold (e.g., 10000.0)
volume_spike_threshold_pct: null # volume spike % (e.g., 100.0)
export:
path: null # base directory (default: ./scope-exports/)
Free Tiers: Solana & BSC
You can use Scope with Solana and BSC without paying for APIs.
BSC (Binance Smart Chain)
- RPC: Default
bsc-dataseed.binance.orgis free. Scope automatically falls back to BSC RPC for balance when the block explorer returns "Free API access is not supported" (Etherscan V2 free tier limits). - BscScan API: Etherscan V2 free tier does not support BSC (chainid=56). Balance works via RPC fallback; transactions and token lists require a paid API plan.
- Setup: No API key needed for balance. For transactions and tokens, a paid Etherscan plan is required. Set
bsc_rpcin config to override the RPC endpoint.
Solana
- RPC: Default
api.mainnet-beta.solana.comis free (public Solana endpoint, rate limited). - Solscan: Scope uses the public RPC for balance, transactions, and tokens. A Solscan key is optional and not required for normal use.
- Setup: No API key needed for basic Solana support. Use the default RPC in config, or set
solana_rpcto a custom endpoint if needed.
Summary: For BSC, balance works without any API key (RPC fallback). For full BSC support (transactions, tokens), a paid Etherscan plan is required. For Solana, the default public RPC is sufficient.
Environment Variables
ETHERSCAN_API_KEY- Required for compliance featuresSCOPE_CONFIG- Custom config file path (overrides default location)RUST_LOG- Log level override
Architecture
Dataflow and C4 architecture diagrams are in docs/architecture/:
- C4 Context — Scope and external systems (Etherscan, DexScreener, RPCs, Biconomy)
- C4 Containers — CLI, Chains, Compliance, Market, Display, Config
- Dataflow — Per-command diagrams for address, crawl, discover, compliance, market, token-health, portfolio, export, report, monitor, interactive
Development
# Run tests
# Format code
# Run lints
# Build release
Or use just:
Git hooks: A pre-push hook runs the coverage check (80% minimum, no regression) before allowing a push. Install with just install-hooks. Requires cargo install cargo-tarpaulin.
Peg & Order Book Health (scope market)
The scope market summary command fetches level-2 order book data from CEX (Binance, Biconomy) or DEX (Ethereum, Solana) venues and reports peg, book health, volume, and execution checks:
- Peg: Target, best bid/ask deviation (%), mid price, spread
- Volume: 24h quote volume (Binance ticker, DEX analytics; omitted for Biconomy)
- Execution: Simulated 10k USDT buy/sell slippage or "insufficient liquidity"
- Order book: Ask/bid levels with depth (base and quote amounts)
- Health checks: No sells below peg, bid/ask ratio, minimum levels and depth per side
- Output: Text (default) or JSON — see Output Examples for sample
- Tunable thresholds: All health-check thresholds are configurable. Defaults (min-levels=6, min-depth=3000, peg-range=0.001, bid/ask ratio 0.2–5.0x) originated from the PUSD Hummingbot config—override for other markets.
# Repeated runs (default: every 60s for 1h)
just summary invokes scope market summary under the hood.
Token Health Suite (scope token-health / scope health)
Combines DEX analytics (crawl) with optional market/order book summary for stablecoins:
With --with-market, order book data is fetched from the selected venue (--market-venue): binance (default), biconomy, eth (Ethereum DEX), solana (Solana DEX). CEX pair format: binance=USDCUSDT, biconomy=USDC_USDT. DEX venues use on-chain liquidity from the selected chain.
Agent-Oriented Output (--ai)
Use --ai to emit markdown-formatted output to stdout instead of tables or JSON. Useful for LLM/agent consumption and parsing:
--ai affects all commands that support output formatting (address, tx, crawl, discover, portfolio, export, token-health).
Additional market options:
--report path.md: Save markdown report to file (one-shot or final report in repeat mode)--csv path.csv: Append time-series of peg/spread/depth to CSV (repeat mode only)
Reporting & Analytics
Scope supports markdown and structured report generation across commands:
| Command | Report Option | Description |
|---|---|---|
scope address |
--report report.md |
Address analysis (balance, transactions, tokens) |
scope address |
--dossier / --dossier --report dossier.md |
Address + risk assessment combined |
scope crawl |
--report report.md |
Token analytics with risk scoring |
scope portfolio summary |
--report report.md |
Portfolio allocations by chain and address |
scope market summary |
--report report.md |
Peg and order book health |
scope market summary |
--csv data.csv |
Time-series of peg/spread (repeat mode) |
scope compliance risk |
--output file |
Risk assessment (format from extension: .json, .yaml, .md) |
scope compliance compliance-report |
--output file |
Unified risk + pattern analysis (markdown) |
scope report batch |
--addresses a,b,c or --from-file path + --output report.md |
Combined report for multiple addresses |
scope report batch |
--with-risk |
Include risk assessment per address (uses ETHERSCAN_API_KEY) |
scope token-health |
USDC, --with-market, --market-venue binance|biconomy|eth|solana |
DEX + optional market composite |
scope |
--ai (global) |
Markdown console output for agent parsing |
All reports include version and timestamp metadata for audit trail.
Supported Chains
| Chain | Type | Address Format | Explorer |
|---|---|---|---|
| Ethereum | EVM | 0x... | Etherscan |
| Polygon | EVM | 0x... | Polygonscan |
| Arbitrum | EVM | 0x... | Arbiscan |
| Optimism | EVM | 0x... | Optimistic Etherscan |
| Base | EVM | 0x... | Basescan |
| BSC | EVM | 0x... | BscScan |
| Solana | Non-EVM | Base58 | Solscan |
| Tron | Non-EVM | T... | Tronscan |
CI/CD
GitHub Actions workflow runs:
- Check - Fast compilation verification
- Format - Code style enforcement (
cargo fmt) - Clippy - Lint analysis (
cargo clippy) - Test - Unit and integration tests (
cargo test) - Docs - Documentation build verification
- Build Release - Release binaries (Linux, macOS)
- Security Audit - Dependency vulnerability scanning
License
MIT License - see LICENSE for details.
Built with Rust. Designed for analysts, compliance officers, and blockchain researchers.