What the endpoint does

Polymarket’s trading API describes a heartbeat mechanism for live orders. An authenticated client sends periodic heartbeats and follows the documented response and identifier handling. If the required heartbeat stops, the exchange can cancel that user’s open orders. Treat this as an order-control feature, separate from market data streaming. Polymarket · Send heartbeat ↗

Read the state after a disconnect

Consider a client that loses its network while a bid rests. The bid may fill before cancellation is processed. When the client reconnects, it should reconcile open orders, fills and available balance before deciding whether to replace anything. A missing local acknowledgement alone cannot determine the venue’s final state.

Exercise failure cases

Test heartbeat rejection, a temporary outage and restart with outstanding orders. Use the current API cadence and check which account or signer owns each order. Record the last accepted heartbeat, the reconciliation time and any fill that arrived near the gap.