Skip to content

Send Heartbeat

Signals that the client is still active. The first heartbeat enrolls the user in heartbeat monitoring; after that, if no heartbeat arrives for more than 10 seconds, the server automatically cancels every open order under that API key.

Two paths are available:

MethodPathCompatibility
POST/v1/heartbeatsPolymarket SDK compatible (recommended)
GET/auth/heartbeatLegacy (backward compatible)

Base URL: https://api.openfish.fun

L2 authentication required. All five OPENFISH_* headers must be present.

None.

POST /v1/heartbeats:

{"status": "ok"}

GET /auth/heartbeat (legacy):

{}
  1. First heartbeat: Enrolls the API key in heartbeat monitoring.
  2. Subsequent heartbeats: Resets the inactivity countdown.
  3. Missed heartbeat (>10s): All LIVE orders for that API key are canceled automatically.

Monitoring is scoped per API key. A recommended cadence is one heartbeat every 5 seconds to leave comfortable margin before the 10-second deadline.

Terminal window
# Recommended (Polymarket SDK compatible)
curl -X POST https://api.openfish.fun/v1/heartbeats \
-H "OPENFISH_ADDRESS: 0x..." \
-H "OPENFISH_SIGNATURE: ..." \
-H "OPENFISH_TIMESTAMP: 1700000000" \
-H "OPENFISH_API_KEY: ..." \
-H "OPENFISH_PASSPHRASE: ..."
# Legacy
curl https://api.openfish.fun/auth/heartbeat \
-H "OPENFISH_ADDRESS: 0x..." \
-H "OPENFISH_SIGNATURE: ..." \
-H "OPENFISH_TIMESTAMP: 1700000000" \
-H "OPENFISH_API_KEY: ..." \
-H "OPENFISH_PASSPHRASE: ..."