# Cancel All Session Orders

<EndpointPage
  breadcrumbs={[
    { label: "Trading", href: "/trading/trading" },
    { label: "Orders", href: "/trading/rest-api/orders" },
    { label: "Cancel All Session Orders" },
  ]}
  title="Cancel All Session Orders"
  method="POST"
  url="https://api.gemini.com/v1/order/cancel/session"
  description={<>This will cancel all orders opened by this <a href="/authentication/api-key#sessions" style={{ color: "inherit", textDecorationLine: "underline" }}>session</a>. This will have the same effect as <a href="/authentication/api-key#require-heartbeat" style={{ color: "inherit", textDecorationLine: "underline" }}>heartbeat</a> expiration if "Require Heartbeat" is selected for the session.</>}
  example={{
    request: {
      method: "POST",
      url: "https://api.gemini.com/v1/order/cancel/session",
      headers: [
        { name: "X-GEMINI-APIKEY", value: "<string>" },
        { name: "X-GEMINI-PAYLOAD", value: "<string>" },
        { name: "X-GEMINI-SIGNATURE", value: "<string>" },
      ],
      body: {
        request: "/v1/order/cancel/session",
        nonce: "<nonce>",
      },
    },
  }}
  sections={[
    {
      heading: "Roles",
      children: (
        <>
          <p style={{ margin: "0 0 2px" }}>The API key you use to access this endpoint must have the Trader role assigned. See <a href="https://docs.gemini.com/roles#roles" style={{ color: "inherit", textDecorationLine: "underline" }}>Roles</a> for more information.</p>
          <p style={{ margin: 0 }}>The OAuth scope must have <InlineBadge>orders:create</InlineBadge> assigned to access this endpoint. See <a href="/authentication/oauth#oauth-scopes" style={{ color: "inherit", textDecorationLine: "underline" }}>OAuth Scopes</a> for more information.</p>
        </>
      ),
    },
    {
      heading: "Headers",
      children: <SpecHeaders operationId="cancelAllSessionOrders" />,
    },
    {
      heading: "Request Body",
      children: <SpecParams operationId="cancelAllSessionOrders" />,
    },
    {
      heading: "Responses",
      children: <SpecResponses operationId="cancelAllSessionOrders" />,
    },
  ]}
/>

<PageNavigation
  prev={{ label: "Cancel All Active Orders", href: "/trading/rest-api/orders/cancel-all-active-orders" }}
  next={{ label: "Get Order Status", href: "/trading/rest-api/orders/get-order-status" }}
/>
