Commands
Every command follows the same shape: spectrum <namespace> <command>, for example spectrum core block-height or spectrum defi uniswap-v3-quote. The namespace groups related data (core, tokens, defi, nfts, and so on) and the command is the specific query.
| Namespace | Commands |
|---|---|
core | block-height, block-by-number, block-by-hash, block-transactions, transaction-by-hash, estimate-gas, simulate-call, gas-comparison |
tokens | balance, token-balance, metadata, allowance |
yields | lending, vaults, staking, best, balance, price, pendle-implied-apy, morpho-vaults, morpho-vault-data |
prices | price, price-history, top-prices, search-tokens, token-addresses |
defi | uniswap-v2/v3/v4-quote, jupiter-quote, jupiter-price, position, curve-pools, curve-llama-lend-markets, curve-llama-lend-position, avantis-price, pendle-info, summary, approvals, revoke-transaction, all-funding-rates, hyperliquid-funding, dydx-funding |
nfts | collection, balance, owned-tokens, batch-balance, token-balance, token-owner, token-metadata |
ens | resolve, reverse |
registry | protocols, protocol, registry-slugs, protocol-contracts, address, categories, chains |
rpc | request, request-batch, send |
contracts | read-contract, multicall, simulate-contract, code |
solana | slot, block-height, balance, balance-lamports, account-info, token-accounts-by-owner, transaction, signatures-for-address, latest-blockhash, minimum-balance-for-rent-exemption, is-blockhash-valid, epoch-info, token-supply, request |
cosmos | account, delegations, unbonding-delegations, staking-rewards, validators, validator, staking-pool, denom-supply, block-results |
data | logs, transfers, receipt, portfolio, chain-health, trace-transaction |
utils | health |
spectrum <namespace> --help lists each command; spectrum <namespace> <command> --help shows its arguments and flags.
Command discovery for agents and scripts
spectrum commands emits the entire machine-readable catalog in one call. Each entry carries the command path, its positional arguments, and a full JSON Schema for its parameters, including enum values for chains and protocols. Add --human for a plain command/summary table.
spectrum commands | jq '.[] | select(.command == "tokens balance")'An agent can fetch this once and construct any invocation without walking --help trees.
Chains
Commands that accept a chain take --chain <slug> (for example ethereum, base, solana, cosmoshub). When omitted, the configured default chain applies. Chain-restricted commands (EVM-only, Cosmos-only, and so on) validate the slug up front, so the accepted chains shown in --help are exactly the ones that will work.
Historical reads
Commands that support point-in-time reads take --block-height <n>:
spectrum tokens balance 0xd8dA... --chain ethereum --block-height 19834521JSON payload flags
Structured inputs (ABIs, batches) are passed as JSON, either inline or from a file with @path:
spectrum core block-by-number --items '[{"chain":"ethereum","block":19000000}]'
spectrum contracts read-contract 0xA0b86991c62... balanceOf \
--abi @erc20.json --args '["0xd8dA..."]' --chain ethereum
spectrum rpc send eth_getBalance --params '["0xd8dA...", "latest"]' --chain ethereumGlobal flags
| Flag | Effect |
|---|---|
--api <url> | Override the API URL for this invocation |
--chain <slug> | Chain fallback for commands that accept one |
--json | Raw JSON data (the default) and also emit errors as JSON on stderr |
--human | Human-readable output (aligned key-value pairs and tables) |
--timeout <ms> | Request timeout (default 30000) |
--retries <n> | Retry attempts for retryable errors (default 3) |
--no-cache | Disable response caching (place after the subcommand) |