# Cancel All Orders

<mark style="color:red;">**`DELETE`**</mark> `https://api.sfox.com/v1/orders/open`

Cancel all open orders.

### Responses

<details>

<summary><mark style="color:green;">200</mark></summary>

Responds with an array of all of the orders listed in the request that were able to begin cancelation (`Cancel Pending`) or were successfully canceled (`Canceled`)

```json
{ 
  "orders": [
    {"id": 2, "status": "Cancel pending"},
    {"id": 3, "status": "Canceled"}
  ]
}
```

</details>

### Example Requests

{% tabs %}
{% tab title="Shell" %}

```bash
curl -X DELETE \
  -H 'Authorization: Bearer <API_TOKEN>' \
  'https://api.sfox.com/v1/orders/open'
```

{% endtab %}

{% tab title="NodeJS" %}

```javascript
const axios = require('axios');

axios({
  method: 'delete',
  url: 'https://api.sfox.com/v1/orders/open',
  headers: {
    'Authorization': 'Bearer <API_KEY>'
  }
}).then(response => {
  console.log(response)
}).catch(err => {
  console.error(err)
});
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

data = requests.delete(
  "https://api.sfox.com/v1/orders/open",
  headers={
    "Authorization": "Bearer <API_KEY>",
  }
)
print(data)
```

{% endtab %}
{% endtabs %}
