Commands Reference
Complete reference for every aw command, flag, and output format.
Global options
These flags are available on all commands:
| Flag | Description |
|---|---|
--json | Output as JSON |
--output <format> | Output format: human or json |
--non-interactive | Disable interactive prompts |
--request-id <id> | Request ID for tracing |
--chain <name> | Target chain: ethereum, bnb, base, polygon, arbitrum, solana (default: ethereum). Not available for predict commands (hardcoded to Polygon). |
--timeout <ms> | RPC timeout in milliseconds (default: 30000) |
-h, --help | Display help |
-v, --version | Display version |
System
aw init
Initialize the local data store. Creates ~/.agentswallets/ with an encrypted SQLite database.
aw init --jsonNo init or unlock required.
aw unlock
Start a session. Required before write operations. Sessions auto-renew on each successful command (sliding window), so active agents stay unlocked.
AW_MASTER_PASSWORD='***' aw unlock --json{ "ok": true, "data": { "status": "unlocked", "expires_at": "2026-03-01T10:15:00Z" } }Rate-limited: 5 attempts per 15-minute window with exponential backoff.
aw lock
End the current session. Deletes session token files.
aw lock --jsonaw health
Check system health. No init or unlock required.
aw health --json{
"ok": true,
"data": {
"version": "0.5.0",
"default_chain": "ethereum",
"home_dir": "~/.agentswallets",
"db": { "ok": true },
"session": { "ok": true },
"rpc": { "ok": true },
"solana_rpc": { "ok": true },
"okx_api": { "ok": true },
"hyperliquid_api": { "ok": true },
"security_guard": { "ok": true }
}
}With --chain solana:
aw health --chain solana --json{
"ok": true,
"data": {
"version": "0.5.0",
"default_chain": "ethereum",
"home_dir": "~/.agentswallets",
"db": { "ok": true },
"session": { "ok": true },
"rpc": { "ok": true },
"solana_rpc": { "ok": true },
"okx_api": { "ok": true },
"hyperliquid_api": { "ok": true },
"security_guard": { "ok": true }
}
}Set AW_HEALTH_VERBOSE=1 for full diagnostics.
Wallet
Wallets can be referenced by name, address, or UUID in any command that accepts a <wallet> argument or --wallet flag.
aw wallet create
Create a new HD wallet. A BIP-39 mnemonic is generated locally, deriving both an EVM and a Solana address.
aw wallet create --name <name> --json| Flag | Required | Description |
|---|---|---|
--name <name> | Yes | Wallet name (pattern: [a-zA-Z0-9_-]{1,64}) |
{
"ok": true,
"data": {
"name": "bot",
"evm_address": "0x4f3A...6a1",
"solana_address": "7xKX...9vNq",
"key_type": "hd",
"supported_chains": ["ethereum", "bnb", "base", "polygon", "arbitrum", "solana"],
"hint": "Fund your wallet by sending tokens to the EVM or Solana address above."
}
}aw wallet list
List all wallets.
aw wallet list --json{
"ok": true,
"data": {
"wallets": [
{ "name": "bot", "address": "0x4f3A...6a1", "key_type": "hd", "solana_address": "7xKX...9vNq", "created_at": "..." }
]
}
}aw wallet info <wallet>
Get wallet details.
aw wallet info bot --json
aw wallet info --wallet bot --json{
"ok": true,
"data": {
"name": "bot",
"address": "0x4f3A...6a1",
"key_type": "hd",
"solana_address": "7xKX...9vNq",
"created_at": "2026-03-01T10:00:00Z"
}
}aw wallet balance <wallet>
Query on-chain balances.
aw wallet balance bot --json{
"ok": true,
"data": {
"name": "bot",
"address": "0x...",
"chain": "Ethereum",
"chain_id": 1,
"balances": { "ETH": "0.05", "USDC": "100.50", "USDT": "0.00" },
"balances_number": { "ETH": 0.05, "USDC": 100.5, "USDT": 0.0 }
}
}The balances field contains string values for display. The balances_number field contains numeric values for direct comparison. Use --chain to query balances on a different chain (e.g., aw wallet balance bot --chain polygon).
Use --all to query balances across all wallets at once:
aw wallet balance --all --jsonaw wallet deposit-address <wallet>
Get the deposit address for a wallet. Use --chain solana to get the Solana deposit address.
aw wallet deposit-address bot --json
aw wallet deposit-address bot --chain solana --jsonaw wallet export-key <wallet>
Export the HD wallet's BIP-39 mnemonic. Requires three safety gates:
AW_ALLOW_EXPORT=1environment variable--danger-exportflag- Interactive confirmation (or
--yes)
AW_ALLOW_EXPORT=1 aw wallet export-key bot --danger-export --yes --json{
"ok": true,
"data": {
"mnemonic": "abandon abandon abandon ... about",
"warning": "Store this mnemonic securely. Anyone with access can derive all keys."
}
}aw wallet settings <wallet>
Alias for aw policy show. See Policy Engine.
aw wallet settings-set <wallet>
Alias for aw policy set. See Policy Engine.
aw wallet drain <wallet>
Drain all tokens from a wallet to a destination address. Sends the entire balance minus gas fees.
aw wallet drain bot --to 0x9f4E...3bC1 --json
aw wallet drain bot --to 0x9f4E...3bC1 --chain polygon --json| Flag | Required | Description |
|---|---|---|
--to <address> | Yes | Destination address |
--chain <name> | No | Target chain (default: ethereum) |
--yes | No | Skip confirmation prompt |
{
"ok": true,
"data": {
"drained": [
{ "token": "USDC", "amount": "100.50", "tx_hash": "0x..." },
{ "token": "ETH", "amount": "0.05", "tx_hash": "0x..." }
]
}
}Transaction
aw send
Send a token transfer. Requires unlock.
aw send \
--wallet bot \
--to 0x9f4E...3bC1 \
--amount 10 \
--token USDC \
--idempotency-key transfer-001 \
--json| Flag | Required | Description |
|---|---|---|
--wallet <wallet> | Yes | Source wallet (name or EVM address) |
--to <address> | Yes | Destination address |
--amount <n> | Yes | Amount to send |
--token <symbol> | Yes | Token symbol (chain-dependent, e.g. USDC, POL, ETH, SOL) |
--chain <name> | No | Target chain (default: ethereum) |
--idempotency-key <k> | No | Prevents duplicate transactions (auto-generated if omitted) |
--dry-run | No | Validate without broadcasting |
USDC.e refers to the legacy bridged USDC on Polygon (0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174).
{ "ok": true, "data": { "tx_id": "tx_abc", "tx_hash": "0x...", "status": "confirmed" } }aw tx send
Alias for aw send. Identical flags and behavior.
aw tx list
List operations for a wallet. No unlock required.
aw tx list --wallet bot --limit 50 --json| Flag | Required | Description |
|---|---|---|
--wallet <wallet> | Yes | Wallet (name, address, or UUID) |
--limit <n> | No | Max results (default: 50) |
Operations include a parsed meta object with transaction details.
aw tx status <tx_id>
Get operation status. No unlock required.
aw tx status tx_abc123 --jsonPolicy
aw policy show <wallet>
Show the current spending policy. No unlock required.
aw policy show bot --jsonaw policy set <wallet>
Update spending policy. Requires unlock. At least one field must be specified.
aw policy set bot \
--limit-daily 1000 \
--limit-per-tx 200 \
--max-tx-per-day 50 \
--allowed-tokens POL,USDC \
--json| Flag | Description |
|---|---|
--limit-daily <n> | Daily spending limit |
--limit-per-tx <n> | Per-transaction spending limit |
--max-tx-per-day <n> | Max transactions per day |
--allowed-tokens <list> | Comma-separated token symbols |
--allowed-addresses <list> | Comma-separated address allowlist |
--require-approval-above <n> | Approval threshold (0 to clear) |
See Policy Engine for evaluation rules.
Polymarket
aw predict markets
Search Polymarket markets. No unlock required.
aw predict markets -q "bitcoin" --limit 5 --json| Flag | Required | Description |
|---|---|---|
-q, --query <query> | Yes | Search query |
--limit <n> | No | Max results (default: 10) |
{ "ok": true, "data": { "markets": [{ "id": "...", "question": "...", "yes_price": 0.65, "no_price": 0.35 }] } }aw predict buy
Buy a market outcome. Requires unlock.
aw predict buy \
--wallet bot \
--market mkt_abc \
--outcome yes \
--size 10 \
--price 0.4 \
--idempotency-key p1 \
--json| Flag | Required | Description |
|---|---|---|
--wallet <wallet> | Yes | Wallet (name, address, or UUID) |
--market <id> | Yes | Market ID |
--outcome <yes|no> | Yes | Outcome side |
--size <n> | Yes | Number of shares |
--price <n> | Yes | Price per share |
--idempotency-key <k> | No | Idempotency key (auto-generated if omitted) |
--dry-run | No | Validate without placing order |
aw predict sell
Sell an existing position. Requires unlock. Sell operations skip spending limits but enforce rate limits and allowlists.
aw predict sell \
--wallet bot \
--position pos_xyz \
--size 5 \
--idempotency-key p2 \
--json| Flag | Required | Description |
|---|---|---|
--wallet <wallet> | Yes | Wallet (name, address, or UUID) |
--position <id> | Yes | Position ID |
--size <n> | Yes | Number of shares |
--idempotency-key <k> | No | Idempotency key (auto-generated if omitted) |
--dry-run | No | Validate without placing order |
aw predict positions
List open positions. No unlock required.
aw predict positions --wallet bot --json{ "ok": true, "data": { "positions": [{ "id": "...", "market": "...", "outcome": "yes", "size": "10" }] } }aw predict orders
List orders. Requires unlock.
aw predict orders --wallet bot --json{ "ok": true, "data": { "orders": [{ "id": "...", "market": "...", "side": "buy", "size": "10", "price": "0.4" }] } }aw predict cancel
Cancel a pending order. Requires unlock.
aw predict cancel --wallet bot --order-id ord_abc123 --json| Flag | Required | Description |
|---|---|---|
--wallet <wallet> | Yes | Wallet (name, address, or UUID) |
--order-id <id> | Yes | Order ID to cancel |
aw predict approve-check
Check USDC.e approval status for Polymarket. Requires unlock and master password.
aw predict approve-check --wallet bot --json| Flag | Required | Description |
|---|---|---|
--wallet <wallet> | Yes | Wallet (name, address, or UUID) |
aw predict approve-set
Execute the 6 approval transactions required by Polymarket. Requires unlock and master password.
aw predict approve-set --wallet bot --json| Flag | Required | Description |
|---|---|---|
--wallet <wallet> | Yes | Wallet (name, address, or UUID) |
aw predict update-balance
Update the Polymarket balance for a wallet. Requires unlock.
aw predict update-balance --wallet bot --json| Flag | Required | Description |
|---|---|---|
--wallet <wallet> | Yes | Wallet (name, address, or UUID) |
aw predict ctf-split
Split USDC.e into Yes + No conditional tokens for a market. Requires unlock and master password.
aw predict ctf-split --wallet bot --condition 0xabc123... --amount 10 --json| Flag | Required | Description |
|---|---|---|
--wallet <wallet> | Yes | Wallet (name, address, or UUID) |
--condition <id> | Yes | Condition ID |
--amount <n> | Yes | Amount of USDC.e to split |
aw predict ctf-merge
Merge Yes + No conditional tokens back into USDC.e. Requires unlock and master password.
aw predict ctf-merge --wallet bot --condition 0xabc123... --amount 10 --json| Flag | Required | Description |
|---|---|---|
--wallet <wallet> | Yes | Wallet (name, address, or UUID) |
--condition <id> | Yes | Condition ID |
--amount <n> | Yes | Amount of tokens to merge |
aw predict ctf-redeem
Redeem conditional tokens after market settlement. Requires unlock and master password.
aw predict ctf-redeem --wallet bot --condition 0xabc123... --json| Flag | Required | Description |
|---|---|---|
--wallet <wallet> | Yes | Wallet (name, address, or UUID) |
--condition <id> | Yes | Condition ID |
aw predict bridge-deposit
Get the deposit address for bridging funds to Polymarket. Requires unlock.
aw predict bridge-deposit --wallet bot --json| Flag | Required | Description |
|---|---|---|
--wallet <wallet> | Yes | Wallet (name, address, or UUID) |
Keychain
aw keychain status
Check if the OS keychain is available and whether a password is stored.
aw keychain status --json{ "ok": true, "data": { "available": true, "stored": false } }aw keychain save
Save the master password to the OS keychain (macOS Keychain, Linux secret-tool, Windows DPAPI).
aw keychain save --jsonaw keychain remove
Remove the master password from the OS keychain.
aw keychain remove --jsonAudit
aw audit list
List audit log entries. Requires unlock. Entries form a SHA-256 hash chain for tamper detection.
aw audit list --wallet bot --action tx.send --limit 10 --json| Flag | Required | Description |
|---|---|---|
--wallet <wallet> | Yes | Wallet (name, address, or UUID) |
--action <action> | No | Filter by action (e.g., tx.send, predict.buy) |
--limit <n> | No | Max entries (default: 50) |
DEX Swaps
Token swaps via OKX DEX aggregator. See DeFi & Trading for full details.
aw swap chains— list supported chainsaw swap quote— get a swap quoteaw swap exec— execute a token swap
Cross-Chain Bridge
Bridge tokens between chains via OKX. See DeFi & Trading for full details.
aw bridge chains— list supported bridge routesaw bridge quote— get a bridge quoteaw bridge exec— execute a cross-chain bridgeaw bridge status— check bridge transaction status
Market Data
Query real-time market data. See DeFi & Trading for full details.
aw market price— get token pricesaw market candles— get OHLCV candle dataaw market trades— get recent trades
Token Discovery
Search and discover tokens. See DeFi & Trading for full details.
aw token search— search tokens by keywordaw token info— get token detailsaw token trending— get trending tokensaw token holders— get top token holders
On-Chain History
Query on-chain transaction history. See DeFi & Trading for full details.
aw history list— list on-chain transactions for a wallet
Perpetual Contracts
Trade perpetual contracts on Hyperliquid. See Perpetual Contracts for full details.
aw perp assets— list available assetsaw perp prices— get current pricesaw perp funding— get funding rate historyaw perp account— get account summaryaw perp positions— list open positionsaw perp orders— list open ordersaw perp open— open a positionaw perp close— close a positionaw perp cancel— cancel an order
Security Operations
aw security status
Check Security Guard status and active rules. No unlock required.
aw security status --json{
"ok": true,
"data": {
"security_guard": "active",
"red_line_rules": 7,
"yellow_line_rules": 7,
"blacklisted_addresses": 0,
"baseline_verified": true
}
}aw security blacklist add
Add an address to the blacklist. Requires unlock.
aw security blacklist add --address 0xBAD...123 --reason "Known scam" --json| Flag | Required | Description |
|---|---|---|
--address <addr> | Yes | Address to blacklist |
--reason <text> | No | Reason for blacklisting |
aw security blacklist remove
Remove an address from the blacklist. Requires unlock.
aw security blacklist remove --address 0xBAD...123 --jsonaw security blacklist list
List all blacklisted addresses. No unlock required.
aw security blacklist list --jsonaw security baseline init
Initialize a configuration baseline for tamper detection. Requires unlock.
aw security baseline init --json{
"ok": true,
"data": {
"baseline_hash": "sha256:abc123...",
"files_tracked": 5,
"created_at": "2026-03-15T10:00:00Z"
}
}aw security baseline verify
Verify the current configuration against the stored baseline.
aw security baseline verify --json{
"ok": true,
"data": {
"verified": true,
"baseline_hash": "sha256:abc123...",
"current_hash": "sha256:abc123..."
}
}aw security report
Generate a comprehensive security report. Requires unlock.
aw security report --json{
"ok": true,
"data": {
"security_score": 95,
"red_line_violations": 0,
"yellow_line_warnings": 2,
"anomalies_detected": 0,
"baseline_status": "verified",
"recommendations": ["Consider adding more addresses to the blacklist"]
}
}aw security anomaly
Run anomaly detection on a wallet's transaction patterns. Requires unlock.
aw security anomaly agent-01 --json{
"ok": true,
"data": {
"wallet": "agent-01",
"anomalies": [],
"patterns_analyzed": ["transaction_frequency", "amount_deviation", "time_of_day", "destination_diversity"],
"status": "clean"
}
}Command requirements
| Command | Init | Unlock | Password | Idempotency key |
|---|---|---|---|---|
aw init | — | — | create | — |
aw unlock | yes | — | yes | — |
aw lock | yes | — | — | — |
aw wallet create | yes | — | yes | — |
aw wallet list | yes | — | — | — |
aw wallet info | yes | — | — | — |
aw wallet balance | yes | — | — | — |
aw wallet deposit-address | yes | — | — | — |
aw wallet export-key | yes | — | yes | — |
aw wallet drain | yes | yes | yes | — |
aw send | yes | yes | yes | optional |
aw tx list | yes | — | — | — |
aw tx status | yes | — | — | — |
aw predict markets | yes | — | — | — |
aw predict positions | yes | — | — | — |
aw predict buy | yes | yes | yes | optional |
aw predict sell | yes | yes | yes | optional |
aw predict orders | yes | yes | — | — |
aw predict cancel | yes | yes | — | — |
aw predict approve-check | yes | yes | yes | — |
aw predict approve-set | yes | yes | yes | — |
aw predict update-balance | yes | yes | — | — |
aw predict ctf-split | yes | yes | yes | — |
aw predict ctf-merge | yes | yes | yes | — |
aw predict ctf-redeem | yes | yes | yes | — |
aw predict bridge-deposit | yes | yes | — | — |
aw policy show | yes | — | — | — |
aw policy set | yes | yes | — | — |
aw audit list | yes | yes | — | — |
aw swap chains | yes | — | — | — |
aw swap quote | yes | — | — | — |
aw swap exec | yes | yes | yes | optional |
aw bridge chains | yes | — | — | — |
aw bridge quote | yes | — | — | — |
aw bridge exec | yes | yes | yes | optional |
aw bridge status | yes | — | — | — |
aw market price | yes | — | — | — |
aw market candles | yes | — | — | — |
aw market trades | yes | — | — | — |
aw token search | yes | — | — | — |
aw token info | yes | — | — | — |
aw token trending | yes | — | — | — |
aw token holders | yes | — | — | — |
aw history list | yes | — | — | — |
aw perp assets | yes | — | — | — |
aw perp prices | yes | — | — | — |
aw perp funding | yes | — | — | — |
aw perp account | yes | yes | — | — |
aw perp positions | yes | yes | — | — |
aw perp orders | yes | yes | — | — |
aw perp open | yes | yes | yes | optional |
aw perp close | yes | yes | yes | optional |
aw perp cancel | yes | yes | — | — |
aw security status | yes | — | — | — |
aw security blacklist add | yes | yes | — | — |
aw security blacklist remove | yes | yes | — | — |
aw security blacklist list | yes | — | — | — |
aw security baseline init | yes | yes | — | — |
aw security baseline verify | yes | — | — | — |
aw security report | yes | yes | — | — |
aw security anomaly | yes | yes | — | — |
aw health | — | — | — | — |
aw keychain status | — | — | — | — |
aw keychain save | yes | — | yes | — |
aw keychain remove | — | — | — | — |