# Heartbeat

<EndpointPage
  breadcrumbs={[
    { label: "Trading", href: "/trading/trading" },
    { label: "Orders", href: "/trading/rest-api/orders" },
    { label: "Heartbeat" },
  ]}
  title="Heartbeat"
  method="POST"
  url="https://api.gemini.com/v1/heartbeat"
  description="Prevents a session from timing out and canceling active orders when the require-heartbeat flag is set on the API key. Only required if no other private API requests have been made — the arrival of any message resets the heartbeat timer."
  example={{
    request: {
      method: "POST",
      url: "https://api.gemini.com/v1/heartbeat",
      headers: [
        { name: "X-GEMINI-APIKEY", value: "<string>" },
        { name: "X-GEMINI-PAYLOAD", value: "<string>" },
        { name: "X-GEMINI-SIGNATURE", value: "<string>" },
      ],
      body: {
        request: "/v1/heartbeat",
        nonce: "<nonce>",
      },
    },
  }}
  sections={[
    {
      heading: "Roles",
      children: (
        <>
          <p style={{ margin: 0 }}>Any authenticated API key may call this endpoint. See <a href="/authentication/api-key#require-heartbeat" style={{ color: "inherit", textDecorationLine: "underline" }}>Require Heartbeat</a> for background on the heartbeat flag and session behavior.</p>
        </>
      ),
    },
    {
      heading: "Headers",
      children: <SpecHeaders operationId="sendHeartbeat" />,
    },
    {
      heading: "Request Body",
      children: <SpecParams operationId="sendHeartbeat" />,
    },
    {
      heading: "Responses",
      children: <SpecResponses operationId="sendHeartbeat" />,
    },
  ]}
/>

<PageNavigation
  prev={{ label: "Wrap Order", href: "/trading/rest-api/orders/wrap-order" }}
  next={{ label: "Market Data", href: "/trading/rest-api/market-data" }}
/>
