| name | standx-cli |
| description | Crypto trading CLI for StandX exchange v0.7.0. Use when users need to: (1) Query crypto market data (prices, order books, klines, funding rates), (2) Manage trading orders (create, cancel, view), (3) Check account balances, positions, and trade history, (4) Stream real-time market data via WebSocket, (5) Manage leverage and margin settings, (6) Monitor real-time dashboard, (7) View portfolio summary. Supports BTC, ETH, SOL, XRP and other trading pairs. |
| metadata | {"openclaw":{"emoji":"📈","requires":{"bins":["standx"]},"primaryCredential":{"kind":"env","env":"STANDX_JWT","description":"StandX JWT token from https://standx.com/user/session (valid 7 days)"},"optionalEnvVars":[{"name":"STANDX_PRIVATE_KEY","description":"Ed25519 private key (Base58) for trading operations","sensitive":true}],"install":[{"id":"brew","kind":"brew","formula":"wjllance/standx-cli/standx-cli","bins":["standx"],"label":"Install StandX CLI via Homebrew"}]}} |
StandX CLI Skill
StandX CLI is a crypto trading command-line tool for the StandX exchange.
Installation
Option 1: ClawHub (Recommended - Auto-install)
clawhub install standx-cli
Option 2: Homebrew
Security Note: This uses a third-party tap. You can inspect the formula before installing:
curl -sL https://raw.githubusercontent.com/wjllance/homebrew-standx-cli/main/standx-cli.rb
brew tap wjllance/standx-cli
brew install standx-cli
brew tap wjllance/standx-cli
brew install standx-cli
Quick Start
Check installation:
standx --version
View BTC price:
standx market ticker BTC-USD
standx m t BTC-USD
Command Short Aliases
StandX CLI supports short aliases for faster typing:
| Full Command | Short Alias |
|---|
standx market ticker | standx m t |
standx market depth | standx m d |
standx market kline | standx m k |
standx account balances | standx a b |
standx account positions | standx a p |
standx account orders | standx a o |
standx portfolio snapshot | standx p s |
standx dashboard --watch | standx d -w |
Authentication
Most commands require authentication. StandX CLI supports multiple secure authentication methods.
Environment Variables (Recommended)
The most secure way to authenticate. Credentials are not stored in shell history or command logs.
export STANDX_JWT="your_jwt_token"
export STANDX_PRIVATE_KEY="your_ed25519_private_key"
source ~/.bashrc
Security Best Practices:
- Never hardcode credentials in commands (appears in shell history)
- Never commit credentials to version control
- Set file permissions to 600 for any files containing credentials
- Rotate tokens regularly (they expire after 7 days)
Get Credentials
Visit https://standx.com/user/session to generate:
- JWT Token (required) - Valid for 7 days, used for reading account data
- Ed25519 Private Key (optional but recommended) - Required for trading operations
Verify Authentication
standx auth status
Alternative Authentication Methods
Interactive Login
For first-time setup or testing:
standx auth login --interactive
File-based Login
For automation scripts where environment variables are not available:
echo "your_jwt_token" > ~/.standx_token
echo "your_private_key" > ~/.standx_key
chmod 600 ~/.standx_token ~/.standx_key
standx auth login --token-file ~/.standx_token --key-file ~/.standx_key
⚠️ Avoid this in production:
standx auth login --token "your_token" --private-key "your_key"
Logout
standx auth logout
Market Data (No auth required)
List trading pairs
standx market symbols
Get ticker
standx market ticker BTC-USD
standx market ticker ETH-USD
Order book depth
standx market depth BTC-USD --limit 10
K-line (candlestick) data
standx market kline BTC-USD -r 60 --from 1d
standx market kline BTC-USD -r 1D --from 7d
standx market kline BTC-USD -r 60 --from 2024-01-01 --to 2024-01-07
Funding rate
standx market funding BTC-USD --days 7
Account & Trading (Auth required)
Account info
standx account balances
standx account positions
standx account orders
standx account history --limit 20
Create order
standx order create BTC-USD buy limit --qty 0.01 --price 60000
standx order create BTC-USD sell market --qty 0.01
Cancel order
standx order cancel BTC-USD --order-id 123456
standx order cancel-all BTC-USD
Trade history
standx trade history BTC-USD --from 7d
Dashboard & Portfolio (Auth required)
Real-time Dashboard
Interactive trading dashboard with auto-refresh:
standx dashboard --watch
standx dashboard --symbols BTC-USD,ETH-USD
standx dashboard --watch --interval 5
Dashboard Features:
- Real-time account balance display
- Active positions with PnL
- Open orders summary
- Order book depth visualization
- Recent trades panel (BUY/SELL)
- Auto-refresh with graceful exit (Ctrl+C)
Portfolio Snapshot
View portfolio summary and performance:
standx portfolio snapshot
standx p s
Leverage & Margin (Auth required)
standx leverage get BTC-USD
standx leverage set BTC-USD 10
standx margin mode BTC-USD
standx margin mode BTC-USD --set isolated
Real-time Streaming
Public streams (No auth)
standx stream price BTC-USD
standx stream depth BTC-USD --levels 5
standx stream trade BTC-USD
User streams (Auth required)
standx stream order
standx stream position
standx stream balance
standx stream fills
Output Formats
standx -o json market ticker BTC-USD
standx -o csv market symbols > symbols.csv
standx -o quiet config get base_url
Special Modes
OpenClaw mode (AI-optimized JSON)
standx --openclaw market ticker BTC-USD
Dry run (preview without executing)
standx --dry-run order create BTC-USD buy limit --qty 0.01 --price 60000
References
Links