solana-trader
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSolana Trader Skill
Solana Trader Skill
This skill provides autonomous trading capabilities on the Solana blockchain using Jupiter for swaps and multiple data sources for opportunity scanning.
本Skill在Solana区块链上提供自主交易能力,通过Jupiter执行代币兑换,并借助多数据源挖掘交易机会。
Quick Start
快速开始
1. Create & Fund Wallet
1. 创建并充值钱包
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).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
2. 查询余额
Use solana_wallet with action="balance" to see SOL and token holdings.Use solana_wallet with action="balance" to see SOL and token holdings.3. Start Trading
3. 开始交易
Use solana_scan to find opportunities, then solana_swap to execute trades.Use solana_scan to find opportunities, then solana_swap to execute trades.Available Tools
可用工具
solana_wallet
solana_walletsolana_wallet
solana_walletParameters: (create | balance | address)
action- 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:
json
{
"action": "balance"
}参数: (create | balance | address)
action- create:生成新的Solana密钥对并保存
- balance:返回SOL余额及所有代币持仓
- address:返回钱包公钥
示例:
json
{
"action": "balance"
}solana_swap
solana_swapsolana_swap
solana_swapParameters: , ,
inputTokenoutputTokenamountUsdExecutes a token swap via Jupiter aggregator.
Supported tokens: SOL, USDC, USDT, RAY, SRM, or any valid mint address
Example:
json
{
"inputToken": "USDC",
"outputToken": "SOL",
"amountUsd": 10
}参数:, ,
inputTokenoutputTokenamountUsd通过Jupiter聚合器执行代币兑换。
支持的代币:SOL, USDC, USDT, RAY, SRM, 或任何有效的铸币地址
示例:
json
{
"inputToken": "USDC",
"outputToken": "SOL",
"amountUsd": 10
}solana_scan
solana_scansolana_scan
solana_scanParameters: (optional), (optional, default 5)
chainmaxResultsScans 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:
json
{
"chain": "solana",
"maxResults": 10
}参数:(可选), (可选,默认值5)
chainmaxResults多数据源扫描交易机会:
- DexScreener推荐代币(付费推广=高关注度)
- GeckoTerminal热门资金池(动量交易机会)
- GeckoTerminal新资金池(早期入场机会)
返回带有动量、流动性和交易量指标的评分机会。
示例:
json
{
"chain": "solana",
"maxResults": 10
}Automated Trading
自动化交易
Running the Monitor
运行监控程序
The trading monitor () can run autonomously via cron:
scripts/monitor.jsbash
undefined交易监控程序()可通过cron实现自主运行:
scripts/monitor.jsbash
undefinedEvery 15 minutes during market hours
Every 15 minutes during market hours
*/15 6-23 * * * cd ~/.openclaw/workspace && node skills/solana-trader/scripts/monitor.js
undefined*/15 6-23 * * * cd ~/.openclaw/workspace && node skills/solana-trader/scripts/monitor.js
undefinedConfiguration (Environment Variables)
配置(环境变量)
bash
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 peakbash
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 peakTrading Strategy
交易策略
Entry Criteria
入场条件
The system scores opportunities based on:
-
Early Stage Bonus (30 pts max)
- Micro cap FDV < $500k: +30 pts
- Small cap FDV < $2M: +20 pts
- Mid cap FDV < $10M: +10 pts
-
Momentum (45 pts max)
- Steady 5m rise (0-15%): +3 pts per %
- Hourly momentum (0-30%): +2 pts per %
- Acceleration bonus: +15 pts
-
Volume/Liquidity Ratio (35 pts max)
- High ratio (>2): +20 pts
- Very high ratio (>5): +15 pts additional
-
Buy Pressure (25 pts max)
- Buy/sell ratio >1.3: +15 pts
- Buy/sell ratio >2.0: +10 pts additional
系统基于以下维度对机会评分:
-
早期阶段奖励(最高30分)
- 全流通市值 < $500k: +30分
- 全流通市值 < $2M: +20分
- 全流通市值 < $10M: +10分
-
动量指标(最高45分)
- 5分钟内稳定上涨(0-15%): 每涨1% +3分
- 1小时动量(0-30%): 每涨1% +2分
- 加速上涨奖励: +15分
-
交易量/流动性比率(最高35分)
- 高比率(>2): +20分
- 极高比率(>5): 额外+15分
-
买入压力(最高25分)
- 买/卖比率 >1.3: +15分
- 买/卖比率 >2.0: 额外+10分
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
- 已被大幅拉升(5分钟涨幅>30%): -25分
- 持续下跌(1小时跌幅<-15%): -20分
- 死亡代币(24小时跌幅<-40%): -20分
- 流动性不足(<$15k): -10分
- 卖出压力大(买/卖比率<0.5): -15分
Exit Logic
离场逻辑
- Take Profit: +50% gain
- Trailing Stop: If up >30%, exit if drops 15% from peak
- Stop Loss: -25% loss
- Momentum Death: 5m <-8% AND 1h <-15%
- 止盈:涨幅达50%时卖出
- 移动止损:涨幅超过30%后,从峰值回落15%时卖出
- 止损:跌幅达25%时卖出
- 动量衰竭:5分钟跌幅<-8% 且 1小时跌幅<-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
- 最多同时持有4个仓位
- 单仓位金额3-10美元(占可用USDC的25%)
- 始终保留5美元以上的流动性用于手续费和离场
- 永远不要投入超出你能承受损失的资金
Data Sources
数据源
DexScreener
DexScreener
- Boosted tokens (paid promotion = attention)
- Rich metadata (price, volume, liquidity, txns)
- Rate limit: ~5 calls/second
- 推荐代币(付费推广=高关注度)
- 丰富元数据(价格、交易量、流动性、交易次数)
- 速率限制: ~5次调用/秒
GeckoTerminal
GeckoTerminal
- Trending pools (momentum plays)
- New pools (early opportunities)
- Rate limit: ~2 calls/second
- 热门资金池(动量交易机会)
- 新资金池(早期入场机会)
- 速率限制: ~2次调用/秒
Jupiter
Jupiter
- Best execution routing
- Ultra-light API for fast swaps
- Handles slippage automatically
- 最优执行路径
- 轻量级API实现快速兑换
- 自动处理滑点
Files & State
文件与状态
State Management
状态管理
- - Trade history log
trades.json - - Portfolio state, positions, balances
state.json - - Encrypted wallet keypair
solana-wallet.json
- - 交易历史日志
trades.json - - 投资组合状态、持仓、余额
state.json - - 加密钱包密钥对
solana-wallet.json
Monitoring
监控相关
- - Main trading loop
monitor.js - - Standalone opportunity scanner
scan.js - Strategy stats tracking (win/loss ratios, PnL by strategy)
- - 主交易循环
monitor.js - - 独立的机会扫描程序
scan.js - 策略统计跟踪(胜率/败率、各策略盈亏)
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.
- 从小额仓位开始(5-20美元)测试系统
- 观察24-48小时后再增加仓位
- 永远不要投入超出你能承受损失的资金
- 保留一些SOL用于交易手续费
- 定期备份钱包文件
Solana交易生态发展迅速且风险极高。本系统专为热门代币的动量交易设计,不适合长期持有。
Advanced Features
高级功能
SOL Swing Trading
SOL波段交易
- Auto-buy SOL on >-7% daily drops
- Auto-sell SOL on >+6% daily pumps
- Maintains 0.2+ SOL base position
- 每日跌幅>7%时自动买入SOL
- 每日涨幅>6%时自动卖出SOL
- 维持0.2+ SOL的基础持仓
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.
- 自动在SOL和USDC之间再平衡
- 维持最低流动性以捕捉新机会
- 跟踪投资组合总价值与初始价值的变化
请谨慎使用,代币交易存在重大损失风险。