慣性聚合 高效追蹤和閱讀你感興趣的部落格、新聞、科技資訊
閱讀原文 在慣性聚合中打開

推薦訂閱源

WordPress大学
WordPress大学
M
MIT News - Artificial intelligence
小众软件
小众软件
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Tailwind CSS Blog
T
The Blog of Author Tim Ferriss
Engineering at Meta
Engineering at Meta
Jina AI
Jina AI
Last Week in AI
Last Week in AI
I
InfoQ
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
人人都是产品经理
人人都是产品经理
MongoDB | Blog
MongoDB | Blog
The Cloudflare Blog
月光博客
月光博客
爱范儿
爱范儿
D
Docker
罗磊的独立博客
博客园 - 叶小钗
博客园 - 司徒正美

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 Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python)
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