# Send moltrade to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "moltrade",
    "name": "moltrade",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/ai-chen2050/moltrade",
    "canonicalUrl": "https://clawhub.ai/ai-chen2050/moltrade",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/moltrade",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=moltrade",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "binance/square-post/README.cn.md",
      "binance/square-post/README.md",
      "binance/square-post/SKILL.md",
      "binance/spot/LICENSE.md",
      "binance/spot/references/authentication.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "moltrade",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-12T08:37:24.650Z",
      "expiresAt": "2026-05-19T08:37:24.650Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=moltrade",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=moltrade",
        "contentDisposition": "attachment; filename=\"moltrade-1.0.9.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "moltrade"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/moltrade"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/moltrade",
    "downloadUrl": "https://openagent3.xyz/downloads/moltrade",
    "agentUrl": "https://openagent3.xyz/skills/moltrade/agent",
    "manifestUrl": "https://openagent3.xyz/skills/moltrade/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/moltrade/agent.md"
  }
}
```
## Documentation

### Moltrade Bot Skill

Moltrade is a decentralized, automated trading assistant that lets you run quant strategies, share encrypted signals, and allow others to copy your trades—all securely via the Nostr network. Earn reputation and credits based on your trading performance.

YOUR 24/7 AI TRADER ! EARNING MONEY WHILE YOU'RE SLEEPING.

### Advantages

Moltrade balances security, usability, and scalability. Key advantages include:

Client-side Key self-hosting,not cloud Custody,: All sensitive keys and credentials remain on the user's machine; the cloud relay never holds funds or private keys, minimizing custodial risk.No access to private keys or funds.
Encrypted, Targeted Communication: Signals are encrypted before publishing and only decryptable by intended subscribers, preserving strategy privacy and subscriber security.
Lightweight Cloud Re-encryption & Broadcast: The cloud acts as an efficient relay/re-broadcaster without storing private keys; re-encryption or forwarding techniques improve delivery reliability and reach.
One-Click Copy Trading (User Friendly): Provides an out-of-the-box copy-trading experience for non-expert users—set up in a few steps and execute signals locally.
OpenClaw Strategy Advisor: Integrates OpenClaw as an advisory tool for automated backtests and improvement suggestions; users decide whether to adopt recommended changes.
Cloud Can Be Decentralized Relayer Network: The lightweight relay architecture allows future migration to decentralized relay networks, reducing single points of failure and improving censorship resistance.
Unified Incentive (Credit) System: A transparent, verifiable Credit mechanism rewards all participants (signal providers, followers, relay nodes), aligning incentives across the ecosystem.

### How It Works (Simplified Flow)

1) Run Your Bot  ──→  2) Generate & Encrypt  ──→  3) Relay  ──→  4) Copy & Execute  ──→  5) Verify & Earn

### Install & Init

If you are inside OpenClaw, you can install directly via ClawHub:

clawhub search moltrade
clawhub install moltrade

OR & Clone the repo and install Python deps locally (code is required for strategies, nostr, and CLI):

git clone https://github.com/hetu-project/moltrade.git
cd 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 returned relayer_nostr_pubkey when 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_pubkey gets written back to the config.


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.json exists (run python main.py --init if not) and trading.exchange set (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 --test to 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.

### Copy-trade Usage (live)

Follower (mirrors leader, no strategy trading): python trader/main.py --config trader/config.json --strategy momentum --symbol HYPE --copytrade follower

### Broadcast Signals to Nostr

Check nostr block: nsec, relayer_nostr_pubkey, relays, sid.
SignalBroadcaster is wired in main.py. In test mode, verify send_trade_signal / send_execution_report run without errors.

### Binance Spot Support

Moltrade supports Binance Spot trading via binance-sdk-spot. Set trading.exchange to "binance" in your config and provide API credentials.

Related Skills (raw API calls, not tied to the bot runtime):

binance/spot — Binance Spot REST API skill: market data, order management, account info. Requires API key + secret; supports testnet and mainnet.
binance/square-post — Binance Square social platform skill: post trading insights/signals as text content via the Square OpenAPI. Requires a Square OpenAPI key.

### Install Binance SDK

pip install binance-sdk-spot

### Config Fields

Add a binance block alongside the existing trading block:

{
  "trading": {
    "exchange": "binance",
    "default_symbol": "BTCUSDT",
    "default_strategy": "momentum"
  },
  "binance": {
    "api_key": "your_mainnet_api_key",
    "api_secret": "your_mainnet_api_secret",
    "testnet_api_key": "your_testnet_api_key",
    "testnet_api_secret": "your_testnet_api_secret"
  }
}

Note: Binance testnet uses keys generated separately at https://testnet.binance.vision (GitHub login required). Mainnet keys do not work on the testnet.

### Testnet (–-test)

When --test is passed the bot routes all requests to testnet.binance.vision and uses binance.testnet_api_key / testnet_api_secret. If testnet keys are absent it falls back to mainnet keys, which will cause auth errors against the testnet endpoint.

python trader/main.py --config config.json --test --strategy momentum --symbol BTCUSDT

### Live Trading

python trader/main.py --config config.json --strategy momentum --symbol BTCUSDT

### Backtest

python trader/backtest.py --config trader/config.example.json --strategy momentum --symbol BTCUSDT --interval 1h --limit 500

### Supported Interface

BinanceClient (trader/binance_api.py) implements the same interface as HyperliquidClient:

MethodDescriptionget_candles(symbol, interval, limit)K-line data as [ts, open, high, low, close, vol]get_balance(asset)Free balance for an asset (default "USDT")get_positions()Non-zero asset balances (spot has no margin positions)get_open_orders()All current open ordersplace_order(symbol, is_buy, size, price, order_type)LIMIT or MARKET order with auto lot-size / tick-size roundingcancel_order(order_id, symbol)Cancel by order IDcancel_all_orders(symbol)Cancel all orders (optionally for one symbol)get_ticker_price(symbol)Latest traded price

### Add Exchange Adapter

Implement adapter in trader/exchanges/ matching HyperliquidClient interface (get_candles, get_balance, get_positions, place_order, etc.).
Register in trader/exchanges/factory.py keyed by trading.exchange.
Update config trading.exchange and rerun backtest/test-mode.

### Integrate New Strategy

Follow trader/strategies/INTEGRATION.md to subclass BaseStrategy and register in get_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.
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: ai-chen2050
- Version: 1.0.8
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-12T08:37:24.650Z
- Expires at: 2026-05-19T08:37:24.650Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/moltrade)
- [Send to Agent page](https://openagent3.xyz/skills/moltrade/agent)
- [JSON manifest](https://openagent3.xyz/skills/moltrade/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/moltrade/agent.md)
- [Download page](https://openagent3.xyz/downloads/moltrade)