mcpField
S
solana-trader

solana-trader

github.com/solana-clawdOther1539 installsUpdated 39w ago
Repository

About solana-trader

Solana Trader is a skill for scanning token opportunities and trading on Solana. It combines market signals from DexScreener and GeckoTerminal with Jupiter swaps, wallet tools, and configurable monitoring and exit rules.

Key features

  1. 01Create and inspect Solana wallets
  2. 02Scan token pools and market signals
  3. 03Swap tokens through Jupiter
  4. 04Automated monitoring and position limits
  5. 05Take-profit, stop-loss, and trailing-stop rules

Use cases

  1. 01Finding trending or newly created token pools
  2. 02Executing a token swap on Solana
  3. 03Monitoring positions against configured exit rules
  4. 04Balancing a portfolio between SOL and USDC

MCP support

The skill provides solana_wallet, solana_swap, and solana_scan tools for an MCP-capable environment to use. The README does not specify MCP protocol details.

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/solana-clawd/openclaw-solana-plugins --skill solana-trader

After installing, type/solana-traderin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
strategy.md
scripts/
monitor.js
scan.js

Details

From the project README

Solana Trader Skill

This skill provides autonomous trading capabilities on the Solana blockchain using Jupiter for swaps and multiple data sources for opportunity scanning.

Quick Start

1. Create & Fund Wallet
Use the solana_wallet tool with action="create" to generate a new wallet.
Fund it with SOL at the provided address (minimum 0.1 SOL recommended).
2. Check Balance
Use solana_wallet with action="balance" to see SOL and token holdings.
3. Start Trading
Use solana_scan to find opportunities, then solana_swap to execute trades.

Available Tools

solana_wallet

Parameters: action (create | balance | address)

  • create: Generates a new Solana keypair and saves it
  • balance: Returns SOL balance and all token holdings
  • address: Returns the wallet's public key

Example:

{
  "action": "balance"
}
solana_swap

Parameters: inputToken, outputToken, amountUsd

Executes a token swap via Jupiter aggregator.

Supported tokens: SOL, USDC, USDT, RAY, SRM, or any valid mint address

Example:

{
  "inputToken": "USDC",
  "outputToken": "SOL", 
  "amountUsd": 10
}
solana_scan

Parameters: chain (optional), maxResults (optional, default 5)

Scans multiple sources for trading opportunities:

  • DexScreener boosted tokens (paid promotion = attention)
  • GeckoTerminal trending pools (momentum)
  • GeckoTerminal new pools (early discovery)

Returns scored opportunities with momentum, liquidity, and volume metrics.

Example:

{
  "chain": "solana",
  "maxResults": 10
}

Automated Trading

Running the Monitor

The trading monitor (scripts/monitor.js) can run autonomously via cron:

# Every 15 minutes during market hours
*/15 6-23 * * * cd ~/.openclaw/workspace && node skills/solana-trader/scripts/monitor.js
Configuration (Environment Variables)
export SOLANA_RPC_URL="https://api.mainnet-beta.solana.com"
export SOLANA_WALLET_PATH="~/.openclaw/workspace/solana-wallet.json"
export POSITION_SIZE_USD=10          # Max $ per trade
export MAX_POSITIONS=4               # Max concurrent positions
export MIN_SCORE=25                  # Minimum opportunity score
export TAKE_PROFIT_PCT=50            # Take profit at 50% gain
export STOP_LOSS_PCT=-25             # Stop loss at -25%
export TRAILING_STOP_PCT=15          # Trailing stop from peak

Trading Strategy

Entry Criteria

The system scores opportunities based on:

  1. Early Stage Bonus (30 pts max)

    • Micro cap FDV < $500k: +30 pts
    • Small cap FDV < $2M: +20 pts
    • Mid cap FDV < $10M: +10 pts
  2. Momentum (45 pts max)

    • Steady 5m rise (0-15%): +3 pts per %
    • Hourly momentum (0-30%): +2 pts per %
    • Acceleration bonus: +15 pts
  3. Volume/Liquidity Ratio (35 pts max)

    • High ratio (>2): +20 pts
    • Very high ratio (>5): +15 pts additional
  4. Buy Pressure (25 pts max)

    • Buy/sell ratio >1.3: +15 pts
    • Buy/sell ratio >2.0: +10 pts additional
Entry Penalties
  • Already pumped (5m >30%): -25 pts
  • Dumping (1h <-15%): -20 pts
  • Dead token (24h <-40%): -20 pts
  • Low liquidity (<$15k): -10 pts
  • Sell pressure (buy/sell <0.5): -15 pts
Exit Logic
  1. Take Profit: +50% gain
  2. Trailing Stop: If up >30%, exit if drops 15% from peak
  3. Stop Loss: -25% loss
  4. Momentum Death: 5m <-8% AND 1h <-15%
Risk Management
  • Maximum 4 concurrent positions
  • $3-10 position sizes (25% of available USDC)
  • Always keep $5+ liquid for gas/exits
  • Never risk more than you can afford to lose

Data Sources

DexScreener
  • Boosted tokens (paid promotion = attention)
  • Rich metadata (price, volume, liquidity, txns)
  • Rate limit: ~5 calls/second
GeckoTerminal
  • Trending pools (momentum plays)
  • New pools (early opportunities)
  • Rate limit: ~2 calls/second
Jupiter
  • Best execution routing
  • Ultra-light API for fast swaps
  • Handles slippage automatically

Files & State

State Management
  • trades.json - Trade history log
  • state.json - Portfolio state, positions, balances
  • solana-wallet.json - Encrypted wallet keypair
Monitoring
  • monitor.js - Main trading loop
  • scan.js - Standalone opportunity scanner
  • Strategy stats tracking (win/loss ratios, PnL by strategy)

Safety Notes

  • Start small ($5-20 positions) to test the system
  • Monitor for 24-48h before increasing size
  • Never commit more than you can afford to lose
  • Keep some SOL for transaction fees
  • Regularly backup your wallet file

The Solana trading ecosystem is fast-moving and high-risk. This system is designed for momentum plays on trending tokens, not long-term holding.

Advanced Features

SOL Swing Trading
  • Auto-buy SOL on >-7% daily drops
  • Auto-sell SOL on >+6% daily pumps
  • Maintains 0.2+ SOL base position
Portfolio Balancing
  • Automatically rebalances between SOL and USDC
  • Maintains minimum liquidity for new opportunities
  • Tracks total portfolio value vs starting point

Use responsibly and understand that token trading involves significant risk of loss.

Comments

Markdown supported