---
updatedAt: 2026-08-19T09:23:33.000Z
agentTools:
  projectIndex: https://docs.clearstreet.io/studio/llms.txt
---

# Delete all orders

Attempts to cancel all open orders for a given account. Cancelling an order cannot be guaranteed as there might be in-flight executions.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Execution API",
    "description": "API for Studio's Execution Management System.",
    "version": "2.0.0"
  },
  "x-readme": {
    "explorer-enabled": false
  },
  "servers": [
    {
      "url": "https://api.clearstreet.io/studio/v2",
      "description": "Production environment"
    },
    {
      "url": "https://demo-api.clearstreet.io/studio/v2",
      "description": "Demo environment"
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "paths": {
    "/accounts/{account_id}/orders": {
      "get": {
        "operationId": "listOrders",
        "summary": "List orders",
        "description": "List orders for a given account for the current trading day, filtered on the given query parameters.",
        "tags": [
          "Orders"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "account_id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/BuyingPower/properties/account_id",
              "description": "The account ID or account number to list orders for."
            }
          },
          {
            "in": "query",
            "name": "from",
            "schema": {
              "description": "Milliseconds since epoch timestamp. This will constrain the search for orders created after this timestamp, inclusively. Timestamps for orders prior the current trading day will be ignored.",
              "type": "integer",
              "format": "int64",
              "minimum": 1710613560668,
              "maximum": 2900000000000
            }
          },
          {
            "in": "query",
            "name": "to",
            "schema": {
              "$ref": "#/paths/~1accounts~1{account_id}~1orders/get/parameters/1/schema",
              "description": "Milliseconds since epoch timestamp. This will constrain the search for orders created before this timestamp, inclusively. Timestamps for orders beyond the current trading day will be ignored."
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 2000,
              "default": 25,
              "description": "Number of orders to return per page."
            }
          },
          {
            "in": "query",
            "name": "page_token",
            "schema": {
              "type": "string",
              "description": "Cursor for the page to return."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Order"
                      }
                    },
                    "next_page_token": {
                      "type": "string",
                      "description": "Cursor for the next page of results."
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri",
                      "description": "A URI reference that identifies the problem type."
                    },
                    "title": {
                      "type": "string",
                      "description": "A short, human-readable summary of the problem type."
                    },
                    "status": {
                      "type": "number",
                      "minimum": 100,
                      "maximum": 599,
                      "description": "The HTTP status code generated by the origin server for this occurrence of the problem."
                    },
                    "detail": {
                      "type": "string",
                      "description": "A human-readable explanation specific to this occurrence of the problem."
                    },
                    "instance": {
                      "type": "string",
                      "format": "uri",
                      "description": "An absolute URI that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced."
                    }
                  },
                  "additionalProperties": false,
                  "description": "A Problem Details object (RFC 9457)"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteAllOrders",
        "summary": "Delete all orders",
        "description": "Attempts to cancel all open orders for a given account. Cancelling an order cannot be guaranteed as there might be in-flight executions.",
        "tags": [
          "Orders"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "account_id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/BuyingPower/properties/account_id",
              "description": "The account ID or account number to cancel orders for."
            }
          },
          {
            "in": "query",
            "name": "symbol",
            "schema": {
              "$ref": "#/components/schemas/LocateInventory/properties/symbol",
              "description": "Cancel orders only for this specific symbol. If this is omitted, all open orders will be cancelled."
            }
          },
          {
            "in": "query",
            "name": "symbol_format",
            "schema": {
              "default": "cms",
              "type": "string",
              "enum": [
                "cms",
                "osi",
                "composite"
              ],
              "description": "Denotes the format of the provided `symbol` field.\n- `cms`: CMS symbology for US equities, e.g. `AAPL`.\n- `osi`: OSI symbology for options, e.g. `AAPL  260918C00310000`.\n- `composite`: Composite symbology for international (non-US) equities, in the format `<ticker>:<iso_country>:<iso_currency>`, where `iso_country` is the ISO 3166-1 alpha-2 listing country and `iso_currency` is the ISO 4217 settlement currency. For example `SHEL:GB:GBP` for a share listed in Great Britain (`GB`) and settled in British pounds (`GBP`).\n"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Successfully attempted to cancel all open orders.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/OrderId"
                      },
                      "description": "Array of order IDs that were attempted to be cancelled."
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/paths/~1accounts~1{account_id}~1orders/get/responses/default"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "schemas": {
      "OrderId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256,
        "example": "12390213",
        "description": "Unique order ID assigned by us."
      },
      "BuyingPower": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "example": "100000",
            "description": "Account ID for the account."
          },
          "account_number": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "example": "ACC0001",
            "description": "Account number for the account."
          },
          "amount": {
            "type": "number",
            "format": "double",
            "description": "The buying power available for this account."
          }
        },
        "required": [
          "account_id",
          "account_number",
          "buying_power"
        ]
      },
      "LocateInventory": {
        "type": "object",
        "properties": {
          "account_id": {
            "$ref": "#/components/schemas/BuyingPower/properties/account_id"
          },
          "account_number": {
            "$ref": "#/components/schemas/BuyingPower/properties/account_number"
          },
          "symbol": {
            "type": "string",
            "minLength": 1,
            "maxLength": 32,
            "example": "AAPL"
          },
          "available": {
            "$ref": "#/components/schemas/LocateInventory/properties/used"
          },
          "reserved": {
            "$ref": "#/components/schemas/LocateInventory/properties/used"
          },
          "used": {
            "type": "string",
            "minLength": 1,
            "maxLength": 16,
            "example": "100",
            "description": "String representation of quantity."
          }
        }
      }
    }
  },
  "externalDocs": {
    "url": "https://docs.clearstreet.io/"
  }
}
```