PATCH
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
Parameter | Type | Description |
---|
| | The order ID generated by sFOX upon order creation. |
Body Parameters
Parameter | Type | Description |
---|
| | Increase the quantity of an order. |
| | Increase the quantity of an order. amount may only be increased for Stop (304 ) and Trailing Stop (308 ) orders |
| | BUY Orders: Increase limit price SELL Orders: Decrease limit price Price cannot be modified for Trailing Stop (308 ) order
|
| | Any modification is allowed |
| | Any modification is allowed |
Example Requests
curl -X PATCH \
-H 'Authorization: Bearer <API_TOKEN>' \
--data '{ "quantity": 2 }' \
'https://api.sfox.com/v1/orders/123'
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)
});
import requests
data = requests.patch(
"https://api.sfox.com/v1/orders/123",
headers={
"Authorization": "Bearer <API_KEY>",
},
data={
"quantity": 1
}
)
print(data)
Last updated