Heartbeat (cancel-on-disconnect)

POST/v1/px/heartbeatscancel scope

Market Maker APIE6 decimal strings throughoutA | B

Send periodic heartbeats. If one is not received in time, the server cancels all of your open orders.

Send X-PX-Key: pxk_…. This endpoint requires the cancel scope — an insufficient scope returns 403, not 401, and this line does not use Bearer sessions. To request a key and see the limits, visit the onboarding page.

Behaviour

  • Send an empty heartbeatId on the first request; afterwards send the heartbeatId from the previous response.
  • Every response returns a new heartbeatId; the previous one becomes invalid immediately.
  • Send one every 5s. If no valid heartbeat arrives within 10s, all open orders are cancelled with cancelReason = HEARTBEAT_TIMEOUT.
  • A mismatched heartbeatId returns 409 HEARTBEAT_ID_MISMATCH with the currently valid id. Two processes sharing one key will trigger this error.