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: The monitor wizard in the TUI builds a watchlist (tokens, pairs, addresses; market health checks and metric rules; interval, duration, CSV and report). Its grid shows each target's pass/fail state live, with the same health results as
market summary, a detail pane with charts, and keys that open the evidence. Watchlists are saved and run again withwatch open <name>. - Exchange Venues: Data-driven CEX integration via YAML descriptors from a venue catalog that
scope venues updatesyncs (19 exchanges, including Binance, Coinbase, Kraken, OKX, Bybit, KuCoin, Gemini and WEEX) with order book, ticker, trades, and OHLC support; new and fixed venues arrive without a new scope. Add your own by dropping a YAML file in~/.scope-bca/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
Every release has prebuilt binaries, each with a .sha256 file next to it: scope-windows-x64.zip, scope-linux-x64.tar.gz / scope-linux-arm64.tar.gz, and scope-macos-x64.tar.gz / scope-macos-arm64.tar.gz. Nothing needs to be compiled.
Windows (PowerShell): download the zip, check it, and put scope.exe on your PATH:
Invoke-WebRequest https://github.com/robot-accomplice/scope-blockchain-analysis/releases/latest/download/scope-windows-x64.zip -OutFile scope.zip
(Get-FileHash scope.zip -Algorithm SHA256).Hash # compare with scope-windows-x64.zip.sha256
Expand-Archive scope.zip -DestinationPath "$env:LOCALAPPDATA\scope"
[Environment]::SetEnvironmentVariable('Path', [Environment]::GetEnvironmentVariable('Path', 'User') + ";$env:LOCALAPPDATA\scope", 'User')
# Open a new terminal, then: scope --version
macOS and Linux: Homebrew installs the prebuilt binary:
# Homebrew loads formulae from a third-party tap only after you trust it
With Cargo (any platform with Rust): builds scope from source.
On Windows, building needs the Microsoft C++ linker from Visual Studio Build Tools with the C++ workload; without it the build stops with linker `link.exe` not found. Use the zip above, or install the Build Tools first:
winget install Microsoft.VisualStudio.2022.BuildTools --override "--quiet --wait --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended"
Or build from a clone:
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 -- the monitor wizard in the TUI
# 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 |
| Watch a market's health live (monitor wizard) | scope monitor <token> --venue <venue> |
| Run a saved watchlist again (in the TUI) | watch open <name> |
| 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 ~/.scope-bca/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 ~/.scope-bca/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 ~/.scope-bca/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.
No venue is compiled into scope. The descriptors live in this repository as a venue catalog (crates/scope-core/venues/, with an index.json of SHA-256 checksums), and scope syncs them into ~/.scope-bca/venues/catalog/:
- The first command that needs a venue fetches the catalog once.
scope venues updatefetches it again: new and fixed venues, without a new scope. Every file is checked against its checksum, and a failed update leaves the old catalog in place.- Your own files in
~/.scope-bca/venues/override a catalog venue with the same id, and are never touched by an update. - Offline with no catalog, scope says how to get one and writes
~/.scope-bca/venues/example.yaml.sample, a commented template for describing an exchange yourself. - To sync from another catalog, set
market.venue_catalog_urlin the config (a folder URL with anindex.json), or passscope venues update --url.
Catalog Venues
| Venue | ID | Capabilities |
|---|---|---|
| Biconomy | biconomy |
order book, ticker, trades, OHLC |
| Binance Spot | binance |
order book, ticker, trades, OHLC |
| BingX Spot | bingx |
order book, ticker, trades, OHLC |
| Bitget | bitget |
order book, ticker, trades, OHLC |
| Bitstamp | bitstamp |
order book, ticker, trades, OHLC (USD pairs) |
| Bybit | bybit |
order book, ticker, trades, OHLC |
| Coinbase | coinbase |
order book, ticker, trades, OHLC |
| Crypto.com | crypto_com |
order book, ticker, trades, OHLC |
| Gate.io | gateio |
order book, ticker, trades, OHLC |
| Gemini | gemini |
order book, ticker, trades, OHLC (USD pairs) |
| HTX | htx |
order book, ticker, trades, OHLC |
| Kraken | kraken |
order book, ticker, trades, OHLC |
| KuCoin Spot | kucoin |
order book, ticker, trades, OHLC |
| LBank | lbank |
order book, ticker, trades |
| MEXC | mexc |
order book, ticker, trades, OHLC |
| OKX | okx |
order book, ticker, trades, OHLC |
| WEEX Spot | weex |
order book, ticker, trades, OHLC |
| WhiteBIT | whitebit |
order book, ticker, trades, OHLC |
| XT.COM | xt |
order book, ticker, trades, OHLC |
Adding a Custom Venue
- Run
scope venues schemato see the YAML format - Create a YAML file following the schema
- Place it in
~/.scope-bca/venues/ - Validate with
scope venues validate my-venue.yaml - Use it immediately:
scope market summary USDC --venue my-venue
Or start from the commented template, ~/.scope-bca/venues/example.yaml.sample, or copy the catalog's descriptors to edit:
# Copies the catalog's descriptors, as they are, to ~/.scope-bca/venues/
# Your copies override the catalog's; delete one to follow the catalog again
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
# Choose the token by contract (no question); --yes only skips the save question
# Save the selected token as an alias for future use
Choosing a token
A symbol such as USDN can name more than one token. When it does, scope lists the tokens (chain, contract, name) and asks you to choose one. Then it asks whether to save the choice: "Save so USDN always means 0x… on ethereum?". A saved choice is used from then on without a question. On an exchange venue that lists its coins' contracts, scope also checks the saved contract against the venue's, and stops if they differ.
In the TUI, the question is a list: ↑/↓ and Enter choose, Esc cancels.
Without a terminal (a pipe, --format json, a script or the web API), scope does not ask. It stops with the list. Pass --token <contract> to choose (crawl, token-health, insights, monitor and market summary|ohlc|trades take it). --yes skips only the save question.
Saved choices are in ~/.scope-bca/data/tokens.yaml. In the TUI, tokens list shows them and tokens remove <SYMBOL> removes one. Each lookup is recorded in ~/.scope-bca/state/resolutions.jsonl.
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, mouse wheel, Shift-↑ / Shift-↓ |
Scroll the output: a page, 3 lines, 1 line. Ctrl-Home / Ctrl-End jump to the top / bottom. The TUI captures the mouse for the wheel, so select text with Shift+drag. |
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 keys that move around (scroll, history, complete, the palette, find; Ctrl-G while a watchlist runs) as many as fit. While you type, it shows the usage of the command and the next argument it expects, the value a flag needs (with its allowed values), or an unknown flag. help opens at its first line. The pane keeps the last 5000 lines and says when it dropped older ones.
Market summary in the TUI. market summary shows a compact view: the verdict on the first line, the key values in two columns, the book as one ladder (asks above the mid, bids below, one size per level in the quote asset, with a bar), and a bid/ask table (best price, slippage for 10K, depth, top-3 and top-10 depth). The checks that passed are in a grid with their limits (Spread ≤3%); each other check is spelled out under it. Ctrl-Y and save still copy the CLI text report.
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 snapshot is as wide and as tall as its content; the trends take the rest of the pane. Each trend row has a fixed numbers column (label, limit, latest value), a ┤, and a chart that fills its track from the left, one cell per run, and then scrolls. A bar outside its limit is red. Each chart has a minimum range, so noise reads as a flat line. Beside the trends, the snapshot leaves out the values they chart, and it drops ladder levels before it would be cut. When there are rows to spare, the charts get taller. When the pane is too narrow for both side by side, the compact snapshot goes on top and the trends below it. A rule keeps the footer (run 3 of 4 · next in 12s · running …) apart. --duration forever (or inf) runs until you press Esc; without --duration, a run lasts 1 hour. 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 (except --status) and monitor --dashboard 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. After setup, the TUI reads the config again, so a new key works at once. 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 (monitor wizard and watchlists)
scope monitor opens the TUI with the monitor wizard, filled in from its arguments. monitor … in the TUI does the same.
The wizard has four steps (Tab moves between them; Ctrl-R starts, Ctrl-S saves, Esc leaves):
- Targets.
aadds one:pair USDC binance,token PEPE solana, oraddress 0x… ethereum. Name several venues to watch one target on all of them:pair USDN weex binance.ddeletes the selected one; to change a target's venues, delete it and add it again. - Metrics. For each target: the market health preset (the checks of
market summary, with the same thresholds: flag, then configmarket.health, then the default), and the metrics of its kind, each a rulemetric op value. Space turns one on,ochanges the operator, Enter edits the value. Market metrics:mid_price,spread_pct,bid_depth,ask_depth, the top-3 and top-10 depths,peg_deviation_pct, and two that compare with the tick before:largest_trade(the largest trade on the venue's tape since the last tick, in the quote asset; the first tick looks back one interval) andvolume_change_pct(the change of the venue's 24h volume since the last tick; the first tick shows n/a). A DEX venue has no trade tape, so itslargest_tradecell is an error that says so. Token metrics:price_usd,price_change_24h_pct,volume_24h,liquidity_usd,holders. Address metrics:native_balance,risk_score. - Timing. The interval and the duration (default 60s and 1h, as
market summary --every;foreverruns until you stop it), with the number of fetches they cost. - Outputs. The name, the CSV path (one row per check per run: time, target, metric, value, operator, threshold, status, source, error) and the report path (written when the run ends or you stop it).
The grid. The run shows one row per target, breached rows first (a target on several venues has one row per venue, USDN@weex and USDN@binance, and its token or address checks on a row of their own, USDN), with one mark per check (✓ pass, ! warn, ✗ fail, - n/a, ? the value could not be read). A breach that starts rings the bell once and shows a banner. Enter opens the detail: each check's value and a chart of its last values. For a target on two or more venues, the detail is the venue charts: one chart per market check, with one line per venue on a shared scale and time axis, and a venue legend with the range across venues (all), each venue's last value and its status. ← → select a venue (the evidence keys use it), Space shows only that venue as bars (and Space again all venues), Tab selects the chart whose values the legend shows, and PgUp and PgDn page through the charts when not all fit. A window too small for the charts shows the one-venue detail and says how much to enlarge it. In the detail, b, t, h, r and x run market summary, market trades, crawl, compliance risk or address for the target in the shell. Ctrl-G switches between the grid and the shell, so other commands run while the grid updates. Esc stops the run; Esc again closes the grid and leaves the last results and a summary in the scrollback. A run keeps the settings it started with: after setup saves a key, the grid says to restart the run to use it.
Watchlists. Ctrl-S in the wizard (or --save <name>) saves the watchlist to ~/.scope-bca/watchlists/<name>.yaml. In the TUI, watch list lists them, watch open <name> (or a .yaml path) runs one, and watch stop stops the run. A file that is not valid lists every error with its line:
name: stablecoins
interval: 30s
duration: 1h # or forever
outputs:
csv: ./watch.csv
report: ./watch.md
targets:
- kind: pair
id: USDC
venue: binance # or a list: [binance, weex]
preset: market health
health:
max_spread_pct: 0.5
- kind: token
id: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
chain: ethereum
rules:
- holders >= 1000
- liquidity_usd > 1000000
From the old monitor. --refresh N is the interval in seconds; --export is now --csv. The price bounds of monitor.alerts become rules on the price; with a venue, whale_min_usd becomes largest_trade < whale_min_usd and volume_spike_threshold_pct becomes volume_change_pct <= volume_spike_threshold_pct. Without a venue they are not checked, and a note says they need one. --layout, --scale and --color-scheme belong to the old dashboard.
The old dashboard (deprecated)
scope monitor <token> --dashboard opens the old live dashboard for one more release. It goes in the next one.
Dashboard flags: --chain / -c, --layout / -l, --refresh / -r, --scale / -s, --color-scheme, --export / -e, --venue / -v, with --dashboard.
Use --venue binance (or any CEX venue) to fetch real exchange OHLC data instead of synthetic candles. The dashboard reads one venue: with two or more it stops and says so. 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 ~/.scope-bca/config.yaml.
All scope files are in one folder, ~/.scope-bca (set SCOPE_BCA_HOME to use another folder): config.yaml, venues/, data/ (address book, token aliases) and state/ (TUI session, history and logs). On the first start after an upgrade, scope copies your files from ~/.config/scope and the platform data folder into it. It does not change or delete the old files. ~/.scope-bca/state/migration.jsonl lists each file it copied. It does this once: after that, scope never reads the old folders again, so a copy you delete stays deleted and ~/.scope-bca is the only place scope keeps its files. Delete the old folders when you no longer need them. If your config sets address_book.data_dir (or portfolio.data_dir), scope reads the address book from that folder, so the copy in ~/.scope-bca/data is not used. A leading ~ in data_dir is your home folder.
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: "~/.scope-bca/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". - Bot patterns (advisory): the summary also reads the venue's last 500 trades and its book for patterns that look machine-made: one exact trade size in 30% or more of the trades, trades at a near-fixed interval (gaps varying by under 10%), buy/sell "ping-pong" pairs of the same size within 5 s and 0.05% in price (the shape of wash trading), and a "ladder" of 8 or more book levels of the same size at even price steps. A pattern warns, never fails: market making is legitimate. The line gives the evidence and the bot-like share of the sampled trades, by count and by volume (many tiny bot trades can be little of the volume). It changes no volume figure. A DEX pool, a venue without a trade feed, or a tape under 30 trades gives
n/afor the trade signals, with the reason. JSON output has the details underbot_patterns. - 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.
# ~/.scope-bca/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.