惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
D
DataBreaches.Net
C
Check Point Blog
雷峰网
雷峰网
小众软件
小众软件
GbyAI
GbyAI
美团技术团队
P
Proofpoint News Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
罗磊的独立博客
大猫的无限游戏
大猫的无限游戏
WordPress大学
WordPress大学
MyScale Blog
MyScale Blog
The Cloudflare Blog
阮一峰的网络日志
阮一峰的网络日志
Apple Machine Learning Research
Apple Machine Learning Research
Y
Y Combinator Blog
Jina AI
Jina AI
爱范儿
爱范儿
Last Week in AI
Last Week in AI
MongoDB | Blog
MongoDB | Blog
I
InfoQ
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 司徒正美

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Polymarket 5分钟 BTC 真实剥头皮策略:Stale Order Book 狙击
NevoSayNevo · 2026-05-27 · via DEV Community

NevoSayNevo

大多数 Polymarket 5分钟 BTC Up/Down 机器人并不是在预测价格,而是在利用延迟

核心优势非常简单且残酷:Binance 现货价格的更新速度远快于 Polymarket 的订单簿。当 BTC 已经明显移动时,Polymarket 订单簿上仍存在大量过期(Stale)限价单,形成短暂但可利用的定价偏差。

核心架构

双 WebSocket 实时流:

  • Binancewss://stream.binance.com:9443/ws/btcusdt@aggTrade(或 @trade

    • 获取实时成交价 + 过去 10–15 秒的短期动量(以基点计算)
  • Polymarket CLOBwss://ws-subscriptions-clob.polymarket.com/ws/market

    • 订阅活跃的 Up/Down Token ID
    • 通过 book 快照 + price_change 事件维护本地完整订单簿
    • 每 10 秒发送 PING 保持连接(非常关键)

概率引擎(核心数学模型)

机器人通过以下三个维度计算真实概率(而非市场报价):

  1. 当前价格与参考价的距离(basis points)
  2. 短期动量 —— 过去 15 秒的方向与强度
  3. 剩余时间 —— 使用对数权重,在最后 60 秒内权重急剧上升

三者输入 Logistic 函数 输出一个干净的概率值 [0,1]。

进场规则:仅在满足以下条件时交易:

  • 计算概率 > 最优卖价 + Edge Threshold(通常 4–8¢)
  • 买卖价差 ≤ 4¢
  • 订单簿顶部有足够流动性
  • 剩余时间在 5–60 秒之间

执行细节

  • 订单类型:Immediate-Or-Cancel (IOC) 吃最优卖价
  • 下单前再次校验最优卖价(防止吃到过期单)
  • 根据 Edge 大小动态调整仓位(Edge 越大仓位越大,上限控制)
  • 严格的每日亏损限制 + 连亏冷却机制

为什么大多数机器人会失败

  • WebSocket 重连逻辑薄弱
  • 只依赖 best_bid_ask,没有维护完整本地订单簿
  • 时间权重计算不足
  • 缺乏硬性风控
  • 使用家用网络(延迟 + 丢包直接致命)

这种策略本质是执行速度 + 市场微结构套利,而不是方向性预测。机器人并不比市场“更聪明”,只是比订单簿更新得更快,在 Stale Order 消失前抢先下手。


Tags: #Polymarket #交易机器人 #加密交易 #算法交易 #WebSocket #预测市场 #量化交易 #DeFi #BTC #Fintech