DELETE
https://api.cryptohopper.com/v1/hopper/{id}/order
Removes the given open orders from the hopper's order list. The orders are not cancelled on the exchange.
OAuth scope:
read manage About scopes
Send order_ids as an array of Cryptohopper order IDs (the id field of Get open orders), or a single order_id. Returns an error when only some or none of the orders could be removed.
Example request
curl -X DELETE "https://api.cryptohopper.com/v1/hopper/HOPPER_ID/order" \
-H "access-token: YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"order_ids":[342000001,342000002]}'
const response = await fetch('https://api.cryptohopper.com/v1/hopper/HOPPER_ID/order', {
method: 'DELETE',
headers: {
"access-token": "YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"order_ids": [
342000001,
342000002
]
})
});
const data = await response.json();
import requests
response = requests.delete(
"https://api.cryptohopper.com/v1/hopper/HOPPER_ID/order",
headers={
"access-token": "YOUR_ACCESS_TOKEN"
},
json={
"order_ids": [
342000001,
342000002
]
},
)
data = response.json()
$ch = curl_init('https://api.cryptohopper.com/v1/hopper/HOPPER_ID/order');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'access-token: YOUR_ACCESS_TOKEN',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'order_ids' => [
342000001,
342000002,
],
]),
]);
$data = json_decode(curl_exec($ch), true);
Parameters
Headers
| Name | Type | Required | Description |
|---|---|---|---|
access-token |
string | Required | The OAuth access token of the user. |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id |
string | Required | Hopper ID. |
Response
{
"data": "Order(s) removed."
}