A command-line tool for blockchain data analysis, portfolio tracking, transaction investigation, and 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 five layout presets (Dashboard, Chart, Feed, Compact, Exchange), responsive terminal sizing, config-driven widget visibility, price/volume/candlestick charts, price alerts, whale detection, CSV export, and auto-pause on input
- Exchange Venues: Data-driven CEX integration via YAML descriptors, with 11 built-in venues (Binance, Biconomy, Bitget, Bybit, Coinbase, Crypto.com, Gate.io, HTX, Kraken, MEXC, OKX) with order book, ticker, trades, and OHLC support; add custom venues by dropping a YAML file in
~/.config/scope/venues/ - Portfolio Management: Track multiple addresses across chains with labels, tags, and aggregated balance views;
@labelshortcuts work in both CLI and web UI for instant address recall - 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,ohlc,trades): Peg and order book health; OHLC/candlestick data; recent trades; any CEX venue from the registry or DEX (Ethereum, Solana); repeat mode with--every/--duration;--reportand--csvexport - Token Health Suite (
scope token-health/scope health): DEX analytics with optional order book summary; any venue from the registry or DEX - Venue Management (
scope venues/scope ven): List available venues, view the YAML schema, initialise user venues directory, validate custom descriptors - Contract Analysis (
scope contract/scope ct): Smart contract security analysis covering source code verification, proxy detection (EIP-1967/1822/1167/Diamond), access control mapping, vulnerability heuristics (reentrancy, selfdestruct, unchecked calls, tx.origin, overflow), DeFi protocol checks (oracle, flash loan, DEX slippage), external intelligence (GitHub linking, audit reports, Sourcify), and security scoring (0-100) - 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
- Colorized Errors: Errors in red, remediation hints dimmed, plain text when piped
- Browser Mode (
scope web/scope serve): Locally hosted web UI (feature-gated; build with--features web) - TUI (
scope tui): A full-screen terminal UI that runs every CLI command with the same flags, with tab completion, inline usage hints, a command palette, and context that persists between commands - 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 install with Homebrew (macOS and Linux, prebuilt binaries):
# Homebrew loads formulae from a third-party tap only after you trust it
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
# Analyze a smart contract (security scoring, proxy detection, vulnerabilities)
# Risk assessment for compliance
# Pattern detection
# Token crawling with report generation
# Live monitor -- launch directly from the command line
# Exchange venues
# Token health (DEX + optional market)
# Market peg and order book health
# OHLC and recent trades
# Unified insights: infer type and chain from any target
# Discover trending and boosted tokens
# Export data
# Batch report for multiple addresses
# Agent-friendly markdown output
# Full-screen TUI: every command, with completion and a command palette
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
- Address Book integration: type
@labelin any input field for autocomplete; the backend resolves the label and auto-fills the chain - Contract Analysis panel with security scoring, vulnerability cards, proxy detection, and access control visualization
- JSON REST API at
/api/*for programmatic access (exchange: snapshot, OHLC, trades, contract analysis) - Live WebSocket monitor with real-time price charts
- Exchange venue selector and market snapshots
- Data rendering with download options (JSON, CSV, Markdown)
- Configuration status and setup page
See the Web Interface section below for screenshots.
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> |
| Audit a smart contract (security, proxy, vulns) | scope contract <addr> |
| 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> |
| Exchange-style monitor (order book + trades) | scope monitor <token> --layout exchange |
| Browse trending/boosted tokens | scope discover |
| Check market peg/depth for a stablecoin | scope market summary <symbol> |
| Fetch OHLC/candlestick data from a venue | scope market ohlc <symbol> --venue <venue> --interval 1h |
| Fetch recent trades from a venue | scope market trades <symbol> --venue <venue> |
| List available exchange venues | scope venues list |
| Add a custom exchange venue | scope venues schema then drop YAML in ~/.config/scope/venues/ |
| 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:
Venues list
> scope
┌─ Available Venues ──────────────────────────────
│ biconomy order_book, ticker, trades, ohlc
│ binance order_book, ticker, trades, ohlc
│ bitget order_book, ticker, trades, ohlc
│ bybit order_book, ticker, trades, ohlc
│ coinbase order_book, ticker, trades, ohlc
│ crypto_com order_book, ticker, trades, ohlc
│ gateio order_book, ticker, trades, ohlc
│ htx order_book, ticker, trades, ohlc
│ kraken order_book, ticker, trades, ohlc
│ mexc order_book, ticker, trades, ohlc
│ okx order_book, ticker, trades, ohlc
├──────────────────────────────────────────────────
│ Loaded 11 venues (0 built-in, 11 user)
│ User dir ~/.config/scope/venues
└──────────────────────────────────────────────────
Market summary (text)
> scope
┌─ USDC/USDT (binance) ───────────────────────────
│
├── Metrics
│ Venue binance
│ Peg Target 1.0000
│ Best Bid 1.0003 (+0.030%)
│ Best Ask 1.0004 (+0.040%)
│ Mid Price 1.0004 (+0.035%)
│ Spread 0.0001 (0.010%)
│ Volume (24h) 767883091 USDT
│ Exec 10K buy ~0.50 bps slippage
│ Exec 10K sell ~0.50 bps slippage
│
├── Ask Side — 42 levels, 95630691 USDT (+58 outliers excl.)
│ 1.0004 39143043.00 USDC 39158700.22 USDT
│ 1.0005 19270846.00 USDC 19280481.42 USDT
│ 1.0006 8915655.00 USDC 8921004.39 USDT
│ ... +39 more levels
│
├── Bid Side — 49 levels, 174252594 USDT (+51 outliers excl.)
│ 1.0003 77790847.00 USDC 77814184.25 USDT
│ 1.0002 31092292.00 USDC 31098510.46 USDT
│ 1.0001 31875025.00 USDC 31878212.50 USDT
│ ... +46 more levels
│
├── Health Checks
│ ✓ No sells below peg
│ ✓ Bid/Ask ratio: 1.82x
│
│ HEALTHY
└──────────────────────────────────────────────────
Market summary (JSON)
> scope
Market OHLC
> scope
┌─ OHLC — USDCUSDT (binance) ────────────────────
│ Interval 1h
│ Limit 5
│
│ Open Time Open High Low Close Volume
│ ─────────────────────────────────────────────────────────────────────────────────
│ 2026-02-15 12:00 1.000400 1.000500 1.000300 1.000450 1250000.00
│ 2026-02-15 11:00 1.000350 1.000420 1.000280 1.000400 980000.00
│ ...
│
│ ℹ 5 candles returned
└──────────────────────────────────────────────────
Market trades
> scope
┌─ Recent Trades — USDCUSDT (binance) ───────────
│
│ Time Side Price Qty
│ ────────────────────────────────────────────────
│ 14:32:15 BUY 1.000350 5000.00
│ 14:32:14 SELL 1.000340 1200.00
│ ...
│
│ ℹ 5 trades returned
└──────────────────────────────────────────────────
Token health
> scope
Fetching token health data...
┌─ USDC (USD Coin ) ───────────────────────────
│
├── DEX Analytics
│ Price $1.002300
│ 24h Change +0.00%
│ 24h Volume $846.04K
│ Liquidity $810.64M
│ Market Cap $76.31B
└──────────────────────────────────────────────────
Discover (table)
> scope
┌─ Featured Token Profiles (2) ──────────────────
│ Results 2
│
│ 1. solana | KeQnMAX5Ly...zJvMpump | -
│ https://dexscreener.com/solana/keqnmax5lydfbrcwvqhojlu84bgfsg9ahthzjvmpump
│ 2. pulsechain | 0xE558edc9...0595aD11 | OLD GLORY RISE
│ https://dexscreener.com/pulsechain/0xe558edc934fdbb65cdf4868617d5f0d80595ad11
└──────────────────────────────────────────────────
Discover (JSON)
> scope
Compliance risk
> scope
Assessing risk for 0x742d35Cc6634C0532925a3b844Bc9e7595f1b3c2 on ethereum...
┌─ 🟢 Risk Assessment Report ───────────────────
│ Address 0x742d35Cc6634C0532925a3b844Bc9e7595f1b3c2
│ Chain ethereum
│ Risk Score [██──────────────────] 19/100
│ Risk Level 🟢 Low
│ Assessed At 2026-02-13 13:40 UTC
│
├── Recommendations
│ 1. Standard monitoring
└──────────────────────────────────────────────────
Contract analysis
> scope
┌─ Contract Analysis: 0xdAC17F958D2ee523a2206206994597C13D831ec7
│ Chain ethereum
│ Verified Yes
│
│ Security Score [████████████████────] 82/100
│ Moderate risk — some findings detected
│
├── Source Code
│ Contract Name TetherToken
│ Compiler v0.4.18+commit.9cf6e910
│ EVM Version default
│ License MIT
│ Optimization No
│ ABI Functions 36
│
├── Proxy Detection
│ ✓ Not a proxy contract
│
├── Access Control
│ Ownership Ownable
│ Renounced No
│ Role-based No
│
├── Vulnerability Findings
│ ✗ VULN-003 — Unchecked External Calls (High)
│ External calls without return value checks can silently fail
│ Fix: Check return values of all external calls
│ ℹ VULN-005 — Missing Zero-Address Checks (Medium)
│ Functions accepting addresses should validate against address(0)
│ Fix: Add require(addr != address(0)) checks
│
├── External Intelligence
│ ℹ GitHub repository linked
│ ✓ Sourcify verification found
└──────────────────────────────────────────────────
Setup status
> scope
┌─ Scope Configuration Status ──────────────────
│ Config File ~/.config/scope/config.yaml
│
├── API Keys
│ ✓ etherscan configured
│ ✓ polygonscan configured
│ ✗ bscscan not set
│ ✗ solscan not set
│ ✗ tronscan not set
│
├── RPC Endpoints
│ ✓ ethereum_rpc configured
│ ✓ bsc_rpc configured
│ ✓ solana_rpc configured
│ ✓ tron_api configured
│
│ ℹ Run `scope setup` to configure missing keys
└──────────────────────────────────────────────────
Web Interface
Scope includes a locally-hosted web UI (scope web) that provides browser-based access to all analysis features. The interface features a dark theme, responsive layout, and @label address book autocomplete in every input field.
Exchange Venues
Scope uses YAML descriptor files to define CEX API integrations. This data-driven approach means adding a new exchange requires zero code changes, just a YAML file.
Built-in Venues
| Venue | ID | Capabilities |
|---|---|---|
| Binance Spot | binance |
order book, ticker, trades |
| Biconomy | biconomy |
order book, ticker, trades |
| Bitget | bitget |
order book, ticker, trades |
| Bybit | bybit |
order book, ticker, trades |
| Coinbase | coinbase |
order book, ticker, trades |
| Crypto.com | crypto_com |
order book, ticker, trades |
| Gate.io | gateio |
order book, ticker, trades |
| HTX | htx |
order book, ticker, trades |
| Kraken | kraken |
order book, ticker, trades |
| MEXC | mexc |
order book, ticker, trades |
| OKX | okx |
order book, ticker, trades |
Adding a Custom Venue
- Run
scope venues schemato see the YAML format - Create a YAML file following the schema
- Place it in
~/.config/scope/venues/ - Validate with
scope venues validate my-venue.yaml - Use it immediately:
scope market summary USDC --venue my-venue
Or initialise the user directory with all built-in descriptors for reference:
# Copies all 11 built-in descriptors to ~/.config/scope/venues/
# Edit them to customise behaviour or use as templates
Using Venues
Venues are specified with the --venue flag on market summary, token-health, and monitor:
The DEX venues (eth, solana) are still available and use on-chain liquidity data rather than the venue registry.
Compliance Features
Scope includes 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.
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
TUI
scope tui (also scope interactive and scope shell) opens a full-screen terminal UI. Every CLI command runs inside it, with the same flags, the same output, and the same error messages. Type a command as you would after scope:
scope:auto> address 0x742d35Cc6634C0532925a3b844Bc9e7595f1b3c2
scope:auto> market summary USDC --venue binance --every 30s --duration 1h
scope:auto> compliance risk @cold-wallet
Session commands. These change the context that later commands use. The context is saved between sessions.
| Command | What it does |
|---|---|
chain [name|auto] |
Show, pin or unpin the chain. A pinned chain is added as --chain to commands that accept it. auto lets each command infer the chain. |
format [table|json|csv|markdown] |
Show or set the output format for commands that accept it |
+tokens, +txs |
Toggle token balances and transactions for address |
trace, decode |
Toggle trace and decode for tx |
limit [n] |
Show or set the transaction limit for address |
tokens [list|recent|add|remove] |
Manage saved token aliases |
ctx / reset |
Show or reset the session context |
clear |
Clear the output pane |
save <file> |
Write the last output to a file (save x.csv after an --every run writes its series) |
help [command] / exit |
Show help, or one command's help; leave the TUI (also quit, q, Ctrl-D) |
A flag you type always wins over the context. address and tx with no target reuse the last one.
Keys.
| Key | Action |
|---|---|
Enter |
Run the line |
Tab |
Complete the command, flag, value, @label, token alias, venue or chain. Several matches open a menu. |
Ctrl-K |
Command palette: fuzzy search over every command and your history. Enter fills the line; Enter again runs it. |
↑ / ↓ |
History. On an empty line, ↑ first brings back a line that Esc cleared. |
Ctrl-A / Ctrl-E, Ctrl-B, Alt-B / Alt-F |
Start / end of line, one left, one word left / right |
Ctrl-U / Ctrl-W / Alt-K |
Delete to the start, the word before, to the end |
Ctrl-F or / |
Search the output; Ctrl-R searches the history |
Ctrl-Y |
Copy the last output (needs a terminal that allows OSC 52; save works everywhere) |
PgUp / PgDn |
Scroll the output |
Esc / Ctrl-C |
Cancel the running command (for example a --every loop); idle, Esc clears the line |
Ctrl-D |
Leave the TUI |
The row under the input shows the usage of the command you type and the next argument it expects, the value a flag needs (with its allowed values), or an unknown flag. The pane keeps the last 5000 lines and says when it dropped older ones.
Repeating view. A command with --every (for example market summary USDC --venue binance --every 30s --duration 1h) shows one view that updates in place: the latest report beside its trends (a pass/fail strip with the last failure, and a chart per key value with its threshold line). Below 80 columns the trends sit under the report. Esc stops the run and the view stays; the next key leaves it with one copy of the final report and a summary such as 42 runs · 1 failed (run 16).
Commands that need the terminal. setup, crawl with a name or symbol (it asks you to pick a token), and monitor run on the plain terminal. The TUI steps aside, runs the command, and comes back by itself when it ends; Ctrl-C cancels it. The scrollback shows its output and how long it took. interactive, web and completions do not run in the TUI.
Files. The TUI keeps its history in history.txt and a log of every submitted line in tui-events.jsonl (input, parsed arguments, outcome, error, duration), both in the scope data directory.
Live Monitor
The monitor launches a real-time TUI dashboard. You can start it two ways:
# Direct from the command line
# Or from the TUI
Direct-command flags: --chain / -c, --layout / -l, --refresh / -r, --scale / -s, --color-scheme, --export / -e, --venue / -v.
Use --venue binance (or any CEX venue) to fetch real exchange OHLC data instead of synthetic candles. The time period selector (1m, 5m, 15m, 1h, 4h, 1d) maps directly to the venue's candlestick intervals.
--venuemust name a known venue (scope venues list). An unknown venue is an error.- When DexScreener fails (unreachable, blocked, or the token is unknown there) and
--venueis set, the monitor uses that venue's ticker for the token and tells you why. --pairprices the token from the venue alone (exchange-only mode). Write the pair in any common form,USDN_USDT,USDN/USDT,USDN-USDTorUSDNUSDT(the joined form only for a stable or fiat quote such as USDT, USDC, DAI, EUR); scope converts it to the venue's own format.--export FILEstarts CSV export to that file at launch. TheEkey starts an export in the directory set bymonitor.export.pathinconfig.yaml(default./scope-exports/). A file that cannot be written is an error, not a silent no-op.
The monitor supports five layout presets that can be switched at runtime or configured in config.yaml:
| Preset | Description |
|---|---|
| Dashboard | Balanced 2x2 grid with all widgets visible (default) |
| Chart | Price chart takes ~85% of the screen; minimal stats overlay |
| Feed | Transaction/activity feed prioritized; small price ticker |
| Compact | Minimal single-column sparkline view for small terminals |
| Exchange | Exchange-style view: order book, chart, recent trades, market info |
The monitor automatically selects the best layout for your terminal size (responsive breakpoints). monitor.layout in config.yaml is only the starting preset; auto-selection still applies to it. The --layout flag pins the layout: auto-selection stays off. Manual layout switching also 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
- Exchange view: Live order book, ticker, and recent trade history from any configured CEX venue
- Alerts: Configurable price min/max, whale detection, and volume spike thresholds
- CSV export: Record live data with a single keypress (
E), or from launch with--export FILE - Auto-pause: Optionally pause data fetching while interacting
Monitor keybindings (? shows this list in the monitor):
| Key | Action |
|---|---|
q / Esc / Ctrl-C |
Quit monitor |
r |
Refresh now (the activity log confirms it) |
p / Space |
Pause/resume |
Shift+P |
Toggle auto-pause on input |
e |
Toggle CSV export (REC indicator when active) |
l / h |
Next / previous layout (Dashboard, Chart, Feed, Compact, Exchange) |
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, mono) |
t / Tab |
Cycle time period |
1-6 |
Select time period (1m, 5m, 15m, 1h, 4h, 1d) |
j / k |
Scroll activity log |
+ / - |
Slower / faster refresh (the footer shows the interval: ↻ 3s of 5s) |
? |
Show every key; any key closes the list |
With --venue, the Order Book and Recent Trades panels show the venue's real book and trades, and their titles name the venue. Without one, the book is the DEX pool's AMM book, the same as market summary, and the title names its source.
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: "~/.config/scope/data"
# Monitor TUI configuration (all optional, shown with defaults)
monitor:
layout: dashboard # starting preset; auto-layout still applies (--layout pins it)
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, CEX APIs)
- 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: Install with just install-hooks. Requires cargo install cargo-audit cargo-tarpaulin. Before a push, the pre-push hook:
- Stops commits whose author or committer email is not
robot@accomplice.ch. Set it once in your checkout:git config --local user.name robot-accompliceandgit config --local user.email robot@accomplice.ch. - Runs
cargo fmt --check,cargo clippy -D warningsandcargo audit. The audit ignore list is.cargo/audit.toml, which CI also reads. - Runs the coverage check: 80% minimum, and no drop below the committed
.coverage-last. The hook does not change.coverage-last. To raise the baseline, runjust coverage-baselineand commit the file.
Peg & Order Book Health (scope market)
The scope market command has three subcommands:
scope market summary fetches level-2 order book data from any CEX venue in the registry or DEX (Ethereum, Solana) and reports peg, book health, volume, and execution checks:
- Peg: Target, best bid/ask deviation (%), mid price, spread
- Volume: 24h quote volume (from venue ticker; omitted for DEX venues)
- 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, spread, minimum valid levels, total depth, top-3/top-10 depth per side, and depth/volume (bid + ask depth within ±2% of mid should be 5–10% of 24h volume: below fails, above warns). Every check shows its value and limit. Each check is
pass,fail,warnorn/a. Awarndoes not make the book unhealthy. Ann/acheck does not apply to the book, is always shown, and does not count against "healthy". - DEX venues (
eth,solana): there is no real order book, so scope builds a synthetic one from the pool's reserves on the constant-product curve (x·y=k), with one level at eachamm-step-pct(default 0.1%). Level count and spread aren/afor this book: the step sets the level count, and the real spread is the pool fee, which DexScreener does not report. Top-3 and top-10 depth apply; with a 0.1% step they mean depth within ±0.3% and ±1%. When DexScreener does not report the reserves, scope falls back to a single-level estimate and labels the book as such. The output names the book source in every format (book_sourcein JSON:exchange,synthetic_ammorsynthetic_estimate). Concentrated-liquidity (v3) pools are treated as constant-product pools, because DexScreener does not supply tick data. - Output: Text (default) or JSON; see Output Examples for sample
- Tunable thresholds: All 13 health-check thresholds are overridable defaults. Built-in defaults: min-levels=10, max-spread-pct=3, min-top3-depth=300, min-top10-depth=2000, min-depth=3000, peg-range=0.001, bid/ask ratio 0.2-5.0x, amm-step-pct=0.1, depth-window-pct=2, min-depth-volume-pct=5, max-depth-volume-pct=10. Order of precedence: CLI flag or web request field >
market.healthinconfig.yaml> built-in default. The same flags work onmarket summary,token-health --with-market, andinsights. The web/api/marketand/api/token-healthendpoints accept the same keys (snake_case) in the JSON body.
# ~/.config/scope/config.yaml — omitted keys keep the built-in default
market:
health:
min_levels: 10
max_spread_pct: 3.0
min_top3_depth: 300
min_top10_depth: 2000
amm_step_pct: 0.1 # synthetic AMM book step for DEX venues, in percent
# Repeated runs (default: every 60s for 1h)
scope market ohlc fetches real OHLC/candlestick data from CEX venues:
scope market trades fetches recent trades from CEX venues:
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 (--venue): any CEX venue from the registry (default binance), or eth / solana for DEX on-chain liquidity. Run scope venues list to see all available venues.
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 |
--with-market --venue <venue> |
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.