← 返回 Skills 市场
moltbotteam

Jupiter Prediction Market

作者 MoltBot · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ⚠ suspicious
330
总下载
1
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install jupiter-prediction-market
功能描述
Complete Node.js client for Jupiter Prediction Market API. Use when building AI agents for prediction market trading, portfolio management, or automated trad...
使用说明 (SKILL.md)

Jupiter Prediction Skill v1.0

Purpose

Enable AI agents to interact with Jupiter Prediction Market API for autonomous trading and portfolio management.

When to Use

  • Build autonomous trading bots or agents
  • Query market data, events, and user positions
  • Create automated market scanning and opportunity detection
  • Monitor portfolio health and risk
  • Claim payouts after market settlement

Scope

  • Read/write access to Jupiter Prediction API
  • Requires API key from Jupiter Portal
  • All transactions require user signature via Solana wallet
  • Beta API - subject to breaking changes

Quick Start

const { JupiterPrediction, parseEventsResponse, formatUsd } = require('./src');

const client = new JupiterPrediction();

const events = await client.list({ category: 'crypto', filter: 'trending', limit: 5 });
const parsed = parseEventsResponse(events);
console.log('Events:', parsed.data.map(e => e.title));

Configuration

export JUPITER_API_KEY=your-api-key

Or use config file config/api-key.json.

Supported Capabilities

Client Endpoints

Category Methods
Events list, search, getEvent, suggested
Markets getMarket, orderbook
Orders create, listOrders, status, cancelOrder
Positions listPositions, getPosition, closePosition, closeAllPositions, claim
History listHistory, getHistoryByPosition
Social profile, pnlHistory, trades, leaderboards, follow/unfollow

Utility Functions

Function Description
microUsdToUsd(microUsd) Convert micro USD to USD
formatUsd(microUsd, decimals) Format as currency string
calculateProbability(yesPrice) Implied probability (%)
parseEventsResponse(response) Parse event data
parseMarketResponse(market) Parse market data
parsePositionsResponse(response) Parse position data
filterClaimable(positions) Filter claimable positions
filterOpen(positions) Filter open positions
aggregatePnL(positions) Calculate total P&L

Bundled Scripts

Run from project root:

# Scan markets by criteria
node scripts/scan-markets.js --crypto --limit=10 --min-volume=10000

# Find mispriced opportunities
node scripts/find-opportunities.js --threshold=20 --min-volume=50000

# Monitor portfolio
node scripts/monitor-portfolio.js \x3Cwallet-address>

# Auto-claim winnings
node scripts/auto-claim.js \x3Cwallet-address> [--dry-run] [--min=1]

# Portfolio health check
node scripts/portfolio-health.js \x3Cwallet-address>

Bundled Workflows

The bundled scripts provide complete autonomous agent workflows:

  1. Market Scanner - Find markets by volume, probability, category
  2. Opportunity Finder - Detect mispriced markets
  3. Portfolio Monitor - Track positions, P&L, claimable
  4. Auto-Claim - Batch claim winnings
  5. Portfolio Health - Risk checks (position limits, diversification)
  6. Trading Cycle - Complete discovery → evaluation → execution

Code Examples

See src/ for available endpoints and utilities:

  • src/client.js - Main API client class
  • src/index.js - Exports and utility functions
  • src/endpoints/ - Individual endpoint modules
  • src/utils/ - Helper functions (parser, prices, errors)

API Reference

Client methods are documented in code comments. Main classes:

  • JupiterPrediction - Main client (src/client.js)
  • Utility functions in src/index.js

Verification

Verify syntax:

node --check src/index.js
node --check src/client.js

Run a script (requires JUPITER_API_KEY):

export JUPITER_API_KEY=your-key
node scripts/scan-markets.js --crypto --limit=5

Version

  • v1.0.0

License

MIT

安全使用建议
This skill largely implements a Jupiter Prediction Market client, but there are a few things to check before using it: - API key handling: The code expects a JUPITER_API_KEY environment variable or saves the key to config/api-key.json in the current working directory. The registry metadata does not declare this; assume the skill will read and may write an API key file. If you install it, avoid putting long-lived/privileged keys there — use a restricted/ephemeral key if possible. - Persistence: ApiKeyManager.setApiKey() writes config/api-key.json. That will persist secrets on disk under the agent's working directory. If you run this in a shared environment, consider running in an isolated sandbox or container and delete the file after use. - Missing/inconsistent files: src/market_manager.js requires '../api_client' and '../utils' paths that aren't present in the repo and contains mixed-language comments. This indicates the package may be incomplete or poorly packaged; test the scripts in a safe environment before relying on them. - Wallet signing: SKILL.md says transactions require user Solana wallet signatures, but the code does not implement signing flows. Do NOT provide private keys to this package. Confirm how on-chain actions are authorized (external wallet, hardware wallet, or separate signing process) before attempting to create/cancel trades or claim payouts. - Run in sandbox and review code: Because this skill can perform network requests and persist an API key, review the code yourself or run it in an isolated environment. Prefer ephemeral API keys, least-privilege credentials, and monitor network activity. If you don’t trust the author or need autonomous trading, consider a security review or use a vetted client instead.
功能分析
Type: OpenClaw Skill Name: jupiter-prediction-market Version: 0.1.0 The bundle is a legitimate Node.js client for the Jupiter Prediction Market API on Solana, providing tools for market discovery, portfolio monitoring, and automated claiming of payouts. The code implements standard API client patterns, including rate limiting, error handling, and local configuration management via environment variables or a config file (src/utils/api-key.js). While src/market_manager.js contains broken relative imports (referencing non-existent files like api_client.js), this appears to be an unintentional development artifact rather than malicious intent. No evidence of data exfiltration, unauthorized execution, or prompt injection was found.
能力评估
Purpose & Capability
Name/description match the code: this is a Node.js client exposing endpoints and scripts for scanning markets, managing positions, and claiming payouts. However the registry metadata declared no required env vars/credentials while the SKILL.md and code clearly expect a JUPITER_API_KEY (or a config/api-key.json). Also some source files (src/market_manager.js) reference modules with different paths (../api_client, ../utils) that are not present, indicating sloppy packaging or incomplete code.
Instruction Scope
SKILL.md instructs the agent to use an API key (JUPITER_API_KEY) or config/api-key.json and to run bundled scripts that perform market scanning, claiming, and trading workflows. The instructions mention transactions require user Solana wallet signatures, but the scripts and client do not include wallet signing integration — they only pass ownerPubkey strings to API endpoints. The skill's runtime instructions legitimately require access to an API key and may persist it locally; they do not ask for unrelated system files, but they are vague about how signing/authorization for on-chain actions is handled.
Install Mechanism
No install spec — instruction/code-only. package.json lists a single runtime dependency (cross-fetch) which is proportionate. There are no remote downloads or extract steps and no unusual external URLs in the repo, so installation risk is low from a supply-chain-download perspective. However the package will include code that performs filesystem operations (reading/writing config/api-key.json).
Credentials
Registry metadata declares no required environment variables, but both SKILL.md and src/utils/api-key.js expect JUPITER_API_KEY (process.env.JUPITER_API_KEY) or the config/api-key.json file. The ApiKeyManager can write the API key to disk (config/api-key.json) and read it; that is reasonable for a client library but the lack of declared env requirements in the metadata is an inconsistency. No other credentials are requested, and code does not attempt to read unrelated system credentials, but writing persistent API keys to the agent's working directory is a sensitive action that should be acknowledged.
Persistence & Privilege
always: false (good). But the code provides ApiKeyManager.setApiKey which writes config/api-key.json in process.cwd(), and ApiKeyManager.getApiKey will read from that file — so the skill can persist API credentials to disk. This is expected for a client library but is meaningful persistence within an agent environment and increases blast radius if an API key is misused. The skill does not request elevated system-wide privileges, but the ability to write a credentials file is noteworthy.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install jupiter-prediction-market
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /jupiter-prediction-market 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
Jupiter Prediction Market Skill v0.1.0 - Initial release with complete Node.js client for Jupiter Prediction Market API. - Supports event and market querying, trading position management, claiming payouts, and portfolio monitoring. - Includes utility functions for price formatting, probability, and position filtering. - Provides bundled scripts and workflows for market scanning, opportunity detection, auto-claiming, and risk checks. - Requires Jupiter API key and Solana wallet for transactions.
元数据
Slug jupiter-prediction-market
版本 0.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Jupiter Prediction Market 是什么?

Complete Node.js client for Jupiter Prediction Market API. Use when building AI agents for prediction market trading, portfolio management, or automated trad... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 330 次。

如何安装 Jupiter Prediction Market?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install jupiter-prediction-market」即可一键安装,无需额外配置。

Jupiter Prediction Market 是免费的吗?

是的,Jupiter Prediction Market 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Jupiter Prediction Market 支持哪些平台?

Jupiter Prediction Market 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Jupiter Prediction Market?

由 MoltBot(@moltbotteam)开发并维护,当前版本 v0.1.0。

💬 留言讨论