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

推荐订阅源

Blog — PlanetScale
Blog — PlanetScale
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Vercel News
Vercel News
B
Blog
腾讯CDC
P
Proofpoint News Feed
Google DeepMind News
Google DeepMind News
N
Netflix TechBlog - Medium
L
LangChain Blog
F
Fortinet All Blogs
T
The Blog of Author Tim Ferriss
人人都是产品经理
人人都是产品经理
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
I
InfoQ
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
D
DataBreaches.Net
Stack Overflow Blog
Stack Overflow Blog
The Cloudflare Blog
Last Week in AI
Last Week in AI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 三生石上(FineUI控件)
T
Tailwind CSS Blog

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