Documentation Index Fetch the complete documentation index at: https://docs.chainstream.io/llms.txt
Use this file to discover all available pages before exploring further.
The chainstream CLI exposes every data product, GraphQL cube and DeFi primitive over a single binary. This page is the authoritative command reference — for narrative usage and installation see Access Methods → CLI .
Install
# Global install (recommended for interactive use)
npm install -g @chainstream-io/cli
# Zero-install, always-latest (recommended for agents and CI)
npx @chainstream-io/cli < comman d >
Either invocation works everywhere below. The short form chainstream <cmd> is used throughout this reference and is equivalent to npx @chainstream-io/cli <cmd>.
Global flags
Flag Purpose --versionPrint the CLI version and exit --jsonEmit single-line machine-readable JSON (default output is pretty-printed JSON) --helpPrint help for the current command or group
Environment variables
Variable Purpose Default CHAINSTREAM_API_KEYAPI key used in lieu of config.json unset CHAINSTREAM_API_URLOverride REST base URL https://api.chainstream.ioCHAINSTREAM_AUTH_URLOverride Auth service URL production default CHAINSTREAM_GRAPHQL_URLOverride GraphQL endpoint https://graphql.chainstream.io/graphqlSOLANA_RPC_URLOverride Solana RPC for wallet / balance reads public RPC BASE_RPC_URLOverride Base RPC public RPC
Config is persisted to ~/.config/chainstream/config.json; P-256 wallet keys live in ~/.config/chainstream/keys/. chainstream logout clears the wallet config but preserves the keys.
Authentication commands (top-level)
These commands are registered at the program root (no sub-group).
Command Purpose Arguments / Options loginCreate a TEE-backed wallet (default) or start an email OTP flow. Auto-grants the nano trial (50K CU, 30 days) on first login [email]; --key; --emailverifyComplete an email OTP login started by login --email --otp-id; --code; --emaillogoutClear the session (keeps keys on disk) — bind-emailBind an email to an existing wallet [email]bind-email-verifyFinish the email-bind OTP flow (non-interactive) --otp-id; --code; --email
Subcommand Purpose Options searchSearch tokens by keyword --keyword (required); --chain (required); --limitinfoGet full token detail --chain; --addresssecuritySecurity report (honeypot, mint authority, freeze authority, etc.) --chain; --addressholdersTop token holders --chain; --address; --limitcandlesOHLCV candlesticks --chain; --address; --resolution; --from; --to; --limitpoolsLiquidity pools for a token --chain; --address
market — Market data and discovery
Subcommand Purpose Options trendingHot / trending tokens by window --chain; --duration; --limitnewNewly created tokens --chain; --limittradesRecent trades, optionally filtered to a token --chain; --token; --limit
wallet — Wallet analytics, management, and signing
Subcommand Purpose Options signSign a serialized transaction with the on-host wallet --chain; --txprofilePnL + net worth + top holdings in one call --chain; --addresspnlPnL detail --chain; --addressholdingsToken balances --chain; --address; --limitactivityTransfer history --chain; --address; --limitaddressShow current wallet addresses — balanceNative + USDC balance (single request) --chain (sol | base)set-rawImport a raw private key (dev / testing only) --chain (base | sol)linkLink a wallet address to your subscription --chain (evm | solana)pricingList available x402 plans and prices —
dex — DEX route, swap, and token creation
All commands return unsigned transactions built server-side; signing happens on the host wallet.
Subcommand Purpose Options routeAggregated route + unsigned swap transaction --chain; --from; --input-token; --output-token; --amount; --slippage; --dex; --recipient; --anti-mev; --gas-price; --gas-limit; --max-fee-per-gas; --max-priority-fee-per-gasswapUnsigned swap transaction (direct, no aggregation) --chain; --from; --input-token; --output-token; --amount; --slippage; --dexcreateUnsigned launchpad token creation transaction --chain; --from; --name; --symbol; --dex; --uri; --image
tx — Broadcast and gas
Subcommand Purpose Options sendBroadcast a signed transaction --chain; --signed-tx; --submit-type; --anti-mevgas-priceCurrent gas price (EVM only) --chain (eth | bsc)estimate-gasEstimate gas limit for an EVM call --chain; --from; --to; --data; --value
job — Async job polling
Subcommand Purpose Options statusCheck the status of a long-running job --id; --wait; --timeout
graphql — GraphQL schema and queries
See the full usage guide in Access Methods → CLI → GraphQL subcommand and the Agent Skill at chainstream-graphql .
Subcommand Purpose Options schemaDiscover schema (cubes, types, fields) --summary; --type <cube>; --full; --refreshqueryExecute a GraphQL query --query <gql>; --file <path>; --var <json>
plan — Subscription and x402 auto-pay
Subcommand Purpose Options statusCurrent plan, remaining quota and usage --chain; --addresspurchasePurchase a plan via x402 / MPP (auto-saves the returned API key to config.json) --plan
config — Local configuration
Subcommand Purpose Options setSet a configuration value --key (apiKey | baseUrl | walletChain); --valuegetShow current configuration --key (optional)authShow current authentication status —
Exit behaviour
0 — success (or empty result)
1 — user-facing error with JSON payload on stdout (unless --json is off, in which case a formatted error is printed)
Non-zero exit on auth failure (401), payment-required (402), or network error
On 402 from any data/GraphQL command, the CLI prints a pointer to wallet pricing and plan purchase. plan purchase itself handles x402 auto-pay transparently.
Next
Access Methods → CLI Narrative usage: install, auth, first commands, GraphQL subcommand.
Agent Skills How AI agents should drive the CLI.
x402 Payments How plan purchase and on-the-fly 402 handling work.
GraphQL Endpoint, schema and authentication for the GraphQL surface.