polymarket-mert-sniper
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMert Sniper
Mert Sniper
Near-expiry conviction trading on Polymarket. Snipe markets about to resolve when the odds are heavily skewed.
Strategy by @mert — filter by topic, cap your bets, wait until near expiry, and only trade strong splits.
This is a template. The default logic (expiry + split filter) gets you started — remix it with your own filters, timing rules, or market selection criteria. The skill handles all the plumbing (market discovery, trade execution, safeguards). Your agent provides the alpha.
基于Polymarket的临到期信念交易工具,当赔率严重倾斜时狙击即将结算的市场。
策略由@mert提出——按主题筛选、设置投注上限、等待临近到期时间,仅交易赔率差大的标的。
这是一个模板。 默认逻辑(到期时间+赔率差筛选)可以帮你快速上手——你可以自定义添加筛选条件、时间规则或市场选择标准。该skill会处理所有底层流程(市场发现、交易执行、风险保障),你的Agent负责提供超额收益策略。
When to Use This Skill
何时使用该Skill
Polymarket only. All trades execute on Polymarket with real USDC. Usefor real trades, dry-run is the default.--live
Use this skill when the user wants to:
- Trade markets that are about to resolve (last-minute conviction bets)
- Filter by topic (e.g. only SOL/crypto markets)
- Cap bet size (e.g. never more than $10)
- Only trade when odds are strongly skewed (e.g. 60/40 or better)
- Run an automated expiry-sniping strategy
仅支持Polymarket。 所有交易都使用真实USDC在Polymarket执行。使用参数执行真实交易,默认是试运行模式。--live
当用户想要实现以下需求时可使用该skill:
- 交易即将结算的市场(最后一分钟信念投注)
- 按主题筛选(例如仅SOL/crypto相关市场)
- 设置投注金额上限(例如单笔不超过10美元)
- 仅在赔率严重倾斜时交易(例如60/40或更高的赔率差)
- 运行自动临到期狙击策略
Setup Flow
设置流程
-
Ask for Simmer API key
- Get it from simmer.markets/dashboard -> SDK tab
- Store in environment as
SIMMER_API_KEY
-
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
-
Ask about settings (or confirm defaults)
- Market filter: Which markets to scan (default: all)
- Max bet: Maximum per trade (default $10)
- Expiry window: How close to resolution (default 2 minutes)
- Min split: Minimum odds skew (default 60/40)
-
Save settings to config.json or environment variables
-
索要Simmer API密钥
- 从simmer.markets/dashboard -> SDK标签页获取
- 存储在环境变量中,变量名为
SIMMER_API_KEY
-
索要钱包私钥(实盘交易必需)
- 这是你Polymarket钱包的私钥(持有USDC的钱包)
- 存储在环境变量中,变量名为
WALLET_PRIVATE_KEY - SDK会用这个私钥在客户端自动签名订单——无需手动签名
-
询问设置项(或确认默认值)
- 市场筛选:要扫描哪些市场(默认:全部)
- 最高投注额:单笔交易最高金额(默认10美元)
- 到期窗口:距离结算的最长时间(默认2分钟)
- 最小赔率差:最低赔率倾斜阈值(默认60/40)
-
将设置保存到config.json或环境变量中
Configuration
配置项
| Setting | Environment Variable | Default | Description |
|---|---|---|---|
| Market filter | | (all) | Tag or keyword filter (e.g. |
| Max bet | | 10.00 | Maximum USD per trade |
| Expiry window | | 2 | Only trade markets resolving within N minutes |
| Min split | | 0.60 | Only trade when YES or NO >= this (e.g. 0.60 = 60/40) |
| Max trades/run | | 5 | Maximum trades per scan cycle |
| Smart sizing % | | 0.05 | % of balance per trade |
| 设置项 | 环境变量 | 默认值 | 描述 |
|---|---|---|---|
| 市场筛选 | | 全部 | 标签或关键词筛选(例如 |
| 最高投注额 | | 10.00 | 单笔交易最高美元金额 |
| 到期窗口(分钟) | | 2 | 仅交易N分钟内即将结算的市场 |
| 最小赔率差 | | 0.60 | 仅当YES或NO的赔率>=该值时交易(例如0.60对应60/40) |
| 每次运行最大交易数 | | 5 | 每个扫描周期最多执行的交易数 |
| 智能仓位占比 | | 0.05 | 单笔交易占账户余额的百分比 |
Quick Commands
快速命令
bash
undefinedbash
undefinedCheck account balance and positions
查看账户余额和持仓
python scripts/status.py
python scripts/status.py
Detailed position list
查看详细持仓列表
python scripts/status.py --positions
**API Reference:**
- Base URL: `https://api.simmer.markets`
- Auth: `Authorization: Bearer $SIMMER_API_KEY`
- Portfolio: `GET /api/sdk/portfolio`
- Positions: `GET /api/sdk/positions`python scripts/status.py --positions
**API参考:**
- 基础URL: `https://api.simmer.markets`
- 鉴权: `Authorization: Bearer $SIMMER_API_KEY`
- 资产组合: `GET /api/sdk/portfolio`
- 持仓: `GET /api/sdk/positions`Running the Skill
运行该Skill
bash
undefinedbash
undefinedDry run (default -- shows opportunities, no trades)
试运行(默认模式——仅展示机会,不执行交易)
python mert_sniper.py
python mert_sniper.py
Execute real trades
执行真实交易
python mert_sniper.py --live
python mert_sniper.py --live
Filter to specific markets
筛选特定市场
python mert_sniper.py --filter solana
python mert_sniper.py --filter solana
Custom expiry window (5 minutes)
自定义到期窗口(5分钟)
python mert_sniper.py --expiry 5
python mert_sniper.py --expiry 5
With smart position sizing (uses portfolio balance)
开启智能仓位计算(基于账户余额)
python mert_sniper.py --live --smart-sizing
python mert_sniper.py --live --smart-sizing
Check positions only
仅查看持仓
python mert_sniper.py --positions
python mert_sniper.py --positions
View config
查看配置
python mert_sniper.py --config
python mert_sniper.py --config
Disable safeguards (not recommended)
关闭风险保障(不推荐)
python mert_sniper.py --no-safeguards
undefinedpython mert_sniper.py --no-safeguards
undefinedHow It Works
工作原理
Each cycle the script:
- Fetches active markets from Simmer API (optionally filtered by tag/keyword)
- Filters to markets resolving within the expiry window (default 2 minutes)
- Checks the price split -- only trades when one side >= min_split (default 60%)
- Determines direction: backs the favored side (higher probability)
- Safeguards: Checks context for flip-flop warnings, slippage, market status
- Execution: Places trade on the favored side, capped at max bet
- Reports summary of scanned, filtered, and traded markets
每个运行周期脚本会执行以下操作:
- 从Simmer API获取活跃市场(可按标签/关键词筛选)
- 筛选出在到期窗口内即将结算的市场(默认2分钟)
- 检查价格差——仅当某一方赔率>=min_split(默认60%)时交易
- 确定交易方向:押注赔率占优的一方(概率更高)
- 风险保障:检查上下文的反转预警、滑点、市场状态
- 执行交易:在占优方下订单,金额不超过最高投注额
- 输出已扫描、筛选、交易的市场汇总信息
Example Output
输出示例
🎯 Mert Sniper - Near-Expiry Conviction Trading
==================================================
[DRY RUN] No trades will be executed. Use --live to enable trading.
Configuration:
Filter: solana
Max bet: $10.00
Expiry window: 2 minutes
Min split: 60/40
Max trades: 5
Smart sizing: Disabled
Safeguards: Enabled
Fetching markets (filter: solana)...
Found 12 active markets
Markets expiring within 2 minutes: 2
SOL highest price on Feb 10?
Resolves in: 1m 34s
Split: YES 72% / NO 28%
Side: YES (72% >= 60%)
[DRY RUN] Would buy $10.00 on YES
Summary:
Markets scanned: 12
Near expiry: 2
Strong split: 1
Trades executed: 0
[DRY RUN MODE - no real trades executed]🎯 Mert Sniper - Near-Expiry Conviction Trading
==================================================
[DRY RUN] No trades will be executed. Use --live to enable trading.
Configuration:
Filter: solana
Max bet: $10.00
Expiry window: 2 minutes
Min split: 60/40
Max trades: 5
Smart sizing: Disabled
Safeguards: Enabled
Fetching markets (filter: solana)...
Found 12 active markets
Markets expiring within 2 minutes: 2
SOL highest price on Feb 10?
Resolves in: 1m 34s
Split: YES 72% / NO 28%
Side: YES (72% >= 60%)
[DRY RUN] Would buy $10.00 on YES
Summary:
Markets scanned: 12
Near expiry: 2
Strong split: 1
Trades executed: 0
[DRY RUN MODE - no real trades executed]Troubleshooting
故障排查
"No markets found"
- Check your filter -- try without a filter first
- Markets may not be available (check simmer.markets)
"No markets expiring within window"
- Increase expiry window: (10 minutes)
--expiry 10 - Or run more frequently (cron every minute)
"Split too narrow"
- Lower the min split:
--set min_split=0.55 - This trades more often but with less conviction
"Resolves in: 17h" on 15-min markets
- Polymarket's is the event-level end-of-day, not the individual market close time
endDate - For 15-min crypto markets (e.g. "BTC Up or Down - Feb 8, 11PM ET"), the actual close time is in the question text but not in the API
- This is a Polymarket data limitation — widen the expiry window () as a workaround, or use the split filter to find conviction opportunities regardless of timing
--expiry 1080
"External wallet requires a pre-signed order"
- is not set in the environment
WALLET_PRIVATE_KEY - The SDK signs orders automatically when this env var is present — no manual signing code needed
- Fix:
export WALLET_PRIVATE_KEY=0x<your-polymarket-wallet-private-key> - 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 ) — not native USDC
0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174 - If you bridged USDC to Polygon recently, you likely received native USDC
- Swap native USDC to USDC.e, then retry
"API key invalid"
- Get new key from simmer.markets/dashboard -> SDK tab
"未找到市场"
- 检查你的筛选条件——先尝试不带筛选条件运行
- 可能暂无可用市场(可查看simmer.markets确认)
"窗口内无即将到期的市场"
- 增大到期窗口:(10分钟)
--expiry 10 - 或者提高运行频率(每分钟定时执行)
"赔率差过小"
- 降低最小赔率差:
--set min_split=0.55 - 该设置会增加交易频率但交易的信念度更低
"15分钟的市场显示'17小时后结算'"
- Polymarket的是事件级别的单日结束时间,不是单个市场的关闭时间
endDate - 对于15分钟加密货币市场(例如"BTC Up or Down - Feb 8, 11PM ET"),实际关闭时间在问题文本中,API未返回该字段
- 这是Polymarket的数据限制——可以通过增大到期窗口()作为临时解决方案,或者直接使用赔率差筛选来寻找高信念交易机会,不受时间限制
--expiry 1080
"外部钱包需要预签名订单"
- 环境变量中未设置
WALLET_PRIVATE_KEY - 当存在该环境变量时SDK会自动签名订单——无需编写手动签名代码
- 解决方法:
export WALLET_PRIVATE_KEY=0x<你的-polymarket-钱包私钥> - 不要尝试手动签名订单或修改skill代码——SDK会自动处理
"余额显示为0但我Polygon上有USDC"
- Polymarket使用USDC.e(跨链桥USDC,合约地址)——不是原生USDC
0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174 - 如果你最近将USDC跨链到Polygon,你收到的大概率是原生USDC
- 将原生USDC兑换为USDC.e后重试即可
"API密钥无效"
- 从simmer.markets/dashboard -> SDK标签页获取新的密钥