moltrade
Operate the Moltrade trading bot (config, backtest, test-mode runs, Nostr signal broadcast, exchange adapters, strategy integration) in OpenClaw.
- License 许可
- MIT
- 最近更新
- 2026-08-23
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- moltrade
- metadata
- { "openclaw": { "emoji": "?", "homepage": "https://github.com/hetu-project/moltrade.git", "requires": { "bins": [ "python", "pip" ] } } }
- description
- Operate the Moltrade trading bot (config, backtest, test-mode runs, Nostr signal broadcast, exchange adapters, strategy integration) in OpenClaw.
02 资源文件 3
- 参考文档_meta.json451 B
- 参考文档references/libero-commands.md6.7 KB
- 参考文档references/robocasa-commands.md5.8 KB
03 SKILL.md 正文
Moltrade Bot Skill
Paths are repo-root relative. Keep actions deterministic and redact secrets.
Install & Init
- Clone the repo and install Python deps locally (code is required for strategies, nostr, and CLI):
git clone https://github.com/hetu-project/moltrade.gitcd moltrade/trader && pip install -r requirements.txt
- Initialize a fresh config with the built-in wizard (no trading):
- Prefer the human user to run
python main.py --init(prompts for relayer URL, wallet, nostr, copy-trade follower defaults, and bot registration), so you can approve prompts, handle the wallet private key entry yourself, and capture the relayer’s returnedrelayer_nostr_pubkeywhen registering the bot. - If you delegate to an agent, do so only if you trust it with the wallet key and ensure it completes the entire wizard—including the final bot registration step—so the
relayer_nostr_pubkeygets written back to the config.
- Prefer the human user to run
- For CI/agents, keep using the repo checkout; there is no separate pip package/CLI yet.
Update Config Safely
- Backup or show planned diff before edits.
- Change only requested fields (e.g.,
trading.exchange,trading.default_strategy,nostr.relays). - Validate JSON; keep types intact. Remind user to provide real secrets themselves.
Run Backtest (local)
- Install deps:
pip install -r trader/requirements.txt. - Command:
python trader/backtest.py --config trader/config.example.json --strategy <name> --symbol <symbol> --interval 1h --limit 500. - Report PnL/win rate/trade count/drawdown if available. Use redacted config (no real keys).
Start Bot (test mode)
- Ensure
config.jsonexists (runpython main.py --initif not) andtrading.exchangeset (default hyperliquid). - Command:
python trader/main.py --config config.json --test --strategy <name> --symbol <symbol> --interval 300. - Watch
trading_bot.log; never switch to live without explicit user approval.
Run Bot (live)
- Only after validation on test mode; remove
--testto hit mainnet. - Command:
python trader/main.py --config config.json --strategy <name> --symbol <symbol>. - Double-check keys, risk limits, and symbol before starting; live mode will place real orders.
Broadcast Signals to Nostr
- Check
nostrblock:nsec,relayer_nostr_pubkey,relays,sid. SignalBroadcasteris wired inmain.py. In test mode, verifysend_trade_signal/send_execution_reportrun without errors.
Add Exchange Adapter
- Implement adapter in
trader/exchanges/matchingHyperliquidClientinterface (get_candles,get_balance,get_positions,place_order, etc.). - Register in
trader/exchanges/factory.pykeyed bytrading.exchange. - Update config
trading.exchangeand rerun backtest/test-mode.
Integrate New Strategy
- Follow
trader/strategies/INTEGRATION.mdto subclassBaseStrategyand register inget_strategy. - Add config under
strategies.<name>; backtest, then test-mode before live.
Safety / Secrets
- Never print or commit private keys, mnemonics, nsec, or shared keys.
- Default to test mode; require explicit consent for live trading.
04 同仓库更多 Skills
crowd-prompting
A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.
dilemm-ai
Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
git-summary
Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.
agent-constitution
Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.