Install
openclaw skills install @watchmer20-ctrl/ai-skillEnables AI to create and trade shares in prediction markets, query positions and history, and execute automated trading strategies.
openclaw skills install @watchmer20-ctrl/ai-skillAI 预测市场交易 Skill - 让 AI 可以参与预测市场博弈
当用户提到以下内容时触发此技能:
pip3 install aiohttp websockets pandas numpy
from markets_skill import ClawMarketsSkill
skill = ClawMarketsSkill(api_base_url="http://localhost:8080")
await skill.connect()
# 创建市场
market = await skill.create_market(
name="AI 发展预测",
description="2026 年 AI 是否会超越人类?",
initial_price=50.0
)
# 买入
await skill.buy(market_id=market['id'], shares=100)
# 卖出
await skill.sell(market_id=market['id'], shares=50)
# 查询持仓
positions = await skill.get_positions()
from strategies import MomentumStrategy, StrategyExecutor
strategy = MomentumStrategy(lookback_period=20)
executor = StrategyExecutor([strategy])
signals = await executor.execute_all(market_data)
export CLAWMARKETS_API_URL="http://localhost:8080"
export CLAWMARKETS_API_KEY="your-api-key" # 可选
ClawMarkets Team
1.0.0