微算力 · API 导航与自营网关
API 接入 EN
未登录登录
📈

智能动量交易,自定义策略轻松部署

Aion Test Skill · v1.0.0
专业技能 安全 B 级 作者 skybinjf 公开目录收录
1.2k 下载 0 安装 5.1k 收藏 10 浏览

简介

自动化 Polymarket 动量交易策略工具,支持价格趋势信号检测与风险管理,适合量化交易者自定义信号逻辑。

原始描述

Automated Polymarket trading skill based on price momentum signals—executes trades when market trends are detected

通过你的 Agent 添加

安装目录:momentum-polymarket-trader/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/aion-test-skill/
Codex CLI~/.codex/skills/aion-test-skill/
DeepSeek Harness~/.agents/skills/aion-test-skill/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

技能正文


name: momentum-polymarket-trader description: Automated Polymarket trading skill based on price momentum signals—executes trades when market trends are detected metadata: author: "AION Trader" version: "1.0.0" displayName: "Momentum Polymarket Trader" difficulty: "intermediate"

Momentum Polymarket Trader

An automated trading skill that executes trades on Polymarket based on price momentum and market trend signals.

Features

  • 🎯 Automatically monitors opportunity markets on Polymarket
  • 📊 Analyzes price momentum and trend signals
  • ⚠️ Built-in risk management and flip-flop detection
  • 🔄 Auto-redeems winnings from resolved markets
  • 📝 Detailed reasoning logs for every trade

How It Works

This skill runs every 15 minutes and:

  1. Fetches Market Briefing - Gets current opportunity markets from AION API
  2. Risk Check - Checks for risk alerts; pauses trading if any exist
  3. Market Analysis - For each candidate market:
    • Fetches market context and trading discipline data
    • Calculates price momentum indicators
    • Evaluates trading edge
  4. Executes Trades - Trades when positive edge is found with no warnings
  5. Auto-Redeems - Periodically redeems winnings from resolved markets

Remixable Template

This is a customizable template. The default signal is based on simple price momentum — you can replace it with:

  • Different technical indicators (RSI, MACD, etc.)
  • Machine learning model predictions
  • External data sources (news, social media sentiment, etc.)
  • Custom market scoring algorithms

The skill handles all the plumbing (market discovery, order execution, position management, safeguards). Your agent provides the alpha — just replace the calculate_signal() function.

Configuration

Required Environment Variables

Optional Environment Variables

  • WALLET_PRIVATE_KEY - Only needed for external-wallet self-custody trading
  • POLYGON_RPC_URL - Custom Polygon RPC endpoint (optional)
  • MAX_POSITION_SIZE - Maximum position per market (default: 10 USDC)
  • MIN_EDGE_THRESHOLD - Minimum edge threshold for trading (default: 0.05, i.e., 5%)

Running Modes

Dry-run Mode (Default)

python momentum_trader.py

This simulates trades without executing real orders.

Live Trading Mode

python momentum_trader.py --live

⚠️ Warning: This executes trades with real funds!

Customizing Signals

Edit the calculate_signal() function in momentum_trader.py to implement your trading strategy:

def calculate_signal(market_data, context):
    """
    Replace this function to implement your custom signal logic
    
    Returns:
    - side: "yes" or "no" or None (no trade)
    - confidence: confidence level between 0-1
    - reasoning: human-readable trade rationale
    """
    # Your custom logic here
    pass

Risk Management

This skill includes multiple layers of protection:

  1. Flip-flop detection - Avoids frequent position reversals
  2. Slippage estimation - Reduces trade size in high-slippage markets
  3. Risk alert checks - Pauses trading when account-level risks are detected
  4. Position limits - Maximum exposure per market
  5. Edge validation - Only trades when expected edge exceeds threshold

Monitoring & Logs

Skill output includes:

  • Risk status summary
  • Decision for each market (TRADE, HOLD, SKIP)
  • Position changes and order updates
  • Trade execution results

Example Output

======================================================================
Skill: momentum-polymarket-trader
Venue: polymarket (USDC.e)

Risk alerts:
- none

Decisions:
- "Will Bitcoin reach $100K in 2025?": HOLD (edge too small +2.1%)
- "2026 US Midterm Elections": TRADE YES size=5 reason=momentum signal +7.8%
- "OpenAI valuation over $300B?": SKIP (flip-flop warning)

Order updates:
- cancelled ORDER_123 (stale)
- new order ORDER_456 submitted

Auto-redemptions:
- redeemed market MKT_789: tx=0xabc...def

Technical Details

  • Polling interval: 15 minutes (with random jitter to avoid synchronization)
  • Dependencies: aion-sdk, requests
  • Python version: 3.8+
  • Network: Polygon (USDC.e)

Troubleshooting

"No opportunity markets found"

Check your AION agent settings for risk thresholds and market filters.

"Invalid API key"

Ensure the AION_API_KEY environment variable is set correctly.

"Insufficient balance"

Check your wallet balance at https://pm-t1.bxingupdate.com/agents

Next Steps

  1. Install skill: npx clawhub@latest install momentum-polymarket-trader
  2. Configure your AION_API_KEY
  3. Test in dry-run mode
  4. Customize signal logic
  5. Switch to live mode (use caution!)

License

MIT License - free to use, modify, and distribute.

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

tradingdefiprediction-marketsautomationpolymarketmomentum-strategyquantitative-trading

同类 Skill