polymarket-trading by niller2005/polyflup
npx skills add https://github.com/niller2005/polyflup --skill polymarket-trading机器人支持两种信心度计算方法以进行 A/B 测试:
加法方法(默认) :
贝叶斯方法(替代) :
使用对数赔率的统计原理概率论
从 Polymarket 订单簿的市场先验概率开始
通过对数似然比累积证据:
evidence = (score - 0.5) × 2 # 缩放到 -1 到 +1
log_LR = evidence × 3.0 × quality # 质量因子 (0.7-1.5x) log_odds += log_LR × weight confidence = 1 / (1 + exp(-log_odds))
自然地处理冲突信号(它们会相互抵消)
市场先验将计算锚定在 Polymarket 的现实情况
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
A/B 测试 :
每次交易同时计算两种方法
结果存储在数据库中以便比较
通过 BAYESIAN_CONFIDENCE 环境变量切换(默认:NO)
在 100+ 次交易后比较胜率:
SELECT
AVG(CASE WHEN bias='UP' THEN edge ELSE -edge END) as avg_edge,
COUNT(*) as total,
SUM(CASE WHEN result='WIN' THEN 1 ELSE 0 END) as wins,
CAST(wins AS REAL) / COUNT(*) as win_rate
FROM trades WHERE settled = 1 GROUP BY method;
SCALE_IN_TIME_LEFT: 450s (7.5 分钟)edge) 和中点价格的动态提前入场时机:
edge >= 90% 且价格 >= $0.80edge >= 80% 且价格 >= $0.70edge >= 70% 且价格 >= $0.65truncate_float(value, 2) 以匹配交易所精度from src.trading.orders import get_midpoint, get_spread, check_liquidity
# 获取准确的中点价格
price = get_midpoint(token_id)
# 检查流动性是否良好
if check_liquidity(token_id, size=100, warn_threshold=0.05):
# 可以安全交易
from src.trading.orders import place_batch_orders, place_market_order
# 批量订单
results = place_batch_orders(orders)
# 市价卖出
result = place_market_order(token_id, amount=10.0, side="SELL", order_type="FAK")
每周安装量
116
代码仓库
GitHub 星标数
17
首次出现
Jan 23, 2026
安全审计
安装于
gemini-cli83
opencode83
codex80
cursor79
github-copilot72
amp64
The bot supports two confidence calculation methods for A/B testing:
Additive Method (Default) :
Bayesian Method (Alternative) :
Statistically principled probability theory using log-odds
Starts with market prior from Polymarket orderbook
Accumulates evidence via log-likelihood ratios:
evidence = (score - 0.5) × 2 # Scale to -1 to +1
log_LR = evidence × 3.0 × quality # Quality factor (0.7-1.5x) log_odds += log_LR × weight confidence = 1 / (1 + exp(-log_odds))
Naturally handles conflicting signals (they cancel out)
Market prior anchors calculation to Polymarket reality
A/B Testing :
Both methods calculated simultaneously on every trade
Results stored in database for comparison
Toggle via BAYESIAN_CONFIDENCE environment variable (default: NO)
Compare win rates after 100+ trades:
SELECT
AVG(CASE WHEN bias='UP' THEN edge ELSE -edge END) as avg_edge,
COUNT(*) as total,
SUM(CASE WHEN result='WIN' THEN 1 ELSE 0 END) as wins,
CAST(wins AS REAL) / COUNT(*) as win_rate
FROM trades WHERE settled = 1 GROUP BY method;
SCALE_IN_TIME_LEFT: 450s (7.5 minutes)edge) and midpoint price:
edge >= 90% and price >= $0.80edge >= 80% and price >= $0.70edge >= 70% and price >= $0.65truncate_float(value, 2) for all order sizes to match exchange precisionfrom src.trading.orders import get_midpoint, get_spread, check_liquidity
# Get accurate midpoint price
price = get_midpoint(token_id)
# Check if liquidity is good
if check_liquidity(token_id, size=100, warn_threshold=0.05):
# Safe to trade
from src.trading.orders import place_batch_orders, place_market_order
# Batch Orders
results = place_batch_orders(orders)
# Market Sell
result = place_market_order(token_id, amount=10.0, side="SELL", order_type="FAK")
Weekly Installs
116
Repository
GitHub Stars
17
First Seen
Jan 23, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
gemini-cli83
opencode83
codex80
cursor79
github-copilot72
amp64
通过 LiteLLM 代理让 Claude Code 对接 GitHub Copilot 运行 | 高级变通方案指南
44,900 周安装
Cosmos 漏洞扫描器 - 9种关键漏洞模式,审计Cosmos SDK与CosmWasm智能合约安全
1,500 周安装
AddressSanitizer (ASan) 内存错误检测工具:模糊测试与C/C++调试指南
1,500 周安装
C++专家技能:现代C++20/23开发、高性能计算、零开销抽象编程指南
1,500 周安装
Linear 项目管理技能:AI 驱动的问题跟踪与团队协作自动化工作流
1,500 周安装
Vue Pinia最佳实践:状态管理常见陷阱与解决方案指南
1,500 周安装
React项目代码修复工具 - 自动格式化与检查,提升代码质量与CI通过率
1,400 周安装