v1

latestOpenAPI 3.0.02026-07-26166415635.8 KB
Trading

Cancel all Open Orders For an Account

Attempts to cancel all open orders. A response will be provided for each order that is attempted to be cancelled.

delete/v1/trading/accounts/{account_id}/orders

Response

HTTP 207 Multi-Status with body, which is an array of objects that include the order id, http status code and an order object for each cancellation request.

idstring uuid required

UUID of the order that was canceled

statusinteger required

Http status code for the attempt to close this Order

Example response

[
  {
    "body": {
      "asset_id": "61e69015-8549-4bfd-b9c3-01e75843f47d",
      "cancel_requested_at": "2021-03-16T18:38:01.942282Z",
      "canceled_at": "2021-03-16T18:38:01.942282Z",
      "client_order_id": "61e69015-8549-4bfd-b9c3-01e75843f47d",
      "commission": "3.14",
      "commission_bps": "10",
      "commission_type": "qty",
      "created_at": "2021-03-16T18:38:01.942282Z",
      "expired_at": "2021-03-16T18:38:01.942282Z",
      "extended_hours": true,
      "failed_at": "2021-03-16T18:38:01.942282Z",
      "filled_at": "2021-03-16T18:38:01.942282Z",
      "filled_avg_price": "4.2",
      "filled_qty": "4.2",
      "hwm": "3.14",
      "id": "61e69015-8549-4bfd-b9c3-01e75843f47d",
      "legs": [
        {
          "asset_id": "61e69015-8549-4bfd-b9c3-01e75843f47d",
          "canceled_at": "2021-03-16T18:38:01.942282Z",
          "client_order_id": "61e69015-8549-4bfd-b9c3-01e75843f47d",
          "commission": "3.14",
          "commission_bps": "10",
          "commission_type": "qty",
          "created_at": "2021-03-16T18:38:01.942282Z",
          "expired_at": "2021-03-16T18:38:01.942282Z",
          "extended_hours": true,
          "failed_at": "2021-03-16T18:38:01.942282Z",
          "filled_at": "2021-03-16T18:38:01.942282Z",
          "filled_avg_price": "4.2",
          "filled_qty": "4.2",
          "hwm": "3.14",
          "id": "61e69015-8549-4bfd-b9c3-01e75843f47d",
          "limit_price": "3.14",
          "notional": "4.2",
          "order_type": "market",
          "position_intent": "buy_to_open",
          "qty": "4.2",
          "replaced_at": "2021-03-16T18:38:01.942282Z",
          "replaced_by": "61e69015-8549-4bfd-b9c3-01e75843f47d",
          "replaces": "61e69015-8549-4bfd-b9c3-01e75843f47d",
          "side": "buy",
          "status": "filled",
          "stop_price": "3.14",
          "submitted_at": "2021-03-16T18:38:01.942282Z",
          "symbol": "AALP",
          "time_in_force": "gtc",
          "trail_percent": "5.0",
          "trail_price": "3.14",
          "type": "market",
          "updated_at": "2021-03-16T18:38:01.942282Z"
        }
      ],
      "limit_price": "3.14",
      "notional": "4.2",
      "order_type": "market",
      "position_intent": "buy_to_open",
      "qty": "4.2",
      "replaced_at": "2021-03-16T18:38:01.942282Z",
      "replaced_by": "61e69015-8549-4bfd-b9c3-01e75843f47d",
      "replaces": "61e69015-8549-4bfd-b9c3-01e75843f47d",
      "side": "buy",
      "status": "filled",
      "stop_price": "3.14",
      "submitted_at": "2021-03-16T18:38:01.942282Z",
      "symbol": "AALP",
      "time_in_force": "gtc",
      "trail_percent": "5.0",
      "trail_price": "3.14",
      "type": "market",
      "updated_at": "2021-03-16T18:38:01.942282Z"
    }
  }
]