Skip to content

Von-Labs/openclaw-solana-plugins

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

OpenClaw Solana Wallet Plugin

Add Solana wallet capabilities to any OpenClaw agent with autonomous trading features.

Installation

openclaw plugins install @solana-clawd/solana-wallet

Features

πŸͺ™ Wallet Management

  • Create new Solana wallets
  • Check SOL and token balances
  • Secure keypair storage

πŸ”„ Token Swapping

  • Jupiter aggregator integration
  • Best price execution
  • Support for major tokens (SOL, USDC, USDT, etc.)

πŸ“Š Opportunity Scanning

  • Multi-source token discovery
  • Momentum-based scoring
  • DexScreener & GeckoTerminal integration

πŸ€– Autonomous Trading

  • Configurable trading monitor
  • Risk management & stop losses
  • Performance tracking

Quick Start

1. Create Wallet

await tools.solana_wallet({ action: "create" })

2. Check Balance

await tools.solana_wallet({ action: "balance" })

3. Execute Swap

await tools.solana_swap({ 
  inputToken: "USDC", 
  outputToken: "SOL", 
  amountUsd: 10 
})

4. Scan Opportunities

await tools.solana_scan({ maxResults: 5 })

Configuration

Configure via plugin settings or environment variables:

export SOLANA_RPC_URL="https://api.mainnet-beta.solana.com"
export SOLANA_WALLET_PATH="~/.openclaw/workspace/solana-wallet.json"
export SOLANA_AUTO_CREATE="true"

Trading Monitor

Run autonomous trading with the included monitor script:

# Manual execution
cd ~/.openclaw/workspace
node skills/solana-trader/scripts/monitor.js

# Automated via cron (every 15 minutes)
*/15 * * * * cd ~/.openclaw/workspace && node skills/solana-trader/scripts/monitor.js

Trading Configuration

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

Agent Tools

solana_wallet

Manage wallet operations

  • action: "create" - Generate new keypair
  • action: "balance" - Check SOL + token balances
  • action: "address" - Get wallet public key

solana_swap

Execute token swaps via Jupiter

  • inputToken: string - Input token (SOL, USDC, mint address)
  • outputToken: string - Output token
  • amountUsd: number - USD amount to swap

solana_scan

Scan for trading opportunities

  • chain?: string - Blockchain (default: solana)
  • maxResults?: number - Max results (default: 5)

CLI Commands

# Show wallet info
openclaw solana

Trading Strategy

The monitor implements a momentum-based strategy targeting early-stage tokens:

Entry Criteria:

  • Multi-source opportunity scanning (DexScreener, GeckoTerminal)
  • Momentum scoring (price changes, volume, liquidity)
  • Risk filters (minimum liquidity, maximum exposure)

Exit Rules:

  • Take profit: +50% gains
  • Stop loss: -25% losses
  • Trailing stop: 15% from peak
  • Momentum death: Technical breakdown

Risk Management:

  • Maximum 4 concurrent positions
  • $3-10 position sizing
  • Portfolio exposure limits
  • Automated state tracking

File Structure

openclaw-plugin-solana/
β”œβ”€β”€ openclaw.plugin.json     # Plugin manifest
β”œβ”€β”€ package.json             # npm package  
β”œβ”€β”€ index.ts                 # Plugin entry point
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ wallet.ts            # Wallet operations
β”‚   β”œβ”€β”€ swap.ts              # Jupiter integration
β”‚   └── tools.ts             # Agent tool definitions
β”œβ”€β”€ skills/
β”‚   └── solana-trader/
β”‚       β”œβ”€β”€ SKILL.md         # Trading skill guide
β”‚       β”œβ”€β”€ scripts/
β”‚       β”‚   β”œβ”€β”€ monitor.js   # Trading monitor
β”‚       β”‚   └── scan.js      # Opportunity scanner
β”‚       └── references/
β”‚           └── strategy.md  # Strategy documentation
└── README.md

Safety & Disclaimers

⚠️ Trading cryptocurrencies involves substantial risk of loss.

  • Start with small amounts ($5-20 positions)
  • Never risk more than you can afford to lose
  • Monitor performance before increasing position sizes
  • Keep private keys secure and backed up
  • This software is provided "as is" without warranty

Development

# Install dependencies
npm install

# Build TypeScript
npm run build

# Run tests
npm test

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

License

MIT License - see LICENSE for details.

Links

About

OpenClaw Solana Wallet Plugin - Add Solana wallet capabilities to any OpenClaw agent

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 53.7%
  • TypeScript 46.3%