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…
от jiayaoqijia★ 81 звезда на GitHub
Установить jupiter-prediction-market в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
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 <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:
- Market Scanner - Find markets by volume, probability, category
- Opportunity Finder - Detect mispriced markets
- Portfolio Monitor - Track positions, P&L, claimable
- Auto-Claim - Batch claim winnings
- Portfolio Health - Risk checks (position limits, diversification)
- Trading Cycle - Complete discovery → evaluation → execution
Code Examples
See src/ for available endpoints and utilities:
src/client.js- Main API client classsrc/index.js- Exports and utility functionssrc/endpoints/- Individual endpoint modulessrc/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
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- SOURCE.md
- TRUST.auto.yaml
- _meta.json
- documentation/api-reference.md
- documentation/examples.md
- documentation/workflows.md
- package.json
- scripts/auto-claim.js
- scripts/demo_market_showcase.js
- scripts/find-opportunities.js
- scripts/monitor-portfolio.js
- scripts/portfolio-health.js
- scripts/scan-markets.js
- skill-card.md
- src/client.js
- src/endpoints/events.js
- src/endpoints/history.js
- src/endpoints/markets.js
- src/endpoints/orders.js
- src/endpoints/payouts.js
- src/endpoints/positions.js
- src/endpoints/social.js
- src/index.js
- src/market_manager.js
- src/utils/api-key.js
- src/utils/errors.js
- src/utils/parser.js
- src/utils/prices.js
FAQ
Что делает скилл 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 trading bots on Solana. Covers: (1) Querying events, markets, orders, positions, payouts, history, and social features, (2) Creating/managing trading positions, (3) Claiming payouts after market settlement, (4) Building autonomous agent workflows for market scanning, opportunity finding, portfolio monitoring, and risk management.
Как установить скилл jupiter-prediction-market?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл jupiter-prediction-market запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…