Skip to Content
CLICommands

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.

NamespaceCommands
coreblock-height, block-by-number, block-by-hash, block-transactions, transaction-by-hash, estimate-gas, simulate-call, gas-comparison
tokensbalance, token-balance, metadata, allowance
yieldslending, vaults, staking, best, balance, price, pendle-implied-apy, morpho-vaults, morpho-vault-data
pricesprice, price-history, top-prices, search-tokens, token-addresses
defiuniswap-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
nftscollection, balance, owned-tokens, batch-balance, token-balance, token-owner, token-metadata
ensresolve, reverse
registryprotocols, protocol, registry-slugs, protocol-contracts, address, categories, chains
rpcrequest, request-batch, send
contractsread-contract, multicall, simulate-contract, code
solanaslot, 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
cosmosaccount, delegations, unbonding-delegations, staking-rewards, validators, validator, staking-pool, denom-supply, block-results
datalogs, transfers, receipt, portfolio, chain-health, trace-transaction
utilshealth

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 19834521

JSON 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 ethereum

Global flags

FlagEffect
--api <url>Override the API URL for this invocation
--chain <slug>Chain fallback for commands that accept one
--jsonRaw JSON data (the default) and also emit errors as JSON on stderr
--humanHuman-readable output (aligned key-value pairs and tables)
--timeout <ms>Request timeout (default 30000)
--retries <n>Retry attempts for retryable errors (default 3)
--no-cacheDisable response caching (place after the subcommand)