← 返回
开发者工具 Key 中文

Standx Cli

Crypto trading CLI for StandX exchange v0.3.5. Use when users need to: (1) Query crypto market data (prices, order books, klines, funding rates), (2) Manage...
StandX交易所v0.3.5版加密交易CLI。用于:(1) 查询加密市场数据(价格、订单簿、K线、资金费率),(2) 管理...
wjllance wjllance 来源
开发者工具 clawhub v0.5.0 1 版本 99893 Key: 需要
★ 0
Stars
📥 934
下载
💾 8
安装
1
版本
#latest

概述

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

brew tap wjllance/standx-cli
brew install standx-cli

Option 3: Direct Download

# Linux x86_64
curl -L -o /tmp/standx.tar.gz https://github.com/wjllance/standx-cli/releases/download/v0.3.5/standx-v0.3.5-x86_64-unknown-linux-gnu.tar.gz
tar -xzf /tmp/standx.tar.gz -C /tmp
sudo mv /tmp/standx /usr/local/bin/
sudo chmod +x /usr/local/bin/standx

# macOS Apple Silicon
curl -L -o /tmp/standx.tar.gz https://github.com/wjllance/standx-cli/releases/download/v0.3.5/standx-v0.3.5-aarch64-apple-darwin.tar.gz
tar -xzf /tmp/standx.tar.gz -C /tmp
sudo mv /tmp/standx /usr/local/bin/
sudo chmod +x /usr/local/bin/standx

Option 4: Manual Install (Skill Only)

If you prefer to install the skill manually and manage the binary separately:

# Install skill
git clone https://github.com/wjllance/standx-cli-skill.git ~/.openclaw/skills/standx-cli

# Then install binary separately via Homebrew or direct download (see Option 2 or 3)

Quick Start

Check installation:

standx --version

View BTC price:

standx market ticker BTC-USD

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.

# Add to ~/.bashrc or ~/.zshrc
export STANDX_JWT="your_jwt_token"
export STANDX_PRIVATE_KEY="your_ed25519_private_key"

# Reload shell configuration
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:

# Store credentials in files with restricted permissions
echo "your_jwt_token" > ~/.standx_token
echo "your_private_key" > ~/.standx_key
chmod 600 ~/.standx_token ~/.standx_key

# Login using files
standx auth login --token-file ~/.standx_token --key-file ~/.standx_key

⚠️ Avoid this in production:

# DANGER: Credentials will be visible in shell history
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

# Last 24 hours, 1-hour candles
standx market kline BTC-USD -r 60 --from 1d

# Last 7 days, daily candles
standx market kline BTC-USD -r 1D --from 7d

# Specific date range
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

# Limit buy
standx order create BTC-USD buy limit --qty 0.01 --price 60000

# Market sell
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

Leverage & Margin (Auth required)

# Query leverage
standx leverage get BTC-USD

# Set leverage
standx leverage set BTC-USD 10

# Query margin mode
standx margin mode BTC-USD

# Set margin mode
standx margin mode BTC-USD --set isolated

Real-time Streaming

Public streams (No auth)

# Price stream
standx stream price BTC-USD

# Order book stream
standx stream depth BTC-USD --levels 5

# Trade stream
standx stream trade BTC-USD

User streams (Auth required)

standx stream order     # Order updates
standx stream position  # Position updates
standx stream balance   # Balance updates
standx stream fills     # Fill updates

Output Formats

# JSON output
standx -o json market ticker BTC-USD

# CSV export
standx -o csv market symbols > symbols.csv

# Quiet mode (just values)
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

  • GitHub: https://github.com/wjllance/standx-cli
  • Docs: https://github.com/wjllance/standx-cli/tree/main/docs
  • Issues: https://github.com/wjllance/standx-cli/issues

版本历史

共 1 个版本

  • v0.5.0 当前
    2026-03-29 12:35 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

professional

All-Market Financial Data Hub

financial-ai-analyst
基于东方财富数据库,支持自然语言查询金融数据,覆盖A股、港股、美股、基金、债券等资产,提供实时行情、公司信息、估值、财务报表等,适用于投资研究、交易复盘、市场监控、行业分析、信用研究、财报审计、资产配置等场景,满足机构与个人需求。返回结果为
★ 118 📥 40,930
professional

Stock Market Pro

kys42
Yahoo Finance (yfinance) 驱动的股票分析技能:行情报价、基本面、ASCII 趋势图、高分辨率图表(RSI/MACD/BB/VWAP/ATR),以及可选的网络...
★ 161 📥 39,926
professional

Stock Analysis

udiedrichsen
{"answer":"基于雅虎财经数据,分析股票与加密货币。支持投资组合管理、自选股预警、股息分析、8维评分、热门趋势扫描及传闻/早期信号探测。适用于股票分析、持仓追踪、财报异动、加密监控、热门股追踪或提前发掘非主流传闻。"}
★ 273 📥 57,291