# Amend Order

<mark style="color:orange;">**`PATCH`**</mark> `https://api.sfox.com/v1/orders/:order_id`

Make the following adjustments to the quantity or amount, price, and stop amount or stop percent parameters of an order without canceling the order.

### **Path Parameters**

<table><thead><tr><th width="240">Parameter</th><th width="92">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong><code>order_id</code></strong> <mark style="color:red;">required</mark></td><td>string</td><td>The order ID generated by sFOX upon order creation.</td></tr></tbody></table>

### Body Parameters

<table><thead><tr><th width="183">Parameter</th><th width="92">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong><code>quantity</code></strong></td><td>number</td><td><strong>Increase</strong> the quantity of an order.</td></tr><tr><td><strong><code>amount</code></strong></td><td>number</td><td><strong>Increase</strong> the quantity of an order. <code>amount</code> <strong>may only be increased for Stop</strong> (<code>304</code>) <strong>and Trailing Stop</strong> (<code>308</code>) <strong>orders</strong></td></tr><tr><td><strong><code>price</code></strong></td><td>number</td><td><ul><li>BUY Orders: <strong>Increase</strong> limit price</li><li>SELL Orders: <strong>Decrease</strong> limit price</li><li><strong>Price cannot be modified for Trailing Stop</strong> (<code>308</code>) <strong>order</strong></li></ul></td></tr><tr><td><strong><code>stop_amount</code></strong></td><td>number</td><td>Any modification is allowed</td></tr><tr><td><strong><code>stop_percent</code></strong></td><td>number</td><td>Any modification is allowed</td></tr></tbody></table>

### Example Requests

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

```bash
curl -X PATCH \
  -H 'Authorization: Bearer <API_TOKEN>' \
  --data '{ "quantity": 2 }'  \
  'https://api.sfox.com/v1/orders/123'
```

{% endtab %}

{% tab title="NodeJS" %}

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

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

{% endtab %}

{% tab title="Python" %}

```python
import requests

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

{% endtab %}
{% endtabs %}
