Skill: wjllance/standx-cli (version 0.5.0)

--- name: standx-cli description: "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 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. 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", }, { "id": "github-linux", "kind": "script", "script": "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", "bins": ["standx"], "label": "Install StandX CLI on Linux", }, { "id": "github-macos", "kind": "script", "script": "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", "bins": ["standx"], "label": "Install StandX CLI on macOS", }, { "id": "manual", "kind": "script", "script": "git clone https://github.com/wjllance/standx-cli-skill.git ~/.openclaw/skills/standx-cli && echo 'Skill installed. Please install standx binary separately via Homebrew or direct download.'", "bins": ["standx"], "label": "Manual install (skill only, binary separate)", }, ], }, } --- # StandX CLI Skill StandX CLI is a crypto trading command-line tool for the StandX exchange. ## Installation ### Option 1: ClawHub (Recommended - Auto-install) ```bash clawhub install standx-cli ``` ### Option 2: Homebrew ```bash brew tap wjllance/standx-cli brew install standx-cli ``` ### Option 3: Direct Download ```bash # 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: ```bash # 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: ```bash standx --version ``` View BTC price: ```bash 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. ```bash # 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 ```bash standx auth status ``` ### Alternative Authentication Methods #### Interactive Login For first-time setup or testing: ```bash standx auth login --interactive ``` #### File-based Login For automation scripts where environment variables are not available: ```bash # 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:** ```bash # DANGER: Credentials will be visible in shell history standx auth login --token "your_token" --private-key "your_key" ``` ### Logout ```bash standx auth logout ``` ## Market Data (No auth required) ### List trading pairs ```bash standx market symbols ``` ### Get ticker ```bash standx market ticker BTC-USD standx market ticker ETH-USD ``` ### Order book depth ```bash standx market depth BTC-USD --limit 10 ``` ### K-line (candlestick) data ```bash # 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 ```bash standx market funding BTC-USD --days 7 ``` ## Account & Trading (Auth required) ### Account info ```bash standx account balances standx account positions standx account orders standx account history --limit 20 ``` ### Create order ```bash # 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 ```bash standx order cancel BTC-USD --order-id 123456 standx order cancel-all BTC-USD ``` ### Trade history ```bash standx trade history BTC-USD --from 7d ``` ## Leverage & Margin (Auth required) ```bash # 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) ```bash # 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) ```bash standx stream order # Order updates standx stream position # Position updates standx stream balance # Balance updates standx stream fills # Fill updates ``` ## Output Formats ```bash # 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) ```bash standx --openclaw market ticker BTC-USD ``` ### Dry run (preview without executing) ```bash standx --dry-run order create BTC-USD buy limit --qty 0.01 --price 60000 ``` ## References - [API Documentation](references/api-docs.md) - [Command Examples](references/examples.md) - [Troubleshooting](references/troubleshooting.md) ## 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

path: README.md
content: # StandX CLI Skill

Crypto trading CLI skill for OpenClaw - StandX exchange integration.

## Quick Install

```bash
clawhub install standx-cli
```

## Documentation

- [SKILL.md](SKILL.md) - Full usage documentation
- [references/api-docs.md](references/api-docs.md) - API reference
- [references/examples.md](references/examples.md) - Command examples
- [references/troubleshooting.md](references/troubleshooting.md) - Troubleshooting guide

## Security

This skill requires authentication credentials. See [SKILL.md#authentication](SKILL.md#authentication) for secure configuration.

Required environment variables:
- `STANDX_JWT` - JWT token for API access
- `STANDX_PRIVATE_KEY` - Ed25519 private key for trading (optional for read-only)

## License

MIT


path: _meta.json
content: ownerId: kn73ys3xktsyr5my18yw666yd981xn2b
slug: standx-cli
version: 0.3.5
publishedAt: 1772083805220

path: openclaw/README.md
content: # OpenClaw Integration

This directory contains OpenClaw skill configuration for StandX CLI.

## Files

- `SKILL.md` - OpenClaw skill documentation
- `skill.json` - OpenClaw metadata (credentials, install methods)

## Quick Start for OpenClaw Users

```bash
# Install via ClawHub
clawhub install standx-cli

# Configure credentials
export STANDX_JWT="your_jwt_token"
export STANDX_PRIVATE_KEY="your_private_key"

# Start trading
standx market ticker BTC-USD
```

See [SKILL.md](SKILL.md) for complete documentation.


path: openclaw/skill.json
content: {
  "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"
      },
      {
        "id": "github-linux",
        "kind": "script",
        "script": "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",
        "bins": ["standx"],
        "label": "Install StandX CLI on Linux"
      },
      {
        "id": "github-macos",
        "kind": "script",
        "script": "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",
        "bins": ["standx"],
        "label": "Install StandX CLI on macOS"
      }
    ]
  }
}


path: package.json
content: {
  "name": "standx-cli",
  "version": "0.3.5",
  "description": "Crypto trading CLI for StandX exchange with OpenClaw integration",
  "author": "wjllance",
  "license": "MIT",
  "repository": {
    "type": "git",
    "url": "https://github.com/wjllance/standx-cli-skill.git"
  },
  "openclaw": {
    "minVersion": "0.5.0",
    "categories": ["finance", "trading", "crypto"],
    "keywords": ["standx", "crypto", "trading", "btc", "eth", "perpetual", "futures"]
  }
}


path: references/api-docs.md
content: # StandX CLI API Documentation

## Base URL

```
https://perps.standx.com
```

## Public Endpoints

### GET /api/query_symbol_info
List all trading pairs.

### GET /api/query_symbol_market
Get ticker for a symbol.

**Parameters:**
- `symbol` (required): Trading pair, e.g., "BTC-USD"

### GET /api/query_depth_book
Get order book depth.

**Parameters:**
- `symbol` (required): Trading pair
- `limit` (optional): Depth levels, default 10

### GET /api/kline/history
Get K-line (candlestick) data.

**Parameters:**
- `symbol` (required): Trading pair
- `resolution` (required): Time period (1, 5, 15, 30, 60, 240, 720, 1D, 1W, 1M)
- `from` (required): Start timestamp (Unix seconds)
- `to` (required): End timestamp (Unix seconds)

**Response format:**
```json
{
  "s": "ok",
  "t": [timestamp1, timestamp2, ...],
  "o": [open1, open2, ...],
  "h": [high1, high2, ...],
  "l": [low1, low2, ...],
  "c": [close1, close2, ...],
  "v": [volume1, volume2, ...]
}
```

### GET /api/query_funding_rates
Get funding rate history.

**Parameters:**
- `symbol` (required): Trading pair
- `start_time` (required): Start timestamp (Unix milliseconds)
- `end_time` (required): End timestamp (Unix milliseconds)

## Authenticated Endpoints

All authenticated endpoints require:
- `Authorization: Bearer <JWT_TOKEN>` header
- Ed25519 request signature for trading operations

### GET /api/query_balance
Get account balances.

### GET /api/query_positions
Get positions.

**Parameters:**
- `symbol` (optional): Filter by trading pair

### GET /api/query_open_orders
Get open orders.

### GET /api/query_orders
Get order history.

**Parameters:**
- `status` (optional): "filled" for completed orders
- `symbol` (optional): Filter by trading pair
- `limit` (optional): Number of results

### POST /api/order/create
Create a new order.

**Request body:**
```json
{
  "symbol": "BTC-USD",
  "side": "buy",
  "order_type": "limit",
  "qty": "0.01",
  "price": "60000",
  "time_in_force": "gtc"
}
```

### POST /api/order/cancel
Cancel an order.

### GET /api/query_trades
Get trade history.

### GET /api/query_position_config
Get position configuration (leverage, margin mode).

### POST /api/change_leverage
Change leverage for a symbol.

### POST /api/change_margin_mode
Change margin mode (cross/isolated).

## WebSocket

**URL:** `wss://perps.standx.com/ws-stream/v1`

### Public Channels
- `price` - Price ticker
- `depth_book` - Order book depth
- `public_trade` - Public trades

### User Channels (requires auth)
- `order` - Order updates
- `position` - Position updates
- `balance` - Balance updates
- `fill` - Fill/trade updates

### Authentication Message
```json
{
  "auth": {
    "token": "Bearer <JWT_TOKEN>",
    "streams": [
      {"channel": "order"},
      {"channel": "position"}
    ]
  }
}
```


path: references/examples.md
content: # StandX CLI Command Examples

## Market Data Examples

### Get all trading pairs
```bash
standx market symbols
```

### Get BTC price in different formats
```bash
# Table (default)
standx market ticker BTC-USD

# JSON
standx -o json market ticker BTC-USD

# CSV
standx -o csv market ticker BTC-USD

# Quiet (just the price)
standx -o quiet market ticker BTC-USD
```

### Get order book
```bash
# Default 10 levels
standx market depth BTC-USD

# Custom 5 levels
standx market depth BTC-USD --limit 5

# Best bid/ask only
standx -o quiet market depth BTC-USD
```

### K-line data with time formats
```bash
# Relative time - last 24 hours, hourly
standx market kline BTC-USD -r 60 --from 1d

# Relative time - last 7 days, daily
standx market kline BTC-USD -r 1D --from 7d

# ISO date range
standx market kline BTC-USD -r 60 --from 2024-01-01 --to 2024-01-07

# Unix timestamps
standx market kline BTC-USD -r 60 --from 1704067200 --to 1706659200

# Limit results
standx market kline BTC-USD -r 60 --from 7d -l 10
```

### Different resolutions
```bash
# 1 minute
standx market kline BTC-USD -r 1 --from 1h

# 5 minutes
standx market kline BTC-USD -r 5 --from 6h

# 15 minutes
standx market kline BTC-USD -r 15 --from 1d

# 1 hour
standx market kline BTC-USD -r 60 --from 7d

# 4 hours
standx market kline BTC-USD -r 240 --from 30d

# 1 day
standx market kline BTC-USD -r 1D --from 90d

# 1 week
standx market kline BTC-USD -r 1W --from 1y
```

## Trading Examples

### Create orders
```bash
# Limit buy
standx order create BTC-USD buy limit --qty 0.01 --price 60000

# Limit sell
standx order create BTC-USD sell limit --qty 0.01 --price 70000

# Market buy
standx order create BTC-USD buy market --qty 0.01

# Market sell
standx order create BTC-USD sell market --qty 0.01

# With stop loss and take profit
standx order create BTC-USD buy limit \
  --qty 0.01 \
  --price 60000 \
  --sl-price 55000 \
  --tp-price 70000

# IOC (Immediate or Cancel)
standx order create BTC-USD buy limit --qty 0.01 --price 60000 --tif IOC

# Reduce only
standx order create BTC-USD sell limit --qty 0.01 --price 65000 --reduce-only
```

### Cancel orders
```bash
# Cancel specific order
standx order cancel BTC-USD --order-id 123456

# Cancel all orders for symbol
standx order cancel-all BTC-USD
```

### View orders
```bash
# Open orders
standx account orders

# Open orders for specific symbol
standx account orders --symbol BTC-USD

# Order history
standx account history

# Order history with limit
standx account history --limit 50
```

### Trade history
```bash
# Last 24 hours
standx trade history BTC-USD --from 1d

# Last 7 days
standx trade history BTC-USD --from 7d

# Date range
standx trade history BTC-USD --from 2024-01-01 --to 2024-01-31

# Export to CSV
standx -o csv trade history BTC-USD --from 30d > trades.csv
```

## Account Examples

### Check balances
```bash
standx account balances
```

### Check positions
```bash
# All positions
standx account positions

# Specific symbol
standx account positions --symbol BTC-USD
```

## Leverage & Margin Examples

### Query leverage
```bash
standx leverage get BTC-USD
```

### Set leverage
```bash
standx leverage set BTC-USD 10
standx leverage set BTC-USD 20
```

### Margin mode
```bash
# Query
standx margin mode BTC-USD

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

# Set to cross
standx margin mode BTC-USD --set cross
```

## Streaming Examples

### Public streams
```bash
# 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 (requires auth)
```bash
# Order updates
standx stream order

# Position updates
standx stream position

# Balance updates
standx stream balance

# Fill updates
standx stream fills
```

## Special Features

### OpenClaw mode (AI-optimized)
```bash
standx --openclaw market ticker BTC-USD
standx --openclaw account balances
standx --openclaw trade history BTC-USD --from 7d
```

### Dry run (preview)
```bash
# Preview order creation
standx --dry-run order create BTC-USD buy limit --qty 0.01 --price 60000

# Preview leverage change
standx --dry-run leverage set BTC-USD 20
```

### Combined options
```bash
# OpenClaw + Dry Run
standx --openclaw --dry-run order create BTC-USD buy limit --qty 0.01 --price 60000

# JSON output + limit
standx -o json market kline BTC-USD -r 60 --from 1d -l 5
```

## Scripting Examples

### Get current price in script
```bash
PRICE=$(standx -o quiet market ticker BTC-USD)
echo "Current BTC price: $PRICE"
```

### Check if authenticated
```bash
if standx auth status | grep -q "Authenticated"; then
  echo "Logged in"
else
  echo "Not logged in"
fi
```

### Monitor price changes
```bash
while true; do
  PRICE=$(standx -o quiet market ticker BTC-USD)
  echo "$(date): BTC = $PRICE"
  sleep 60
done
```


path: references/troubleshooting.md
content: # StandX CLI Troubleshooting

## Installation Issues

### Command not found

```bash
# Check if installed
which standx

# If not found, try:
# 1. Homebrew
brew tap wjllance/standx-cli
brew install standx-cli

# 2. Direct download (Linux)
curl -L -o standx.tar.gz https://github.com/wjllance/standx-cli/releases/latest/download/standx-linux-x86_64.tar.gz
tar -xzf standx.tar.gz
sudo mv standx /usr/local/bin/

# 3. Direct download (macOS)
curl -L -o standx.tar.gz https://github.com/wjllance/standx-cli/releases/latest/download/standx-macos-aarch64.tar.gz
tar -xzf standx.tar.gz
sudo mv standx /usr/local/bin/
```

## Authentication Issues

### "Not authenticated" error

**Solution:** Configure environment variables or login

```bash
# Recommended: Environment variables
export STANDX_JWT="your_jwt_token"
export STANDX_PRIVATE_KEY="your_private_key"

# Verify
standx auth status
```

### Environment variables not working

**Check if variables are set:**

```bash
echo $STANDX_JWT
echo $STANDX_PRIVATE_KEY
```

**Common causes:**

1. **Shell not reloaded after editing rc file**
   ```bash
   source ~/.bashrc  # or ~/.zshrc
   ```

2. **Wrong variable name**
   - Correct: `STANDX_JWT`
   - Wrong: `STANDX_TOKEN`, `JWT_TOKEN`

3. **Running in subshell or script**
   - Variables must be exported: `export VAR=value`
   - Check with `env | grep STANDX`

4. **Running via sudo**
   - Environment variables are stripped by sudo
   - Use `sudo -E` or configure in root's environment

### "Token expired" error

**Solution:** Get new token from https://standx.com/user/session and update environment variable

```bash
# Update in shell config
export STANDX_JWT="new_token"

# Reload
source ~/.bashrc

# Verify
standx auth status
```

### "Private key required" error

**Solution:** Trading operations require Ed25519 private key

```bash
# Add private key to environment
export STANDX_PRIVATE_KEY="your_private_key"

# Or login interactively
standx auth login --interactive
```

### Credentials visible in shell history

**Problem:** You used `standx auth login --token "xxx" --private-key "yyy"`

**Solution:**

1. **Clear history immediately:**
   ```bash
   history -d $(history 1)
   # or clear all
   history -c
   ```

2. **Switch to environment variables:**
   ```bash
   # Add to ~/.bashrc or ~/.zshrc
   export STANDX_JWT="your_token"
   export STANDX_PRIVATE_KEY="your_key"
   ```

3. **Use file-based login for scripts:**
   ```bash
   standx auth login --token-file ~/.standx_token --key-file ~/.standx_key
   ```

### Permission denied on credential files

**Solution:** Set proper permissions

```bash
chmod 600 ~/.standx_token ~/.standx_key
chmod 700 ~/.config/standx
```

## API Issues

### "HTTP request failed" error

**Possible causes:**

1. Network connectivity
2. API endpoint unavailable
3. Rate limiting

**Solutions:**

```bash
# Check network
ping perps.standx.com

# Check API status
curl https://perps.standx.com/api/query_symbol_info

# Wait and retry
sleep 5 && standx market ticker BTC-USD
```

### "Symbol not found" error

**Solution:** Check available symbols

```bash
standx market symbols
```

### K-line "no_data" response

**Cause:** No data available for the requested time range

**Solution:** Try different time range

```bash
# Use relative time
standx market kline BTC-USD -r 60 --from 1d

# Or use limit instead of from/to
standx market kline BTC-USD -r 60 -l 10
```

## WebSocket Issues

### "invalid token" for user streams

**Status:** Known issue [#3](https://github.com/wjllance/standx-cli/issues/3)

**Workaround:** Use public streams or check token validity

```bash
# Public streams work without auth
standx stream price BTC-USD
standx stream depth BTC-USD
standx stream trade BTC-USD
```

### Connection drops

**Solution:** CLI auto-reconnects, no action needed. For debugging:

```bash
standx -v stream price BTC-USD
```

## Output Issues

### JSON parsing errors

**Solution:** Check if output is valid JSON

```bash
standx -o json market ticker BTC-USD | jq .
```

### CSV format issues

**Solution:** Ensure proper encoding

```bash
export LANG=en_US.UTF-8
standx -o csv market symbols
```

## Performance Issues

### Slow response

**Possible causes:**

1. Network latency
2. API rate limiting
3. Large data queries

**Solutions:**

```bash
# Use limit to reduce data
standx market kline BTC-USD -r 60 --from 1d -l 10

# Use quiet mode for faster output
standx -o quiet market ticker BTC-USD
```

## Security Best Practices

### Credential Storage

| Method | Security | Use Case |
|--------|----------|----------|
| Environment variables | ⭐⭐⭐ High | Development, interactive use |
| File with 600 permissions | ⭐⭐⭐ High | Automation scripts |
| Command line args | ⭐ Low (leaks to history) | Avoid in production |

### Recommended Setup

```bash
# 1. Create secure directory
mkdir -p ~/.config/standx
chmod 700 ~/.config/standx

# 2. Add to shell config (~/.bashrc or ~/.zshrc)
export STANDX_JWT="your_jwt_token"
export STANDX_PRIVATE_KEY="your_private_key"

# 3. Reload
source ~/.bashrc

# 4. Verify
standx auth status
```

### Rotating Credentials

JWT tokens expire after 7 days. Set a reminder to rotate:

```bash
# Check expiration
standx auth status

# When expired, get new token and update environment
export STANDX_JWT="new_token"
```

## Getting Help

### Check version

```bash
standx --version
```

### View help

```bash
standx --help
standx market --help
standx order create --help
```

### GitHub Issues

https://github.com/wjllance/standx-cli/issues

### Documentation

https://github.com/wjllance/standx-cli/tree/main/docs


path: skill.json
content: {
  "name": "standx-cli",
  "version": "0.5.0",
  "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"
      },
      {
        "id": "github-linux",
        "kind": "script",
        "script": "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",
        "bins": ["standx"],
        "label": "Install StandX CLI on Linux"
      },
      {
        "id": "github-macos",
        "kind": "script",
        "script": "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",
        "bins": ["standx"],
        "label": "Install StandX CLI on macOS"
      },
      {
        "id": "manual",
        "kind": "script",
        "script": "git clone https://github.com/wjllance/standx-cli-skill.git ~/.openclaw/skills/standx-cli && echo 'Skill installed. Please install standx binary separately via Homebrew or direct download.'",
        "bins": ["standx"],
        "label": "Manual install (skill only, binary separate)"
      }
    ]
  }
}


Security scan verdicts — ClawScan: suspicious | static analysis: clean | VirusTotal: suspicious | SkillSpector: suspicious (CRITICAL)