Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@chainstream-io/cli

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chainstream-io/cli

ChainStream CLI — on-chain data and DeFi execution for AI agents

latest
npmnpm
Version
0.2.15
Version published
Weekly downloads
26
62.5%
Maintainers
1
Weekly downloads
 
Created
Source

@chainstream-io/cli

ChainStream CLI — on-chain data and DeFi execution for AI agents.

Query tokens, analyze wallets, track markets, and execute swaps across Solana, BSC, and Ethereum.

Quick Start

# Search tokens
npx @chainstream-io/cli token search --keyword PUMP --chain sol

# Get token security
npx @chainstream-io/cli token security --chain sol --address <token_address>

# Check trending tokens
npx @chainstream-io/cli market trending --chain sol --duration 1h

# Wallet PnL
npx @chainstream-io/cli wallet pnl --chain sol --address <wallet_address>

Authentication

chainstream config set --key apiKey --value <your_api_key>

Get an API key at app.chainstream.io, or via x402 purchase (see below).

# First time: create wallet (no email required)
chainstream login

# With email (optional, for account recovery)
chainstream login user@example.com

# Returning user: fast re-login
chainstream login --key

x402 Auto-Payment → API Key

When CLI encounters a 402 (no subscription), it auto-purchases via x402 and saves the returned API Key to config. After purchase, all subsequent calls use the API Key — no wallet signature needed.

# Just run any command — CLI handles payment automatically
npx @chainstream-io/cli token search --keyword PUMP --chain sol
# → [chainstream] No active subscription. Available plans: ...
# → [chainstream] Purchasing nano plan...
# → [chainstream] Subscription activated. API Key saved to config.
# → { results: [...] }

Raw Private Key (dev/testing only)

chainstream wallet set-raw --chain evm

Commands

Token

CommandDescription
token searchSearch tokens by keyword
token infoGet full token detail
token securityCheck honeypot, mint auth, freeze auth
token holdersGet top token holders
token candlesGet OHLCV candlestick data
token poolsGet liquidity pools

Market

CommandDescription
market trendingHot/trending tokens
market newNewly created tokens
market tradesRecent trades

Wallet

CommandDescription
wallet profilePnL + net worth + top holdings
wallet pnlPnL details
wallet holdingsToken balances
wallet activityTransfer history
wallet addressShow wallet addresses
wallet balanceCurrent wallet balance

GraphQL

CommandDescription
graphql schemaDiscover cubes, fields, and query rules
graphql queryExecute GraphQL queries (supports x402 auto-payment)

DeFi (requires wallet)

CommandDescription
dex quoteGet swap quote
dex swapExecute token swap (irreversible)
dex createCreate token on launchpad
job statusCheck job status

Auth

CommandDescription
login [email]Email OTP login (default)
login --keyP-256 key login (returning users)
verifyComplete OTP verification
logoutClear session

Supported Chains

ChainIDData APIDeFi
SolanasolYesYes
BSCbscYesYes
EthereumethYesYes

Output

Default: formatted JSON. Use --raw for single-line JSON:

chainstream token info --chain sol --address <addr> --raw | jq '.price'

Architecture

@chainstream-io/cli → @chainstream-io/sdk → ChainStream v2 API
                    → TEE (wallet signing)
  • SDK-based: All API calls via @chainstream-io/sdk (typed, auto-retry, waitForJob)
  • Non-custodial: Wallet keys in TEE, never on local disk
  • API Key first: x402 purchase auto-saves API Key; wallet signature as fallback for DeFi

License

MIT

Keywords

chainstream

FAQs

Package last updated on 18 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts