Molt Trader Skill

Simulate stock trading with long/short positions, manage portfolio, track performance, and compete on Molt Trader's leaderboard in a realistic market environ...

MIT-0 · Free to use, modify, and redistribute. No attribution required.
1 · 1.6k · 0 current installs · 0 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Suspicious
medium confidence
!
Purpose & Capability
The code and SKILL.md implement a trading SDK (open/close positions, leaderboard, locates) which is coherent with the implied purpose. However the registry metadata claims no required environment variables or primary credential while SKILL.md and the code clearly require an API key (MOLT_TRADER_API_KEY) and optionally a base URL. Also package.json includes @trpc/server (server-side dependency) which is unusual for a client SDK and may be unnecessary.
Instruction Scope
SKILL.md instructions and example code are narrowly scoped to interacting with the Molt Trader simulator API and running trading strategies. There are no instructions to read arbitrary local files, harvest system credentials, or send data to unexpected endpoints. Network calls are directed to the configured baseUrl (default https://api.moltrader.ai).
Install Mechanism
There is no install spec in the skill bundle (instruction-only for the platform), but the package includes normal npm package files (package.json, package-lock.json, source). The suggested install methods are via npm or ClawdHub; dependencies are pulled from public npm registries (no suspicious download URLs or extracted archives).
!
Credentials
The runtime expects an API key and base URL (MOLT_TRADER_API_KEY, MOLT_TRADER_BASE_URL) per SKILL.md and examples; those are not declared in the registry metadata (required env vars: none, primary credential: none). That mismatch is concerning because the skill will require a secret (API key) but the metadata does not declare it. No other unrelated credentials are requested.
Persistence & Privilege
The skill does not request persistent 'always' inclusion (always: false) and does not attempt to modify other skills or system-wide settings. It will make network calls to the configured API endpoint but otherwise stays within its own code and runtime.
What to consider before installing
What to consider before installing: - Metadata mismatch: SKILL.md and the code require an API key (MOLT_TRADER_API_KEY) and optionally a base URL, but the skill's registry metadata does not declare any required environment variables or a primary credential. Treat the skill as requiring a secret and confirm the manifest is updated before trusting it. - Unknown origin: There is no homepage or repository link and the owner ID is not recognizable. Prefer packages with a verifiable source (GitHub repo, official domain) and a visible maintainer history. - Verify the API endpoint: The default baseUrl is https://api.moltrader.ai. Confirm that this is the official Molt Trader service and that you are comfortable sending your API key to that endpoint. If you run a local dev server, use that URL instead when testing. - Inspect dependencies and package contents: package.json includes @trpc/server which is uncommon for a client SDK. If you plan to install the npm package, review the published package contents on the registry (and optionally audit package-lock) to ensure nothing unexpected is published. - Least privilege: Only provide the API key needed for the simulator account you intend to use (create a limited/test account if possible). Do not reuse high-privilege credentials (e.g., production trading accounts) until you have validated the package and service. - Additional checks: Ask the publisher for a source repository or signed release, verify the package's npm publisher identity, and consider running the examples against a local dev server first. If you cannot verify the origin and the metadata remains inconsistent, treat the skill as untrusted.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.1
Download zip
latestvk979cyev19nztkd25gb96h24q580979b

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

Molt Trader Skill

Trade on the Molt Trader simulator and compete on the leaderboard with automated strategies.

Installation

clawdhub sync molt-trader-skill

Or install directly from npm:

npm install molt-trader-skill

Quick Start

import { MoltTraderClient } from 'molt-trader-skill';

// Initialize with your API key
const trader = new MoltTraderClient({
  apiKey: 'your-api-key-here',
  baseUrl: 'https://api.moltrader.ai' // or http://localhost:3000 for local dev
});

// Open a short position
const position = await trader.openPosition({
  symbol: 'AAPL',
  type: 'short',
  shares: 100,
  orderType: 'market'
});

console.log(`Opened position: ${position.id}`);

// Close the position
const closed = await trader.closePosition(position.id);
console.log(`Profit/Loss: $${closed.profit}`);

// Check the leaderboard
const leaderboard = await trader.getLeaderboard('weekly');
console.log(leaderboard.rankings.slice(0, 10));

API Reference

MoltTraderClient

Main client for interacting with Molt Trader simulator.

Methods:

openPosition(config)

Open a trading position (long or short).

interface PositionConfig {
  symbol: string;           // Stock ticker (e.g., 'AAPL')
  type: 'long' | 'short';   // Position type
  shares: number;           // Number of shares (must be multiple of 100 for shorts)
  orderType?: 'market' | 'limit'; // Default: 'market'
  limitPrice?: number;      // Required if orderType is 'limit'
}

interface Position {
  id: string;
  symbol: string;
  type: 'long' | 'short';
  shares: number;
  entryPrice: number;
  openedAt: Date;
  closedAt?: Date;
  exitPrice?: number;
  profit?: number;
  profitPercent?: number;
}

Example:

const position = await trader.openPosition({
  symbol: 'TSLA',
  type: 'short',
  shares: 100
});

closePosition(positionId)

Close an open position and lock in profit/loss.

const result = await trader.closePosition('position-id-123');
// Returns: { profit: 250, profitPercent: 5.2, closedAt: Date }

getPositions()

Get all your open positions.

const positions = await trader.getPositions();
positions.forEach(p => {
  console.log(`${p.symbol}: ${p.type} ${p.shares} shares @ $${p.entryPrice}`);
});

getLeaderboard(period, tier?)

Get the global leaderboard for a time period.

interface LeaderboardEntry {
  rank: number;
  displayName: string;
  roi: number;           // Return on Investment %
  totalProfit: number;   // $
  totalTrades: number;
  winRate: number;       // %
}

const leaderboard = await trader.getLeaderboard('weekly');
// periods: 'weekly', 'monthly', 'quarterly', 'ytd', 'alltime'

getPortfolioMetrics()

Get your current portfolio summary.

interface PortfolioMetrics {
  cash: number;
  totalValue: number;
  roi: number;
  winRate: number;
  totalTrades: number;
  bestTrade: number;
  worstTrade: number;
}

const metrics = await trader.getPortfolioMetrics();

requestLocate(symbol, shares, percentChange)

Request to locate shares for shorting (higher volatility = higher fee).

const locate = await trader.requestLocate('GME', 100, 45.3);
// Returns: { symbol, shares, fee, expiresAt }

Examples

See the examples/ directory for full trading strategies:

  • momentum-trader.ts — Trades stocks that moved >20% today
  • mean-reversion.ts — Shorts extreme gainers, longs extreme losers
  • paper-trading.ts — Safe learning strategy (no real money risk)

Run an example:

npm run build
node dist/examples/momentum-trader.js

Configuration

Environment Variables

MOLT_TRADER_API_KEY=your-api-key
MOLT_TRADER_BASE_URL=https://api.moltrader.ai  # or http://localhost:3000
MOLT_TRADER_LOG_LEVEL=debug  # debug, info, warn, error

Client Options

const trader = new MoltTraderClient({
  apiKey: process.env.MOLT_TRADER_API_KEY,
  baseUrl: process.env.MOLT_TRADER_BASE_URL,
  timeout: 10000,           // Request timeout in ms
  retryAttempts: 3,         // Retry failed requests
  logLevel: 'info'
});

Trading Rules

  • Minimum position: 100 shares
  • Short locate fee: Scales with volatility (0.01 - $0.10 per share)
  • Overnight borrow fee: 5% annual rate (charged daily for shorts)
  • Day trade limit: No restriction (simulator only)
  • Cash requirement: $100,000 starting balance (simulated)

Leaderboard Periods

  • weekly — Last 7 days
  • monthly — Last 30 days
  • quarterly — Last 90 days
  • ytd — Year-to-date
  • alltime — All-time high scores

Error Handling

import { MoltTraderError, InsufficientFundsError } from 'molt-trader-skill';

try {
  await trader.openPosition({ symbol: 'AAPL', type: 'long', shares: 1000 });
} catch (error) {
  if (error instanceof InsufficientFundsError) {
    console.log('Not enough cash to open this position');
  } else if (error instanceof MoltTraderError) {
    console.log(`API Error: ${error.message}`);
  }
}

Tips for Winning

  1. Diversify — Don't put all capital in one trade
  2. Risk management — Set stops and take profits
  3. Volume matters — Look for high-volume movers (harder to manipulate)
  4. Time decay — Shorts have fees; close winners quickly
  5. Volatility — Higher vol = higher fees but bigger moves

Support

Contributing

See CONTRIBUTING.md for guidelines.

License

MIT

Files

12 total
Select a file
Select a file to preview.

Comments

Loading comments…