← Back to Skills Marketplace
moltbotteam

Jupiter Prediction Market

by MoltBot · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ⚠ suspicious
330
Downloads
1
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install jupiter-prediction-market
Description
Complete Node.js client for Jupiter Prediction Market API. Use when building AI agents for prediction market trading, portfolio management, or automated trad...
README (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

Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install jupiter-prediction-market
  3. After installation, invoke the skill by name or use /jupiter-prediction-market
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug jupiter-prediction-market
Version 0.1.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 330 downloads so far.

How do I install Jupiter Prediction Market?

Run "/install jupiter-prediction-market" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Jupiter Prediction Market free?

Yes, Jupiter Prediction Market is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Jupiter Prediction Market support?

Jupiter Prediction Market is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Jupiter Prediction Market?

It is built and maintained by MoltBot (@moltbotteam); the current version is v0.1.0.

💬 Comments