← 返回
开发者工具 Key 中文

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...
Jupiter 预测市场 API 的完整 Node.js 客户端。适用于构建预测市场交易、投资组合管理或自动化交易的 AI 智能体。
moltbotteam
开发者工具 clawhub v0.1.0 1 版本 100000 Key: 需要
★ 1
Stars
📥 669
下载
💾 10
安装
1
版本
#latest

概述

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

CategoryMethods
-------------------
Eventslist, search, getEvent, suggested
MarketsgetMarket, orderbook
Orderscreate, listOrders, status, cancelOrder
PositionslistPositions, getPosition, closePosition, closeAllPositions, claim
HistorylistHistory, getHistoryByPosition
Socialprofile, pnlHistory, trades, leaderboards, follow/unfollow

Utility Functions

FunctionDescription
-----------------------
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 <wallet-address>

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

# Portfolio health check
node scripts/portfolio-health.js <wallet-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

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-03-31 03:17 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 921 📥 185,937
developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 68 📥 180,520
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 672 📥 324,585