Polymarket FastLoop Trader
Trade Polymarket's 5-minute crypto fast markets using real-time price signals. Default: BTC momentum from Binance. Works with ETH and SOL too.
Polymarket only. All trades execute on Polymarket with real USDC. Use --live for real trades, dry-run is the default.
This is a template. The default signal (Binance momentum) gets you started — remix it with your own signals, data sources, or strategy. The skill handles all the plumbing (market discovery, import, trade execution). Your agent provides the alpha.
⚠️ Fast markets carry Polymarket's 10% fee (is_paid: true). Factor this into your edge calculations.
⚠️ Risk monitoring does not apply to sub-15-minute markets. Simmer's stop-loss and take-profit monitors check positions every 15 minutes — which means they will never fire on 5m or 15m markets before resolution. Any risk settings you configure in the Simmer dashboard have no effect on these positions. Size accordingly and do not rely on automated stop-losses for fast market trades.
How It Finds Markets
- - Queries Polymarket directly (Gamma API) for live fast markets — doesn't depend on Simmer's market inventory
- Discovers new markets as they appear, every cycle
- Works with BTC, ETH, or SOL — just change the asset (
--set asset=ETH) or ask your bot to look for whatever market you want - Runs every 5 minutes to catch each trading window (or every 1 minute for mid-window opportunities)
You don't need to wait for markets to show up in Simmer. FastLoop finds them in real-time on Polymarket, then imports and trades them through Simmer.
When to Use This Skill
Use this skill when the user wants to:
- - Trade crypto sprint/fast markets (5-minute or 15-minute) on any supported asset
- Automate short-term crypto prediction trading
- Use CEX price momentum (or any custom signal) as a Polymarket signal
- Monitor sprint market positions
Setup Flow
When user asks to install or configure this skill:
- 1. Ask for Simmer API key
- Get from simmer.markets/dashboard → SDK tab
- Store in environment as INLINECODE3
- 2. Ask for wallet private key (required for live trading)
- This is the private key for their Polymarket wallet (the wallet that holds USDC)
- Store in environment as
WALLET_PRIVATE_KEY
- The SDK uses this to sign orders client-side automatically — no manual signing needed
- 3. Ask about settings (or confirm defaults)
- Asset: BTC, ETH, or SOL (default BTC)
- Entry threshold: Min divergence to trade (default 5¢)
- Max position: Amount per trade (default $5.00)
- Window: 5m or 15m (default 5m)
- 4. Set up cron or loop (user drives scheduling — see "How to Run on a Loop")
Quick Start
CODEBLOCK0
How to Run on a Loop
The script runs one cycle — your bot drives the loop. Set up a cron job or heartbeat:
Linux crontab (local/VPS installs):
CODEBLOCK1
OpenClaw native cron (containerized or OpenClaw-managed setups):
CODEBLOCK2
Via OpenClaw heartbeat: Add to your HEARTBEAT.md:
CODEBLOCK3
Configuration
Configure via config.json, environment variables, or --set:
CODEBLOCK4
Settings
| Setting | Default | Env Var | Description |
|---|
| INLINECODE7 | 0.05 | INLINECODE8 | Min price divergence from 50¢ to trigger |
| INLINECODE9 |
0.5 |
SIMMER_SPRINT_MOMENTUM | Min BTC % move to trigger |
|
max_position | 5.0 |
SIMMER_SPRINT_MAX_POSITION | Max $ per trade |
|
signal_source | binance |
SIMMER_SPRINT_SIGNAL | Price feed (binance, coingecko) |
|
lookback_minutes | 5 |
SIMMER_SPRINT_LOOKBACK | Minutes of price history |
|
min_time_remaining | 60 |
SIMMER_SPRINT_MIN_TIME | Skip fast markets with less time left (seconds) |
|
asset | BTC |
SIMMER_SPRINT_ASSET | Asset to trade (BTC, ETH, SOL) |
|
window | 5m |
SIMMER_SPRINT_WINDOW | Market window duration (5m or 15m) |
|
volume_confidence | true |
SIMMER_SPRINT_VOL_CONF | Weight signal by Binance volume |
Example config.json
CODEBLOCK5
CLI Options
CODEBLOCK6
Signal Logic
Default signal (Binance momentum):
- 1. Fetch last 5 one-minute candles from Binance (
BTCUSDT) - Calculate momentum: INLINECODE26
- Compare momentum direction to current Polymarket odds
- Trade when:
- Momentum ≥
min_momentum_pct (default 0.5%)
- Price diverges from 50¢ by ≥
entry_threshold (default 5¢)
- Volume ratio > 0.5x average (filters out thin moves)
Example: BTC up 0.8% in last 5 min, but fast market YES price is only $0.52. The 3¢ divergence from the expected ~$0.55 → buy YES.
Remix It: Plug In Your Own Signal
This skill is a template. The default Binance momentum signal is just a starting point. The skill handles all the boring parts (market discovery, import, order execution, budget tracking). You bring the signal.
Ideas for custom signals:
- - Multi-exchange spreads: Compare prices across Binance, Kraken, Bitfinex — divergence between exchanges can predict CLOB direction
- Sentiment: Layer in Twitter/social signals — a viral tweet can move fast markets before the CLOB adjusts
- Technical indicators: RSI, VWAP, order flow analysis from your favorite data source
- News: Breaking news correlation — use your agent's reasoning to interpret headlines
- On-chain data: Whale movements, funding rates, liquidation levels
To customize, edit get_momentum() in fastloop_trader.py or add your own signal function. The rest of the skill (discovery, import, sizing, fee-aware EV check) stays the same.
Example Output
CODEBLOCK7
Source Tagging
All trades are tagged with source: "sdk:fastloop". This means:
- - Portfolio shows breakdown by strategy
- Other skills won't interfere with your fast market positions
- You can track fast market P&L separately
Troubleshooting
"No active fast markets found"
- - Fast markets may not be running (off-hours, weekends)
- Check Polymarket directly for active BTC fast markets
"No fast markets with >60s remaining"
- - Current window is about to expire, next one isn't live yet
- Reduce
min_time_remaining if you want to trade closer to expiry
"Import failed: Rate limit exceeded"
- - Free tier: 10 imports/day. Pro: 50/day
- Fast market trading needs Pro for reasonable frequency
"Failed to fetch price data"
- - Binance API may be down or rate limited
- Try
--set signal_source=coingecko as fallback
"Trade failed: no liquidity"
- - Fast market has thin book, try smaller position size
"External wallet requires a pre-signed order"
- -
WALLET_PRIVATE_KEY is not set in the environment - The SDK signs orders automatically when this env var is present — no manual signing code needed
- Fix: INLINECODE35
- Do NOT attempt to sign orders manually or modify the skill code — the SDK handles it
"Balance shows $0 but I have USDC on Polygon"
- - Polymarket uses USDC.e (bridged USDC, contract
0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174) — not native USDC - If you bridged USDC to Polygon recently, you likely received native USDC
- Swap native USDC to USDC.e, then retry
Polymarket FastLoop 交易器
使用实时价格信号交易 Polymarket 的 5 分钟加密货币快速市场。默认:来自币安的 BTC 动量。也支持 ETH 和 SOL。
仅限 Polymarket。 所有交易均在 Polymarket 上使用真实 USDC 执行。使用 --live 进行真实交易,默认模式为模拟运行。
这是一个模板。 默认信号(币安动量)可让您快速上手——您可以用自己的信号、数据源或策略进行混搭。该技能处理所有底层工作(市场发现、导入、交易执行)。您的智能体提供阿尔法收益。
⚠️ 快速市场收取 Polymarket 10% 的费用(is_paid: true)。请在计算您的优势时考虑这一因素。
⚠️ 风险监控不适用于 15 分钟以下的市场。 Simmer 的止损和止盈监控每 15 分钟检查一次持仓——这意味着它们永远不会在 5 分钟或 15 分钟市场结算前触发。您在 Simmer 仪表板中配置的任何风险设置对这些持仓均无效。请相应调整仓位大小,不要依赖自动止损进行快速市场交易。
如何发现市场
- - 直接查询 Polymarket(Gamma API)获取实时快速市场——不依赖 Simmer 的市场库存
- 在每个周期发现新出现的市场
- 支持 BTC、ETH 或 SOL——只需更改资产(--set asset=ETH)或让您的机器人寻找您想要的任何市场
- 每 5 分钟运行一次以捕捉每个交易窗口(或每 1 分钟运行以捕捉窗口中期机会)
您无需等待市场出现在 Simmer 中。 FastLoop 在 Polymarket 上实时发现市场,然后通过 Simmer 导入并进行交易。
何时使用此技能
当用户想要以下操作时使用此技能:
- - 交易任何支持资产的加密货币短跑/快速市场(5 分钟或 15 分钟)
- 自动化短期加密货币预测交易
- 使用 CEX 价格动量(或任何自定义信号)作为 Polymarket 信号
- 监控短跑市场持仓
设置流程
当用户要求安装或配置此技能时:
- 1. 询问 Simmer API 密钥
- 从 simmer.markets/dashboard → SDK 标签页获取
- 存储在环境变量中,名为 SIMMER
APIKEY
- 2. 询问钱包私钥(实时交易必需)
- 这是其 Polymarket 钱包(持有 USDC 的钱包)的私钥
- 存储在环境变量中,名为 WALLET
PRIVATEKEY
- SDK 使用此密钥自动在客户端签署订单——无需手动签署
- 3. 询问设置(或确认默认值)
- 资产:BTC、ETH 或 SOL(默认 BTC)
- 入场阈值:触发交易的最小偏差(默认 5 美分)
- 最大仓位:每笔交易金额(默认 $5.00)
- 窗口:5 分钟或 15 分钟(默认 5 分钟)
- 4. 设置定时任务或循环(用户驱动调度——请参阅如何循环运行)
快速开始
bash
设置您的 API 密钥
export SIMMER
APIKEY=your-key-here
模拟运行——查看将会发生什么
python fastloop_trader.py
上线运行
python fastloop_trader.py --live
上线运行 + 静默模式(用于定时任务/心跳循环)
python fastloop_trader.py --live --quiet
上线运行 + 智能仓位(每笔交易使用余额的 5%)
python fastloop_trader.py --live --smart-sizing --quiet
如何循环运行
脚本运行一个周期——您的机器人驱动循环。设置定时任务或心跳:
Linux crontab(本地/VPS 安装):
每 5 分钟(每个快速市场窗口一次)
/5 * cd /path/to/skill && python fastloop_trader.py --live --quiet
每 1 分钟(更激进,捕捉窗口中期机会)
- * cd /path/to/skill && python fastloop_trader.py --live --quiet
OpenClaw 原生定时任务(容器化或 OpenClaw 管理的设置):
bash
openclaw cron add \
--name Fast Loop Trader \
--cron /5 * \
--tz UTC \
--session isolated \
--message Run fast loop trader: cd /path/to/skill && python fastloop_trader.py --live --quiet. Show the output summary. \
--announce
通过 OpenClaw 心跳: 添加到您的 HEARTBEAT.md:
Run: cd /path/to/fast market && python fastloop_trader.py --live --quiet
配置
通过 config.json、环境变量或 --set 进行配置:
bash
更改入场阈值
python fastloop
trader.py --set entrythreshold=0.08
交易 ETH 而非 BTC
python fastloop_trader.py --set asset=ETH
多个设置
python fastloop
trader.py --set minmomentum
pct=0.3 --set maxposition=10
设置
| 设置 | 默认值 | 环境变量 | 描述 |
|---|
| entrythreshold | 0.05 | SIMMERSPRINTENTRY | 触发交易的最小价格偏离 50 美分 |
| minmomentumpct |
0.5 | SIMMERSPRINT_MOMENTUM | 触发交易的最小 BTC 百分比变动 |
| max
position | 5.0 | SIMMERSPRINT
MAXPOSITION | 每笔交易最大金额(美元) |
| signal
source | binance | SIMMERSPRINT_SIGNAL | 价格数据源(binance、coingecko) |
| lookback
minutes | 5 | SIMMERSPRINT_LOOKBACK | 价格历史回顾分钟数 |
| min
timeremaining | 60 | SIMMER
SPRINTMIN_TIME | 跳过剩余时间更少的快速市场(秒) |
| asset | BTC | SIMMER
SPRINTASSET | 要交易的资产(BTC、ETH、SOL) |
| window | 5m | SIMMER
SPRINTWINDOW | 市场窗口持续时间(5m 或 15m) |
| volume
confidence | true | SIMMERSPRINT
VOLCONF | 按币安成交量加权信号 |
示例 config.json
json
{
entry_threshold: 0.08,
minmomentumpct: 0.3,
max_position: 10.0,
asset: BTC,
window: 5m,
signal_source: binance
}
CLI 选项
bash
python fastloop_trader.py # 模拟运行
python fastloop_trader.py --live # 真实交易
python fastloop_trader.py --live --quiet # 静默模式,仅显示交易/错误
python fastloop_trader.py --smart-sizing # 基于投资组合的仓位管理
python fastloop_trader.py --positions # 显示开放的快速市场持仓
python fastloop_trader.py --config # 显示当前配置
python fastloop_trader.py --set KEY=VALUE # 更新配置
信号逻辑
默认信号(币安动量):
- 1. 从币安获取最近 5 个 1 分钟 K 线(BTCUSDT)
- 计算动量:(当前价格 - 5 分钟前价格) / 5 分钟前价格
- 将动量方向与当前 Polymarket 赔率进行比较
- 在以下情况下进行交易:
- 动量 ≥ min
momentumpct(默认 0.5%)
- 价格偏离 50 美分 ≥ entry_threshold(默认 5 美分)
- 成交量比率 > 平均值的 0.5 倍(过滤掉薄弱的波动)
示例: BTC 在过去 5 分钟内上涨 0.8%,但快速市场 YES 价格仅为 $0.52。与预期的 ~$0.55 存在 3 美分偏差 → 买入 YES。
混搭:接入您自己的信号
此技能是一个模板。 默认的币安动量信号只是一个起点。该技能处理所有繁琐的部分(市场发现、导入、订单执行、预算跟踪)。您提供信号。
自定义信号的想法:
- - 多交易所价差: 比较币安、Kraken、Bitfinex 之间的价格——交易所之间的偏差可以