# Cancel All Active Orders

<EndpointPage
  breadcrumbs={[
    { label: "Trading", href: "/trading/trading" },
    { label: "Orders", href: "/trading/rest-api/orders" },
    { label: "Cancel All Active Orders" },
  ]}
  title="Cancel All Active Orders"
  method="POST"
  url="https://api.gemini.com/v1/order/cancel/all"
  description={<>This will cancel all outstanding orders created by all <a href="/authentication/api-key#sessions" style={{ color: "inherit", textDecorationLine: "underline" }}>sessions</a> owned by this account, including interactive orders placed through the UI.</>}
  note={{
    title: "Note",
    children: <p style={{ margin: 0 }}>Note that this cancels orders that were not placed using this API key. Enabled for perpetuals accounts from July 10th, 0100hrs ET onwards. Typically <a href="/trading/rest-api/orders/cancel-all-session-orders" style={{ color: "inherit", textDecorationLine: "underline" }}>Cancel All Session Orders</a> is preferable, so that only orders related to the current connected session are cancelled.</p>
  }}
  example={{
    request: {
      method: "POST",
      url: "https://api.gemini.com/v1/order/cancel/all",
      headers: [
        { name: "X-GEMINI-APIKEY", value: "<string>" },
        { name: "X-GEMINI-PAYLOAD", value: "<string>" },
        { name: "X-GEMINI-SIGNATURE", value: "<string>" },
      ],
      body: {
        request: "/v1/order/cancel/all",
        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="cancelAllActiveOrders" />,
    },
    {
      heading: "Request Body",
      children: <SpecParams operationId="cancelAllActiveOrders" />,
    },
    {
      heading: "Responses",
      children: <SpecResponses operationId="cancelAllActiveOrders" />,
    },
  ]}
/>

<PageNavigation
  prev={{ label: "Cancel Order", href: "/trading/rest-api/orders/cancel-order" }}
  next={{ label: "Cancel All Session Orders", href: "/trading/rest-api/orders/cancel-all-session-orders" }}
/>
