Summary
Polymarket's CLOB API includes a POST /v1/heartbeats endpoint required to keep authenticated WebSocket sessions alive. This endpoint is not present in core/specs/polymarket-clob.yaml and is not called by the PMXT Polymarket adapter.
Impact
MEDIUM — without periodic heartbeat calls, authenticated Polymarket WebSocket connections may be terminated by the server, causing silent disconnects during active trading sessions.
Details
- Endpoint:
POST /v1/heartbeats
- Authentication: required (L1 auth headers)
- Request body: empty or
{}
- Response:
{ status: "ok" }
- Purpose: resets the server-side inactivity timer for the authenticated session
- Spec file:
core/specs/polymarket-clob.yaml
Required Fix
- Add
POST /v1/heartbeats to core/specs/polymarket-clob.yaml
- Implement periodic heartbeat calls in the Polymarket WebSocket handler or connection manager
- Recommended interval: every 15–30 seconds while a session is active
Summary
Polymarket's CLOB API includes a
POST /v1/heartbeatsendpoint required to keep authenticated WebSocket sessions alive. This endpoint is not present incore/specs/polymarket-clob.yamland is not called by the PMXT Polymarket adapter.Impact
MEDIUM — without periodic heartbeat calls, authenticated Polymarket WebSocket connections may be terminated by the server, causing silent disconnects during active trading sessions.
Details
POST /v1/heartbeats{}{ status: "ok" }core/specs/polymarket-clob.yamlRequired Fix
POST /v1/heartbeatstocore/specs/polymarket-clob.yaml