法律合規提醒:在使用 Polymarket 服務或 API 前,請確認您所在地區的法律規定。Polymarket 目前不支援比利時、法國、新加坡、泰國、中國大陸等地區,政策可能隨時變化。
某些 WebSocket 頻道需要認證。
認證流程
- 創建 API 憑據
- 連接到 WebSocket
- 發送認證消息
- 訂閱頻道
認證示例
# Python
auth_msg = {
"type": "auth",
"api_key": "YOUR_API_KEY",
"api_secret": "YOUR_API_SECRET",
"api_passphrase": "YOUR_API_PASSPHRASE"
}
ws.send(json.dumps(auth_msg))
下一步