smart-money-signal-copy-trade
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSmart Money Signal Copy Trade v1.0
Smart Money 信号跟单交易 v1.0
This is a real trading bot. Make sure you understand the risks before use. It is recommended to test in Paper Mode first.
这是一个真实的交易机器人。使用前请务必了解风险。建议先在模拟模式(Paper Mode)下测试。
Disclaimer
免责声明
This strategy script, parameter configuration, and all related documentation are provided solely for educational research and technical reference purposes. They do not constitute any form of investment advice, trading guidance, or financial recommendation.
- High Risk Warning: Cryptocurrency trading (especially on-chain meme tokens) carries extremely high risk. Prices may fluctuate drastically or drop to zero within seconds. You may lose all invested capital.
- Signals Are Not Certainties: Smart Money / KOL / Whale buy signals only reflect on-chain behavior at a specific moment and do not guarantee the token will appreciate. Signal sources may have delays, misjudgments, or manipulation. Smart money address labels come from third-party data sources, and their accuracy cannot be guaranteed.
- Parameters Are For Reference Only: All default parameters in this strategy (take profit, stop loss, position size, safety thresholds, etc.) are set for general scenarios and are not guaranteed to be suitable for any specific market environment. Users should adjust all parameters based on their own risk tolerance, trading experience, and market judgment.
- User Customization Encouraged: Users are encouraged to deeply understand the meaning of each parameter and modify them according to their own strategy logic and risk preferences. Every parameter in is annotated with comments for easy customization.
config.py - No Profit Guarantee: Past performance does not represent future results. Even parameters that perform well in backtesting may fail in live trading due to changing market conditions.
- Technical Risk: On-chain transactions are irreversible. Smart contracts may contain vulnerabilities. Network congestion may cause transaction delays or failures.
- Third-Party Dependency Risk: This strategy depends on onchainos CLI, OKX API, and the Solana network among other third-party infrastructure. Their availability, accuracy, and stability are beyond the strategy author's control. Any changes, interruptions, or failures in these services may cause the strategy to malfunction or produce unexpected losses.
- Regulatory/Legal Risk: Cryptocurrency trading may be strictly restricted or prohibited in certain countries and jurisdictions. Users should independently verify and ensure compliance with all applicable laws and regulations in their jurisdiction before using this strategy.
- Tax Risk: Frequent trading may generate numerous taxable events. Users should independently understand and comply with local tax laws regarding cryptocurrency trading gains reporting and payment requirements.
- Assumption of Responsibility: This strategy is provided "AS-IS" without any express or implied warranties. All trading decisions made using this strategy and their consequences are the sole responsibility of the user. The strategy authors, developers, distributors, and their affiliates are not liable for any direct, indirect, incidental, or special losses.
Recommendation: For first-time use, run in Paper Mode (). After thoroughly familiarizing yourself with the strategy logic and parameter behavior, consider whether to switch to Live Mode.
DRY_RUN = True本策略脚本、参数配置及所有相关文档仅用于教育研究和技术参考目的,不构成任何形式的投资建议、交易指导或财务推荐。
- 高风险警告:加密货币交易(尤其是链上迷因币)风险极高。价格可能在数秒内大幅波动或跌至零。您可能损失全部投资本金。
- 信号不代表确定性:聪明钱/KOL/巨鲸买入信号仅反映特定时刻的链上行为,不保证代币会升值。信号来源可能存在延迟、误判或操纵。聪明钱地址标签来自第三方数据源,其准确性无法保证。
- 参数仅供参考:本策略中的所有默认参数(止盈、止损、仓位大小、安全阈值等)均针对通用场景设置,不保证适用于任何特定市场环境。用户应根据自身风险承受能力、交易经验和市场判断调整所有参数。
- 鼓励用户自定义:鼓励用户深入理解每个参数的含义,并根据自身策略逻辑和风险偏好进行修改。中的每个参数都附有注释,方便自定义。
config.py - 无盈利保证:过往业绩不代表未来结果。即使在回测中表现良好的参数,也可能因市场环境变化在实盘交易中失效。
- 技术风险:链上交易不可逆。智能合约可能存在漏洞。网络拥堵可能导致交易延迟或失败。
- 第三方依赖风险:本策略依赖onchainos CLI、OKX API和Solana网络等第三方基础设施。它们的可用性、准确性和稳定性不受策略作者控制。这些服务的任何变更、中断或故障都可能导致策略故障或产生意外损失。
- 监管/法律风险:加密货币交易在某些国家和地区可能受到严格限制或禁止。用户在使用本策略前应独立核实并确保遵守所在司法管辖区的所有适用法律法规。
- 税务风险:频繁交易可能产生大量应税事件。用户应独立了解并遵守当地关于加密货币交易收益申报和支付要求的税法。
- 责任承担:本策略按“原样”提供,不提供任何明示或暗示的担保。使用本策略做出的所有交易决策及其后果均由用户自行负责。策略作者、开发者、发行商及其关联方不对任何直接、间接、偶然或特殊损失承担责任。
建议:首次使用时,在模拟模式()下运行。在彻底熟悉策略逻辑和参数行为后,再考虑是否切换到实盘模式。
DRY_RUN = TrueFile Structure
文件结构
Smart Money Signal Copy Trade - 聪明钱信号跟单/
├── skill.md ← This file (strategy documentation)
├── config.py ← All adjustable parameters (modify only here, hot-reload)
├── bot.py ← Main strategy program
├── dashboard.html ← Web Dashboard UI
├── collision_guard.py ← Cross-strategy collision detection
├── positions.json ← [Auto-generated] Position data
└── signal_trades.json ← [Auto-generated] Trade historySmart Money Signal Copy Trade - 聪明钱信号跟单/
├── skill.md ← 本文件(策略文档)
├── config.py ← 所有可调参数(仅在此修改,支持热重载)
├── bot.py ← 主策略程序
├── dashboard.html ← Web仪表盘UI
├── collision_guard.py ← 跨策略冲突检测
├── positions.json ← [自动生成] 仓位数据
└── signal_trades.json ← [自动生成] 交易历史Prerequisites
前置条件
1. Install onchainos CLI (>= 2.0.0-beta)
1. 安装 onchainos CLI(版本 ≥ 2.0.0-beta)
bash
undefinedbash
undefinedCheck if already installed
检查是否已安装
onchainos --version
onchainos --version
If not installed, follow onchainos official documentation
若未安装,请遵循onchainos官方文档
Ensure onchainos is in PATH or located at ~/.local/bin/onchainos
确保onchainos在PATH中或位于~/.local/bin/onchainos
undefinedundefined2. Log in to Agentic Wallet (TEE Signing)
2. 登录 Agentic Wallet(TEE签名)
bash
undefinedbash
undefinedOne-time login (email verification)
一次性登录(邮箱验证)
onchainos wallet login <your-email>
onchainos wallet login <your-email>
Verify login status
验证登录状态
onchainos wallet status
onchainos wallet status
→ loggedIn: true
→ loggedIn: true
Confirm Solana address
确认Solana地址
onchainos wallet addresses --chain 501
> Agentic Wallet uses TEE secure enclave signing. Private keys are never exposed to code/logs/network.
> No need to set the WALLET_PRIVATE_KEY environment variable.onchainos wallet addresses --chain 501
> Agentic Wallet 使用TEE安全飞地签名。私钥永远不会暴露给代码/日志/网络。
> 无需设置WALLET_PRIVATE_KEY环境变量。3. No pip install Required
3. 无需pip安装
This strategy only depends on the Python standard library + onchainos CLI. No third-party packages are needed.
本策略仅依赖Python标准库 + onchainos CLI,无需第三方包。
AI Agent Startup Interaction Protocol
AI Agent 启动交互协议
When a user requests to start this strategy, the AI Agent must follow the procedure below. Do not skip directly to launch.
当用户请求启动本策略时,AI Agent必须遵循以下流程,不得直接跳过至启动步骤。
Phase 1: Present Strategy Overview
阶段1:展示策略概述
Show the user the following:
📡 Smart Money Signal Copy Trade v1.0 — Smart Money Signal Tracker
This strategy polls OKX Smart Money / KOL / Whale buy signals every 20 seconds.
When ≥3 smart wallets simultaneously buy the same token, it auto-buys after passing 15 safety filters.
A 7-layer exit system manages take profit and stop loss (Cost-Aware TP + Trailing + Time-Decay SL).
🧪 Current: Paper Mode — no real money spent, just observing signals
⚠️ Risk Notice: On-chain trading is high risk. You may lose all invested capital.
Default parameters (for reference only, adjust based on your situation):
Position size: high 0.020 / mid 0.015 / low 0.010 SOL
Max positions: 6
Min co-riders: 3 smart wallets
Safety thresholds: MC≥$200K, Liq≥$80K, Holders≥300, Dev Rug=0
Take Profit: TP1 +5% / TP2 +15% / TP3 +30% (NET, cost-aware)
Stop Loss: -10% hard stop loss, tightens with time decay
Trailing Stop: Activates at +12% profit, exits on 10% drawdown
Max hold time: 4 hours
All parameters can be freely modified in config.py to suit your trading style.向用户展示以下内容:
📡 Smart Money 信号跟单交易 v1.0 —— 聪明钱信号追踪器
本策略每20秒轮询OKX聪明钱/KOL/巨鲸买入信号。
当≥3个聪明钱包同时买入同一代币时,通过15项安全过滤后自动买入。
7层退出系统管理止盈和止损(成本感知止盈 + 追踪止损 + 时间衰减止损)。
🧪 当前状态:模拟模式 —— 不使用真实资金,仅观察信号
⚠️ 风险提示:链上交易风险极高,您可能损失全部投资本金。
默认参数(仅供参考,请根据自身情况调整):
仓位大小:高风险0.020 / 中等0.015 / 低风险0.010 SOL
最大仓位数量:6
最小跟车钱包数:3个聪明钱包
安全阈值:市值≥20万美元,流动性≥8万美元,持有者≥300,开发者跑路风险=0
止盈:TP1 +5% / TP2 +15% / TP3 +30%(扣除成本后净收益)
止损:-10%硬止损,随时间衰减收紧
追踪止损:盈利+12%时激活,从峰值回撤10%时退出
最大持有时间:4小时
所有参数可在config.py中自由修改,以适配您的交易风格。Q1: Risk Preference (Mandatory)
Q1:风险偏好(必填)
- 🛡️ Conservative: Small positions, tight stop loss, fewer positions
- ⚖️ Default: Balanced configuration (recommended)
- 🔥 Aggressive: Large positions, wide stop loss, more positions
→ Parameter mapping (for AI Agent to write to config.py, not shown to user):
| Preference | SL_MULTIPLIER | MAX_POSITIONS | MIN_WALLET_COUNT | TIME_STOP_MAX_HOLD_HRS | TRAIL_ACTIVATE | TRAIL_DISTANCE |
|---|---|---|---|---|---|---|
| Conservative | 0.92 (-8%) | 4 | 5 | 2 | 0.08 | 0.06 |
| Default | 0.90 (-10%) | 6 | 3 | 4 | 0.12 | 0.10 |
| Aggressive | 0.85 (-15%) | 8 | 3 | 6 | 0.18 | 0.12 |
- 🛡️ 保守型:仓位小,止损严格,仓位数量少
- ⚖️ 默认:平衡配置(推荐)
- 🔥 激进型:仓位大,止损宽松,仓位数量多
→ 参数映射(AI Agent写入config.py,不展示给用户):
| 风险偏好 | SL_MULTIPLIER | MAX_POSITIONS | MIN_WALLET_COUNT | TIME_STOP_MAX_HOLD_HRS | TRAIL_ACTIVATE | TRAIL_DISTANCE |
|---|---|---|---|---|---|---|
| 保守型 | 0.92(-8%) | 4 | 5 | 2 | 0.08 | 0.06 |
| 默认 | 0.90(-10%) | 6 | 3 | 4 | 0.12 | 0.10 |
| 激进型 | 0.85(-15%) | 8 | 3 | 6 | 0.18 | 0.12 |
Q2: Switch to Live Trading?
Q2:切换至实盘交易?
- A. 🧪 Stay in Paper Mode, launch directly (recommended default)
- B. 💰 Switch to Live Mode
Option A → Proceed directly to launch steps.
Option B → Enter Live Mode sub-flow:
-
⚠️ Confirm with user: "Live Mode will use real SOL for trading. Losses are irreversible. Confirm switch to Live Mode?"
- User confirms → Continue
- User declines → Fall back to Paper Mode
-
Ask for total budget in SOL (range 0.5-10, default 1.0 SOL)
-
AI auto-calculates (let B = user's budget input):
- (stop at 10% loss)
SESSION_STOP_SOL = B × 0.10 - (pause at 5% loss)
SESSION_LOSS_LIMIT_SOL = B × 0.05 - :
POSITION_TIERShigh: {"min_addr": 8, "sol": max(0.020 × B, 0.005)}mid: {"min_addr": 5, "sol": max(0.015 × B, 0.005)}low: {"min_addr": 3, "sol": max(0.010 × B, 0.005)}
-
Show calculated results to user and confirm: "Your Live Mode config: Total budget X SOL, per-trade high/mid/low = Y/Y/Y SOL, loss stop limit Z SOL. Confirm?"
- User confirms → Write to config.py
- User requests adjustments → Return to step 2
-
Set mode parameters:
DRY_RUN = FalsePAUSED = False
- A. 🧪 保持模拟模式,直接启动(推荐默认)
- B. 💰 切换至实盘模式
选项A → 直接进入启动步骤。
选项B → 进入实盘模式子流程:
-
⚠️ 向用户确认: "实盘模式将使用真实SOL进行交易。损失不可逆。确认切换至实盘模式?"
- 用户确认 → 继续
- 用户拒绝 → 退回模拟模式
-
询问用户SOL总预算(范围0.5-10,默认1.0 SOL)
-
AI自动计算(设B为用户输入的预算):
- (损失10%时停止)
SESSION_STOP_SOL = B × 0.10 - (损失5%时暂停)
SESSION_LOSS_LIMIT_SOL = B × 0.05 - :
POSITION_TIERShigh: {"min_addr": 8, "sol": max(0.020 × B, 0.005)}mid: {"min_addr": 5, "sol": max(0.015 × B, 0.005)}low: {"min_addr": 3, "sol": max(0.010 × B, 0.005)}
-
向用户展示计算结果并确认: "您的实盘模式配置:总预算X SOL,每笔交易高/中/低仓位=Y/Y/Y SOL,损失停止限额Z SOL。确认?"
- 用户确认 → 写入config.py
- 用户要求调整 → 返回步骤2
-
设置模式参数:
DRY_RUN = FalsePAUSED = False
Launch
启动
- Modify corresponding parameters in based on user responses
config.py - Set (allow bot to run normally after interaction confirmation)
PAUSED = False - Check prerequisites: ,
onchainos --versiononchainos wallet status - Start bot:
python3 bot.py - Show Dashboard link:
http://localhost:3248 - Inform user: Currently in Paper Mode. To switch to Live Mode, change in
DRY_RUN = Falseconfig.py
If user says "use default config" or "just run it", only set , leave everything else unchanged, and launch in Paper Mode.
PAUSED = False- 根据用户响应修改中的对应参数
config.py - 设置(交互确认后允许机器人正常运行)
PAUSED = False - 检查前置条件:、
onchainos --versiononchainos wallet status - 启动机器人:
python3 bot.py - 展示仪表盘链接:
http://localhost:3248 - 告知用户:当前处于模拟模式。如需切换至实盘模式,请修改中的
config.pyDRY_RUN = False
如果用户说"使用默认配置"或"直接运行",仅设置,其余参数保持不变,并以模拟模式启动。
PAUSED = FalseSpecial Cases
特殊情况
- User explicitly says "don't ask me, just run" → Launch with default parameters (Paper Mode), but must show Phase 1 overview + set
PAUSED = False - User is a returning user (config history exists in conversation) → Remind of previous config, ask whether to reuse
- 用户明确表示"别问我,直接运行" → 使用默认参数启动(模拟模式),但必须展示阶段1概述 + 设置
PAUSED = False - 用户为返回用户(对话中存在配置历史) → 提醒之前的配置,询问是否复用
Quick Start
快速开始
⚠️ Before launching, confirm thevalue in config.py —DRY_RUNfor Paper,Truefor Live.False
bash
cd ~/CC/Smart\ Money\ Signal\ Copy\ Trade\ -\ 聪明钱信号跟单⚠️ 启动前,请确认config.py中的值 ——DRY_RUN为模拟模式,True为实盘模式。False
bash
cd ~/CC/Smart\ Money\ Signal\ Copy\ Trade\ -\ 聪明钱信号跟单1. Confirm onchainos is logged in
1. 确认onchainos已登录
onchainos wallet status
onchainos wallet status
2. Start bot (foreground, Ctrl+C to stop)
2. 启动机器人(前台运行,按Ctrl+C停止)
python3 bot.py
python3 bot.py
3. Open Dashboard
3. 打开仪表盘
4. Stop
4. 停止机器人
pkill -f bot.py
> **First launch defaults to PAUSED=True, no new positions will be opened. After confirming everything is normal, change config.py PAUSED=False.**
> config.py supports hot-reload (`importlib.reload`). No bot restart needed after changes.
---pkill -f bot.py
> **首次启动默认设置为PAUSED=True,不会开新仓位。确认一切正常后,修改config.py中的PAUSED=False。**
> config.py支持热重载(`importlib.reload`)。修改后无需重启机器人。
---Parameter Tuning
参数调优
All adjustable parameters are in — no need to modify .
config.pybot.py所有可调参数均在中 —— 无需修改。
config.pybot.pyCommon Adjustments
常见调整
| Need | Modify in |
|---|---|
| Pause/Resume trading | |
| Paper/Live Mode switch | |
| Adjust position size | |
| Adjust max positions | |
| Adjust min co-rider count | |
| Adjust take profit | |
| Adjust hard stop loss | |
| Adjust time-decay SL | |
| Adjust trailing stop | |
| Adjust max hold time | |
| MC range | |
| Session loss limits | |
| Scan interval | |
| Dashboard port | |
Changes take effect automatically via hot-reload (no bot restart needed).
| 需求 | 在 |
|---|---|
| 暂停/恢复交易 | |
| 切换模拟/实盘模式 | |
| 调整仓位大小 | |
| 调整最大仓位数量 | |
| 调整最小跟车钱包数 | |
| 调整止盈 | |
| 调整硬止损 | |
| 调整时间衰减止损 | |
| 调整追踪止损 | |
| 调整最大持有时间 | |
| 市值范围 | |
| 会话损失限额 | |
| 扫描间隔 | |
| 仪表盘端口 | |
修改通过热重载自动生效(无需重启机器人)。
Strategy Architecture
策略架构
bot.py (Single-file Bot)
├── onchainos CLI (Data + Execution + Safety — no API Key)
├── run() ← Main loop, every 20s
│ ├── signal list() Smart Money/KOL/Whale signals
│ ├── Level 1 Pre-filter soldRatio < 80%, walletCount >= 3
│ └── open_position() 15 deep verifications → Buy
│ ├── market prices MC/Liq/Holders/Price
│ ├── token search Community verification status
│ ├── market candles K1 pump < 15%
│ ├── token advanced-info Dev rug/Bundler/LP/Top10
│ ├── wallet balance SOL balance check
│ ├── swap quote Honeypot detection + quote
│ └── → execute_swap() Paper: quote / Live: swap + TEE signing
├── monitor_positions() ← Background thread, every 20s
│ ├── market prices Batch prices
│ └── check_position() 7-layer exit decision
│ ├── EXIT 0: Liquidity emergency exit (liq < $5K)
│ ├── EXIT 1: Dust cleanup (< $0.10)
│ ├── EXIT 2: Hard stop loss (-10%)
│ ├── EXIT 3: Time-decay SL (30min/-8%, 60min/-5%)
│ ├── EXIT 4: Tiered take profit TP1/TP2/TP3 (cost-aware)
│ ├── EXIT 5: Trailing stop (+12% activate, 10% drawdown)
│ ├── EXIT 6: Trend time stop (15m candle reversal)
│ └── EXIT 7: Hard time stop (4h)
├── Session Risk Control Consecutive loss pause / Cumulative loss stop
├── Dashboard (port 3248) Web UI
└── Persistence files (JSON, atomic write)Scheduled Tasks:
| Task | Frequency | Responsibility |
|---|---|---|
| Every 20s | Poll signals → Pre-filter → Deep verification → Buy |
| Every 20s | Fetch position prices → 7-layer exit system |
| Auto each cycle | Hot-reload config.py parameters |
bot.py(单文件机器人)
├── onchainos CLI(数据 + 执行 + 安全 —— 无需API密钥)
├── run() ← 主循环,每20秒执行一次
│ ├── signal list() 聪明钱/KOL/巨鲸信号
│ ├── Level 1 Pre-filter 卖出占比 < 80%,钱包数量 >= 3
│ └── open_position() 15项深度验证 → 买入
│ ├── market prices 市值/流动性/持有者/价格
│ ├── token search 社区验证状态
│ ├── market candles K1涨幅 < 15%
│ ├── token advanced-info 开发者跑路风险/打包者/流动性池/前10持有者
│ ├── wallet balance SOL余额检查
│ ├── swap quote 蜜罐检测 + 报价
│ └── → execute_swap() 模拟模式:仅报价 / 实盘模式:交易 + TEE签名
├── monitor_positions() ← 后台线程,每20秒执行一次
│ ├── market prices 批量获取价格
│ └── check_position() 7层退出决策
│ ├── EXIT 0: 流动性紧急退出(流动性 < 5000美元)
│ ├── EXIT 1: 小额持仓清理(持仓价值 < 0.10美元)
│ ├── EXIT 2: 硬止损(价格 <= 入场价 × 0.90,即-10%)
│ ├── EXIT 3: 时间衰减止损(30分钟/-8%,60分钟/-5%)
│ ├── EXIT 4: 分层止盈TP1/TP2/TP3(成本感知)
│ ├── EXIT 5: 追踪止损(盈利≥+12%激活,从峰值回撤≥10%时退出)
│ ├── EXIT 6: 趋势时间止损(持仓≥30分钟且15分钟蜡烛图确认反转)
│ └── EXIT 7: 强制时间止损(持有时间≥4小时)
├── Session Risk Control 连续损失暂停 / 累计损失停止
├── Dashboard(端口3248) Web界面
└── 持久化文件(JSON,原子写入)定时任务:
| 任务 | 频率 | 职责 |
|---|---|---|
| 每20秒 | 轮询信号 → 预过滤 → 深度验证 → 买入 |
| 每20秒 | 获取持仓价格 → 7层退出系统 |
| 每个循环自动执行 | 热重载config.py参数 |
Safety Checks
安全检查
Level 1 Pre-filter (2 checks, based on signal list data, 0 extra API calls)
一级预过滤(2项检查,基于信号列表数据,无需额外API调用)
| # | Check | Threshold |
|---|---|---|
| 1 | Smart Money sell ratio | |
| 2 | Co-rider wallet count | |
| # | 检查项 | 阈值 |
|---|---|---|
| 1 | 聪明钱卖出占比 | |
| 2 | 跟车钱包数量 | |
Level 2 Deep Verification (13 checks, via onchainos CLI)
二级深度验证(13项检查,通过onchainos CLI)
| # | Check | Threshold | Data Source |
|---|---|---|---|
| 1 | Market Cap | >= $200,000 | |
| 2 | Liquidity | >= $80,000 | |
| 3 | Holder count | >= 300 | |
| 4 | Liquidity/MC ratio | >= 5% | |
| 5 | Top10 concentration | <= 50% | |
| 6 | Holder density | >= 50 per million MC | |
| 7 | K1 price change | <= 15% | |
| 8 | Dev rug history | = 0 (zero tolerance) | |
| 9 | Dev farm | <= 20 | |
| 10 | Dev holding | <= 15% | |
| 11 | Bundler ATH | <= 25% | |
| 12 | Bundler count | <= 5 | |
| 13 | LP burn | >= 80% | |
| # | 检查项 | 阈值 | 数据源 |
|---|---|---|---|
| 1 | 市值 | >= 200,000美元 | |
| 2 | 流动性 | >= 80,000美元 | |
| 3 | 持有者数量 | >= 300 | |
| 4 | 流动性/市值比例 | >= 5% | |
| 5 | 前10持有者集中度 | <= 50% | |
| 6 | 持有者密度 | >= 每百万市值50个持有者 | |
| 7 | K1价格变化 | <= 15% | |
| 8 | 开发者跑路历史 | = 0(零容忍) | |
| 9 | 开发者农场数量 | <= 20 | |
| 10 | 开发者持仓占比 | <= 15% | |
| 11 | 打包者历史最高持仓占比 | <= 25% | |
| 12 | 打包者数量 | <= 5 | |
| 13 | 流动性池销毁比例 | >= 80% | |
Final Pre-Buy Check
买入前最终检查
- SOL balance >= position size + (0.05)
SOL_GAS_RESERVE - Honeypot detection: (via
isHoneyPot == false && taxRate <= 5)swap quote - Position count <
MAX_POSITIONS - Not in cooldown / Session not paused/stopped
- SOL余额 >= 仓位大小 + (0.05)
SOL_GAS_RESERVE - 蜜罐检测:(通过
isHoneyPot == false && taxRate <= 5)swap quote - 持仓数量 <
MAX_POSITIONS - 不在冷却期 / 会话未暂停/停止
Position Tiers
仓位层级
| Tier | Condition | Position |
|---|---|---|
| high | >= 8 co-rider wallets | 0.020 SOL |
| mid | >= 5 co-rider wallets | 0.015 SOL |
| low | >= 3 co-rider wallets | 0.010 SOL |
Cost Model (Breakeven by tier):
| Tier | Fixed Cost Ratio | Slippage Cost (x2 legs) | Breakeven |
|---|---|---|---|
| high (0.020) | 0.001/0.020 = 5.0% | 2.0% | 7.0% |
| mid (0.015) | 0.001/0.015 = 6.7% | 2.0% | 8.7% |
| low (0.010) | 0.001/0.010 = 10.0% | 2.0% | 12.0% |
TP is cost-aware —. For the low tier, TP1 actually requires +17% raw price change to trigger (5% + 12% breakeven).tp_threshold = net_target + breakeven_pct
| 层级 | 条件 | 仓位 |
|---|---|---|
| 高 | >= 8个跟车钱包 | 0.020 SOL |
| 中 | >= 5个跟车钱包 | 0.015 SOL |
| 低 | >= 3个跟车钱包 | 0.010 SOL |
成本模型(各层级盈亏平衡点):
| 层级 | 固定成本比例 | 滑点成本(双向) | 盈亏平衡点 |
|---|---|---|---|
| 高(0.020) | 0.001/0.020 = 5.0% | 2.0% | 7.0% |
| 中(0.015) | 0.001/0.015 = 6.7% | 2.0% | 8.7% |
| 低(0.010) | 0.001/0.010 = 10.0% | 2.0% | 12.0% |
止盈是成本感知的 ——。对于低层级,TP1实际需要+17%的原始价格涨幅才能触发(5%净收益 + 12%盈亏平衡点)。tp_threshold = 净目标收益 + 盈亏平衡点比例
7-Layer Exit System
7层退出系统
| Priority | Exit Type | Trigger Condition | Sell Ratio |
|---|---|---|---|
| EXIT 0 | Liquidity emergency exit | | 100% |
| EXIT 1 | Dust cleanup | Position value < $0.10 | 100% |
| EXIT 2 | Hard stop loss | | 100% |
| EXIT 3 | Time-decay SL | 30min: -8%, 60min: -5% | 100% |
| EXIT 4 | Tiered take profit | TP1 +5% NET sell 30% / TP2 +15% sell 40% / TP3 +30% sell 100% | Partial |
| EXIT 5 | Trailing stop | Peak PnL >= +12%, then drawdown >= 10% from peak | 100% |
| EXIT 6 | Trend time stop | Position >= 30min and 15m candle reversal confirmed | 100% |
| EXIT 7 | Hard time stop | Hold time >= 4h | 100% |
| 优先级 | 退出类型 | 触发条件 | 卖出比例 |
|---|---|---|---|
| EXIT 0 | 流动性紧急退出 | | 100% |
| EXIT 1 | 小额持仓清理 | 持仓价值 < 0.10美元 | 100% |
| EXIT 2 | 硬止损 | | 100% |
| EXIT 3 | 时间衰减止损 | 30分钟:-8%,60分钟:-5% | 100% |
| EXIT 4 | 分层止盈 | TP1 +5%净收益卖出30% / TP2 +15%净收益卖出40% / TP3 +30%净收益卖出100% | 部分卖出 |
| EXIT 5 | 追踪止损 | 峰值盈利≥+12%,随后从峰值回撤≥10% | 100% |
| EXIT 6 | 趋势时间止损 | 持仓≥30分钟且15分钟蜡烛图确认反转 | 100% |
| EXIT 7 | 强制时间止损 | 持有时间≥4小时 | 100% |
Session Risk Control
会话风险控制
| Rule | Value |
|---|---|
| Consecutive loss pause | 3 times → Pause 10min ( |
| Cumulative loss pause | >= 0.05 SOL → Pause 30min ( |
| Cumulative loss stop | >= 0.10 SOL → Stop trading ( |
| Max hold time | 4h ( |
Consecutive loss counter resets on a profitable trade. Session risk control auto-resets on bot restart.
| 规则 | 数值 |
|---|---|
| 连续损失暂停 | 3次 → 暂停10分钟( |
| 累计损失暂停 | >= 0.05 SOL → 暂停30分钟( |
| 累计损失停止 | >= 0.10 SOL → 停止交易( |
| 最大持有时间 | 4小时( |
连续损失计数器在盈利交易后重置。会话风险控制在机器人重启时自动重置。
Iron Rules (Must Not Be Violated)
铁则(不得违反)
- safety check failure → Fail-Closed, do not buy.
advanced-info - skip — Smart money is already selling, don't catch the falling knife.
soldRatioPercent > 80% - K1 price change > 15% skip — Don't chase pumps.
- Zero tolerance for Dev rug history — If there's a rug, don't buy.
- After selling a token, set cooldown. No re-buying during cooldown period.
- Position size is fixed per tier. No adding to positions.
- If all three levels of buy price fallback fail (price <= 0), do not open position.
- Daily loss limit reached → Stop all buying.
- 0.05 SOL is never spent on trades.
SOL_GAS_RESERVE - Must hold before writing to positions.json.
state_lock
- 安全检查失败 → 关闭交易,不得买入。
advanced-info - 跳过 —— 聪明钱已在卖出,不要接飞刀。
soldRatioPercent > 80% - K1价格变化>15%跳过 —— 不要追高。
- 零容忍开发者跑路历史 —— 若存在跑路记录,不得买入。
- 卖出代币后设置冷却期。冷却期内不得重新买入。
- 仓位大小按层级固定。不得加仓。
- 若三次买入价格回落尝试均失败(价格<=0),不得开仓。
- 达到每日损失限额 → 停止所有买入。
- 0.05 SOL永远不会用于交易。
SOL_GAS_RESERVE - 必须在写入positions.json前持有。
state_lock
onchainos CLI Command Reference
onchainos CLI 命令参考
| # | Command | Purpose |
|---|---|---|
| 1 | | Smart Money signals |
| 2 | | Batch price/MC/Liq |
| 3 | | Candles (K1 pump detection) |
| 4 | | Community verification |
| 5 | | Dev/Bundler/LP/Top10 |
| 6 | | Quote + Honeypot detection |
| 7 | | Trade execution |
| 8 | | Solana address |
| 9 | | SOL balance |
| 10 | | TEE signing + broadcast |
| 11 | | Transaction confirmation |
| # | 命令 | 用途 |
|---|---|---|
| 1 | | 获取聪明钱信号 |
| 2 | | 批量获取价格/市值/流动性 |
| 3 | | 获取蜡烛图(检测K1涨幅) |
| 4 | | 社区验证 |
| 5 | | 获取开发者/打包者/流动性池/前10持有者信息 |
| 6 | | 获取报价 + 蜜罐检测 |
| 7 | | 执行交易 |
| 8 | | 获取Solana地址 |
| 9 | | 获取SOL余额 |
| 10 | | TEE签名 + 广播交易 |
| 11 | | 确认交易 |
Troubleshooting
故障排除
| Issue | Solution |
|---|---|
| "FATAL: onchainos CLI not found" | Install onchainos and ensure it is in PATH |
| "No Solana address" | Run |
| Login expired | Re-run |
| Dashboard won't open | Check if port 3248 is in use: |
| Bot starts but doesn't trade | Check |
| Lots of SKIP in Feed | Signal tokens didn't pass pre-filter (MC/Liq/soldRatio), this is normal |
| Lots of SAFETY_REJECT in Feed | Deep verification blocked, adjust config based on rejection reason (DevRug/Bundler/K1) |
| No smart money buy signals currently, normal behavior — just wait |
| Live mode buy failure | Check SOL balance >= position + 0.05; confirm wallet is logged in |
| |
| SESSION_PAUSE, not trading | Session risk control triggered, wait for pause to end or adjust |
| SESSION_STOP | Cumulative loss reached limit, restart bot to reset session |
| PnL display abnormal | Check |
| Config change not taking effect | No restart needed — |
| 问题 | 解决方案 |
|---|---|
| "FATAL: onchainos CLI not found" | 安装onchainos并确保其在PATH中 |
| "No Solana address" | 运行 |
| 登录过期 | 重新运行 |
| 仪表盘无法打开 | 检查端口3248是否被占用: |
| 机器人启动但不交易 | 检查 |
| 日志中大量SKIP | 信号代币未通过预过滤(市值/流动性/卖出占比),此为正常现象 |
| 日志中大量SAFETY_REJECT | 深度验证被阻止,根据拒绝原因(开发者跑路/打包者/K1涨幅)调整配置 |
持续显示 | 当前无聪明钱买入信号,正常现象 —— 只需等待 |
| 实盘模式买入失败 | 检查SOL余额 >= 仓位 + 0.05;确认钱包已登录 |
| |
| SESSION_PAUSE,不交易 | 触发会话风险控制,等待暂停结束或调整 |
| SESSION_STOP | 累计损失达到限额,重启机器人重置会话 |
| PnL显示异常 | 检查 |
| 配置变更未生效 | 无需重启 —— |
Common Pitfalls
常见误区
| Issue | Wrong Approach | Correct Approach |
|---|---|---|
| TP not profitable | TP uses raw pct | |
| Ignoring costs | TP at 8% and sell | NET 5% actual trigger = 5%+12% = 17% raw gain (low tier) |
| dev rug | Don't check dev | |
| Continuous losses without stopping | Keep trading | 3 consecutive losses pause / 0.10 SOL stop |
| swap --from uses WSOL | | Must use native SOL |
| contract-call --to | Pass token address | Must pass swap response's |
| swap amount unit | Pass UI units | |
| wallet balance get SOL | Get WSOL balance | Get entry where |
| 问题 | 错误做法 | 正确做法 |
|---|---|---|
| 止盈无盈利 | 使用原始比例设置止盈 | |
| 忽略成本 | 设置8%止盈并卖出 | 实际净5%触发 = 5%+12% = 17%原始涨幅(低层级) |
| 开发者跑路风险 | 不检查开发者信息 | |
| 持续损失不停交易 | 继续交易 | 3次连续损失暂停 / 0.10 SOL损失停止 |
| swap --from使用WSOL | 使用 | 必须使用原生SOL |
| contract-call --to | 传递代币地址 | 必须传递swap响应中的 |
| swap金额单位 | 使用UI单位 | |
| 获取钱包SOL余额 | 获取WSOL余额 | 获取 |
Glossary
术语表
| Term | Definition |
|---|---|
| Co-rider address | Multiple smart wallets buying the same token within a short time, forming a "co-riding" consensus |
| walletType | Signal source type: 1=SmartMoney 2=KOL/Influencer 3=Whale |
| triggerWalletCount | Number of co-rider wallets; more wallets = stronger signal |
| soldRatioPercent | Smart Money sell ratio; >80% means smart money is already exiting |
| breakeven_pct | Breakeven point (including fees); varies by tier (7%-12%) |
| Cost-Aware TP | Take profit threshold = NET target + breakeven_pct, ensuring actual profit after fees |
| Trailing Stop | Price reaches activation threshold, then triggers sell when drawdown from peak exceeds threshold |
| Time-decay SL | Time-decay stop loss — the longer the position is held, the tighter the stop loss |
| Trend Stop | Trend time stop — based on 15m candle trend reversal detection |
| Session Risk | Per-run cumulative risk control (consecutive loss pause, cumulative loss stop) |
| Fail-Closed | When safety check API fails, treat as unsafe and do not buy |
| TEE | Trusted Execution Environment — onchainos signing happens inside a secure enclave |
| Agentic Wallet | onchainos managed wallet; private key stays inside TEE, never leaves the secure environment |
| Dust | Fragment position — residual holding valued below $0.10, automatically cleaned up |
| Hot-reload | |
| MC / MCAP | Market Cap — token total supply × current price, measures token scale |
| LP | Liquidity Pool — token pair pool on DEX for trading; larger LP means lower slippage |
| LP Burn | Permanently destroying LP tokens, ensuring liquidity cannot be withdrawn by the developer |
| Rug Pull | Developer suddenly withdraws liquidity or dumps all holdings, causing token price to drop to zero |
| Dev | Token developer/deployer — in the meme coin context, refers to the token contract creator; their holdings and history are key risk indicators |
| Bundler | Bundle trader — addresses that buy large amounts through bundled transactions at token launch, possibly insiders or manipulators |
| Sniper | Addresses that automatically buy tokens at the instant of launch via bots; concentrated holdings may create sell pressure |
| Honeypot | Malicious token contract that can only be bought but not sold (or has extremely high sell tax) |
| Slippage | Difference between expected and actual execution price; worse liquidity means higher slippage |
| K1 | Most recent 1-minute candle — used to detect short-term price spikes (K1 pump), preventing buying at the top |
| lamports | Smallest unit of SOL, 1 SOL = 1,000,000,000 lamports |
| Native SOL | SOL native token address |
| WSOL | Wrapped SOL (So11...112), SPL Token wrapped form of SOL; cannot be used for swap --from |
| 术语 | 定义 |
|---|---|
| 跟车地址 | 多个聪明钱包在短时间内买入同一代币,形成“跟车”共识 |
| walletType | 信号来源类型:1=聪明钱 2=KOL/网红 3=巨鲸 |
| triggerWalletCount | 跟车钱包数量;钱包越多,信号越强 |
| soldRatioPercent | 聪明钱卖出占比;>80%意味着聪明钱已在退出 |
| breakeven_pct | 盈亏平衡点(含手续费);因层级而异(7%-12%) |
| Cost-Aware TP | 成本感知止盈 —— 止盈阈值 = 净目标收益 + 盈亏平衡点比例,确保扣除手续费后实际盈利 |
| Trailing Stop | 追踪止损 —— 价格达到激活阈值后,从峰值回撤超过阈值时触发卖出 |
| Time-decay SL | 时间衰减止损 —— 持仓时间越长,止损越严格 |
| Trend Stop | 趋势时间止损 —— 基于15分钟蜡烛图趋势反转检测 |
| Session Risk | 会话风险 —— 单次运行的累计风险控制(连续损失暂停,累计损失停止) |
| Fail-Closed | 安全检查API失败时,视为不安全,不得买入 |
| TEE | 可信执行环境 —— onchainos签名在安全飞地内进行 |
| Agentic Wallet | onchainos托管钱包;私钥保留在TEE内,永远不会离开安全环境 |
| Dust | 小额持仓 —— 剩余持仓价值低于0.10美元,自动清理 |
| Hot-reload | 热重载 —— |
| MC / MCAP | 市值 —— 代币总供应量 × 当前价格,衡量代币规模 |
| LP | 流动性池 —— DEX上的代币对池,用于交易;LP越大,滑点越低 |
| LP Burn | 流动性池销毁 —— 永久销毁LP代币,确保开发者无法提取流动性 |
| Rug Pull | 跑路 —— 开发者突然提取流动性或抛售全部持仓,导致代币价格跌至零 |
| Dev | 代币开发者/部署者 —— 在迷因币语境下,指代币合约创建者;其持仓和历史是关键风险指标 |
| Bundler | 打包交易者 —— 在代币发行时通过批量交易大量买入的地址,可能是内部人员或操纵者 |
| Sniper | 狙击者 —— 通过机器人在代币发行瞬间自动买入的地址;集中持仓可能造成抛售压力 |
| Honeypot | 蜜罐 —— 恶意代币合约,只能买入无法卖出(或卖出税极高) |
| Slippage | 滑点 —— 预期执行价格与实际执行价格的差异;流动性越差,滑点越高 |
| K1 | 最近1分钟蜡烛图 —— 用于检测短期价格暴涨(K1拉盘),防止在顶部买入 |
| lamports | SOL的最小单位,1 SOL = 1,000,000,000 lamports |
| Native SOL | 原生SOL代币地址 |
| WSOL | 封装SOL(So11...112),SOL的SPL代币封装形式;不能用于swap --from |