Atlas / Skills / leoyeai / Polymarket Temperature Event Follower

Polymarket Temperature Event FollowerCAUTION

skills/leoyeai/polymarket-temperature-event-follower

🧠 Curated collection of 1209+ best OpenClaw skills — weekly updated by MyClaw.ai

Verdict
CAUTION
Grade
B
Trust score
88 /100
Version
1.0.1
Hosts
1 documented
License
MIT
Stars
2,160
01

Overview

🧠 Curated collection of 1209+ best OpenClaw skills — weekly updated by MyClaw.ai

Read from source at commit 4f3b4a2a472eOBSERVED · 2026-10-08
02

Install

Commands as the repository documents them. They are shown, not run.

pip install -r requirements.txt
pip install -r requirements.txt
pip install py-clob-client
pip install -r requirements.txt
pip install -r requirements.txt
pip install py-clob-client
03

Host compatibility

What the documentation claims. We have not run a compatibility test.

HostStatusNotes
openclawmentioned
04

What it tells the agent

The instruction file, verbatim from the audited commit — this is the text the model reads, and the surface the audit's instruction layer examines. Quoted here so you can judge it without cloning anything.

---
name: polymarket-temperature-event-follower
description: Automated trader for Polymarket weather highest temperature markets. Scans global weather markets and executes buys during local morning window (9-10 AM) when YES price is favorable. Built for SkillPay billing integration with robust error handling and state persistence.
metadata:
  author: "stefantaylor5"
  version: "1.0.1"
  displayName: "Polymarket Temperature Event Follower"
  difficulty: "intermediate"
  tags: ["polymarket", "weather", "trading", "sniper", "event-driven"]
---

# SkillPay Weather Sniper / 天气狙击机器人

**Polymarket 天气事件市场自动化交易系统**

---

## 📋 目录

1. [项目概述](#1)
2. [快速开始(5分钟)](#2)
3. [准备工作](#3)
4. [API 密钥获取教程](#4)
5. [配置文件详解 (.env)](#5)
6. [代码参数详解](#6)
7. [启动指南](#7)
8. [安全建议](#8)
9. [故障排查](#9)
10. [FAQ 常见问题](#10)

---

<a name="1"></a>
## 1. 项目概述 / Project Overview

### 1.1 这是什么?/ What is this?

这是一个自动化交易机器人,用于在 **Polymarket** 预测市场平台上交易**天气事件**合约。

**核心功能**:
- ✅ 实时扫描全球 33 个城市的天气市场
- ✅ 在气温预测确定窗口期(10:00-14:00)自动买入"今日高温超过阈值"的合约
- ✅ 集成 SkillPay 按次计费(每笔成功下单扣 0.01 USDT)
- ✅ 异常容错:网络重试、余额检查、滑点保护
- ✅ 完整日志和状态持久化

### 1.2 适合谁用?/ Who is this for?

- 对天气预测市场感兴趣的交易者
- 想要自动化策略的开发者
- 学习 Polymarket API 和预测市场的新手

### 1.3 核心策略 / Core Strategy

```
假设:每日最高温通常出现在下午14:00-15:00(气象学原理)
逻辑:
  1. 上午10:00后,官方气温预报已发布,市场不确定性降低
  2. 当 YES token 价格低于 0.35 时,认为市场低估了"高温"概率
  3. 以固定金额(默认 $1.0)买入,等待气温确定后价格上涨
  4. 可在价格上涨后卖出,或持有至结算(自动按 $1.0 或 $0.0 结算)
```

---

<a name="2"></a>
## 2. 快速开始(5分钟)/ Quick Start (5 min)

### 2.1 前置条件 / Prerequisites

- ✅ Python 3.9+(推荐 3.10-3.12)
- ✅ 已注册 [Polymarket](https://polymarket.com) 账户
- ✅ 懂基本命令行操作

### 2.2 一键启动脚本 / One-Command Setup

```bash
# 1. 克隆/进入项目目录(你已经在了)
cd C:\Users\19154\Desktop\skill

# 2. 安装依赖(全程约 2 分钟)
pip install -r requirements.txt

# 3. 复制环境变量模板
copy .env.example .env
# 然后编辑 .env 文件,填入你的密钥(见第4节)

# 4. 测试运行(模拟模式,不花钱)
python sniper.py --dry-run --once

# 5. 看到扫描输出后,说明安装成功!
# 6. 真实交易(谨慎!)
python sniper.py --live --once
```

---

<a name="3"></a>
## 3. 准备工作 / Preparation

### 3.1 环境检查 / Environment Check

```bash
# 检查 Python 版本(需要 3.9+)
python --version
# 预期输出: Python 3.10.x 或 3.11.x 或 3.12.x

# 检查 pip
pip --version
```

### 3.2 创建虚拟环境(可选但推荐)/ Virtual Environment

```bash
# Windows
python -m venv venv
venv\Scripts\activate

# macOS/Linux
python3 -m venv venv
source venv/bin/activate
```

### 3.3 依赖列表 / Dependencies

创建 `requirements.txt` 文件(如果不存在):

```
python-dotenv>=1.0.0
requests>=2.31.0
aiohttp>=3.9.0
pytz>=2024.1
eth-account>=0.11.0
py-clob-client>=0.2.0  # Polymarket 官方客户端(实盘必需)
```

安装:
```bash
pip install -r requirements.txt
```

---

<a name="4"></a>
## 4. API 密钥获取教程 / API Key Tutorial

### 4.1 Polymarket 凭证 / Polymarket Credentials

#### 步骤 1:导出钱包(EOA 和 Proxy)

1. 访问 [Polymarket Settings](https://polymarket.com/settings)
2. 将metamask钱包登录到polymarket主页
3. 你需要以下信息:

| 字段 | 说明 | 从哪里获取 |
|------|------|-----------|
| `PRIVATE_KEY` | 你的 EOA 钱包私钥(**绝密!**) | MetaMask 导出私钥(注意:不是助记词) |
| `PROXY_WALLET` | Polymarket 代理钱包地址 | Settings 页面显示的 "Wallet Address" |
| `POLY_API_KEY` | L2 API Key | 待会儿运行命令获得 |
| `POLY_API_SECRET` | L2 API Secret | 待会儿运行命令获得 |
| `POLY_API_PASSPHRASE` | L2 密码 | 待会儿运行命令获得 |

#### 步骤 2:生成私钥(MetaMask)

1. 打开 MetaMask 扩展
2. 选择账户 → 更多 → "Account details"
3. 点击 "Export Private Key"
4. 输入密码确认
5. 复制以 `0x` 开头的 64 位十六进制字符串

⚠️ **安全警告**:
- 私钥 = 完全控制权!任何人拿到私钥可以转移所有资产
- 不要将私钥上传到 GitHub、云盘
- 建议使用**单独钱包**专门用于交易,不要存放大额资金

#### 步骤 3:确定 `SIGNER_TYPE`

- 如果 `PRIVATE_KEY` 属于普通 EOA 钱包→ `SIGNER_TYPE = "2"`
- 如果使用 Gnosis Safe 多签 → `SIGNER_TYPE = "2"`(推荐)

大多数用户选择 `"1"`。
选择1的时候 可以不用运行命令获取L2凭证,直接用邮箱注册polymarket获得一个私钥钱包 去设置页面获取生成L2凭证并且导出私钥 然后复制代理钱包地址
Polymarket 官网看到的钱包地址(通常以 0x 开头),它持有你的 USDC.e 资金。
PRIVATE_KEY: 你的邮箱钱包私钥。你需要从官方导出页面获取。
---
#### 步骤 4:确定 `L2凭证`
在代码所在目录下运行 python sniper.py --live --once
命令行会返回3个凭证 依次填入.env文件中



### 4.2 SkillPay 

**注意**:
- 这是按次计费服务,每成功下单一次扣除 **0.01 USDT**
- 如果余额不足,下单会失败(系统会提示充值链接)
- 最低充值金额:**8 USDT**(相当于 800 次调用额度)

---

### 4.3 userId / 用户ID

`SKILLPAY_USER_ID`:同PROXY_WALLET的值



<a name="5"></a>
## 5. 配置文件详解 / Configuration

所有配置通过**环境变量**(`.env` 文件)管理。

### 5.1 创建 `.env` 文件

在项目根目录创建文件 `.env`,内容如下:

```ini
# ============================================
# 必填:Polymarket 认证
# ============================================
PRIVATE_KEY=0xsk_your_private_key_here_64_hex_chars
PROXY_WALLET=0x1234567890123456789012345678901234567890
POLY_API_KEY=pk_live_xxxxxxxxxxxxxxxxxxxx
POLY_API_SECRET=sk_live_xxxxxxxxxxxxxxxxxxxx
POLY_API_PASSPHRASE=your_passphrase_here
SIGNER_TYPE=1  # 1=邮箱账户, 2=metamask注册的polymarket账户

# ============================================
# 交易参数(建议保持默认)
# ============================================
TRADE_AMOUNT_USD=1.0          # 每笔下单金额(美元)
MIN_ORDERBOOK_SIZE=1.0        # 最小订单簿深度(流动性过滤)
SLIPPAGE_TOLERANCE=0.15       # 滑点容忍度(15%)
ENTRY_THRESHOLD=0.35          # 入场阈值(YES token 价格 < 0.35 才买入)
MAX_COST_PER_TRADE=1.2        # 单笔最大成本(超出则不买)

# ============================================
# 时间窗口(本地时间,UTC+8)
# ============================================
MONITOR_START_HOUR=9          # 监控开始时间(小时,小数形式)
MONITOR_END_HOUR=9.9167       # 监控结束时间(9:55 = 9 + 55/60 = 9.9167)
FALLBACK_START_HOUR=10        # Fallback 开始时间
FALLBACK_WINDOW_MINUTES=5     # Fallback 窗口长度(分钟)

# ============================================
# 执行频率(秒)
# ============================================
CHECK_INTERVAL=300            # 扫描间隔(300秒 = 5分钟)
REPORT_INTERVAL=240           # 报告间隔(240秒 = 4分钟)

# ============================================
# 缓存与重试
# ============================================
CACHE_TTL=3600                # 通用缓存时间(1小时)
GAMMA_CACHE_TTL=300           # Gamma API 缓存(5分钟)
CLOB_CACHE_TTL=30             # CLOB 订单簿缓存(30秒)
MAX_CONCURRENT_REQUESTS=50    # 最大并发请求数
REQUEST_DELAY=0.05            # 请求间延迟(秒)
MAX_RETRIES=3                 # 最大重试次数(网络失败时)
RETRY_DELAY=1.0               # 重试延迟(秒)

# ============================================
# 文件路径
# ============================================
STATE_FILE=state.json         # 状态文件(持仓、交易历史)
CACHE_DIR=cache               # 缓存目录
```

---

### 5.2 参数详细说明 / Par
05

Trust audit

CAUTIONgrade B · trust 88/100 Install with care. The audit found things worth knowing before you trust its output.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codeWARN
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfacePASS
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
none-observed
Network
declared (5 observation(s))
Shell
none-observed
Dependencies
not all pinned
Secrets in source
none-found

Findings (9)

MEDIUMInformation disclosure · disclose.log_secret · CWE-209, CWE-532
sniper-en.py:449
print(f"[AUTH] [OK] Loaded credentials from .env  (key: {api_key[:10]}...)")
MEDIUMInformation disclosure · disclose.log_secret · CWE-209, CWE-532
sniper-en.py:856
print(f"POLY_API_KEY={self.api_key}")
MEDIUMInformation disclosure · disclose.log_secret · CWE-209, CWE-532
sniper.py:449
print(f"[AUTH] [OK] 从 .env 加载凭证成功 (key: {api_key[:10]}...)")
MEDIUMInformation disclosure · disclose.log_secret · CWE-209, CWE-532
sniper.py:856
print(f"POLY_API_KEY={self.api_key}")
MEDIUMObfuscation / stealth · obf.base64_blob · CWE-506, CWE-94
skills/compdf-conversion-cli/scripts/license.xml:9
<key>k5Ey9KFlkqpj+SDkUw+5ED9lTA3En/qUi0zdrydUCH3kMWTE3Eh65NXnFCaxlY2omY2JHnlEoK7Li7oOEvM7eG5VPdcO/sFlMfoCRdnLYdepJ+uLzYwOWR8W4yQVve/clxVFTVRL4DFleKInGdpAxIbHZT2yi4ADAMENls1N1XSLojRuqXePXDeAT/4Mv4TTx0s
LOWInventory / provenance · inv.hidden_file · CWE-1104
.env.txt
.env.txt
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWInsecure crypto · crypto.weak_hash · CWE-327, CWE-338
sniper-en.py:477
cache_key = hashlib.md5(f"{url}{params}".encode()).hexdigest()[:16]
LOWInsecure crypto · crypto.weak_hash · CWE-327, CWE-338
sniper.py:477
cache_key = hashlib.md5(f"{url}{params}".encode()).hexdigest()[:16]
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
requirements.txt
aiohttp, requests, pytz, python-dotenv, eth-account, py-clob-client
Why it matters. 6 requirement(s) not pinned with ==
Fix. pin exact versions

Gates applied: no_behavioural_pass.

Audited 2026-10-08 · audit v0.4.1 · source sha 4f3b4a2a472efull audit observations/trust-audit/skill/leoyeai__polymarket-temperature-event-follower.json · Report an issue / request a re-scan
06

Audit history

Every audit this skill has had.

DateSourceVerdictGradeScoreChange
2026-10-084f3b4a2a472eCAUTIONB88first audit
07

Questions

What does the Polymarket Temperature Event Follower skill do?

🧠 Curated collection of 1209+ best OpenClaw skills — weekly updated by MyClaw.ai

Is Polymarket Temperature Event Follower safe to install?

With care. The audit graded it B (88/100) and found 9 things worth knowing before you trust this skill, listed below with the exact line each was found on.

What can Polymarket Temperature Event Follower access on my machine?

The audit observed that it reaches the network. Each of those is consistent with what it says it does. Secrets in the source: none found.

Which assistants does Polymarket Temperature Event Follower work with?

Its documentation mentions openclaw. That is what the text claims, not a compatibility test we ran.

How current is this page?

The grade is for one exact copy of the source (4f3b4a2a472e), read on 2026-10-08. The repository is watched, and a new audit runs when it changes — this is the first audit.

Advertisement