clawdex

Trade tokens on Solana using the ClawDex CLI. Use when the user asks to swap tokens, check balances, get quotes, or manage a Solana trading wallet.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "clawdex" with this command: npx skills add davidpolotm/mi-trading

ClawDex — Solana DEX Trading Skill

Trade any Solana token through Jupiter aggregator with simulation, safety guardrails, and full JSON output.

Prerequisites

Before using this skill, ensure ClawDex is installed and configured:

which clawdex || npm install -g clawdex@latest

If not configured yet, run onboarding:

clawdex status --json

If status fails, set up with:

clawdex onboarding \
  --jupiter-api-key "$JUPITER_API_KEY" \
  --rpc "${SOLANA_RPC_URL:-https://api.mainnet-beta.solana.com}" \
  --wallet ~/.config/solana/id.json \
  --json

Commands

Check wallet balances

clawdex balances --json

Returns an array of { token, symbol, mint, balance, decimals } objects. Zero-balance accounts are included in JSON output.

Get a quote (no execution)

clawdex quote --in SOL --out USDC --amount 0.01 --json

Lightweight price check — no simulation, no wallet needed.

Simulate a swap (dry run)

clawdex swap --in SOL --out USDC --amount 0.01 --simulate-only --json

Runs full simulation on-chain without broadcasting. Does not require --yes. Use this to preview the output amount and route before committing.

Execute a swap

clawdex swap --in SOL --out USDC --amount 0.01 --yes --json

--yes is required for non-interactive execution. Without it, ClawDex exits with code 1.

Health check

clawdex status --json

Verify RPC connectivity, wallet validity, and config state.

Trading Workflow

Always follow this sequence:

  1. Health checkclawdex status --json — abort if rpc.healthy is false
  2. Check balancesclawdex balances --json — verify sufficient funds
  3. Simulateclawdex swap --simulate-only --json — preview the trade
  4. Executeclawdex swap --yes --json — only if simulation looks good
  5. Verifyclawdex balances --json — confirm balances updated (may need 5s delay on public RPC)

Token Specification

Tokens can be passed by symbol or mint address:

  • By symbol: SOL, USDC, USDT
  • By mint: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v

Exit Codes

CodeMeaningAgent action
0SuccessContinue
1General errorCheck message
2Config errorRun onboarding
3Safety violationReduce amount or adjust limits
4Simulation failedTry different pair/amount
5Send failedRetry with backoff

Safety

Set guardrails to prevent runaway trades:

clawdex safety set max_slippage_bps=300 max_trade_sol=1 max_price_impact_bps=100

When a guardrail triggers, the JSON response includes a violations array describing what failed.

Important Rules

  • Always use --json for machine-parseable output
  • Always use --yes for real swaps (not needed for --simulate-only)
  • Never skip simulation unless you have a good reason — use --simulate-only first
  • Parse balance as a string, not a number — it preserves full decimal precision
  • Check exit codes — non-zero means the trade did not succeed
  • Wait before verifying — RPC balance reads can lag a few seconds after a swap

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Web3

Solana Easy Swap

Swap any Solana token from chat. Say 'swap 1 SOL for USDC' and it handles everything — quoting, signing, sending, confirming. No API keys, no wallet extensions, no setup beyond a keypair. Powered by Jupiter. Use when a user wants to swap, trade, exchange, buy, or sell Solana SPL tokens, SOL, USDC, memecoins, or any token pair on Solana.

Registry SourceRecently Updated
5050Profile unavailable
Web3

Solana Copy Trader

Solana whale copy trading bot. Track any wallet, copy trades in real-time via Jupiter + Pump.fun APIs, with paper trading simulation and live execution. Use...

Registry SourceRecently Updated
4310Profile unavailable
Web3

Openpump Solana Mcp

Solana token launch and trading tools via the OpenPump MCP server. Creates tokens on pump.fun, buys and sells tokens, runs market-making bots, snipes new tok...

Registry SourceRecently Updated
1730Profile unavailable
Web3

KryptoGO Meme Trader

Analyze and trade meme coins using KryptoGO's on-chain cluster analysis platform. Covers wallet clustering, address labels, accumulation/distribution detecti...

Registry SourceRecently Updated
4222Profile unavailable
clawdex | V50.AI