DELETE
https://api.cryptohopper.com/v1/hopper/{id}/order/{order_id}/tsb
Removes a trailing buy order, so no buy order is placed for it, and recalculates the hopper's reserved balances.
OAuth scope:
read manage About scopes
Not available for arbitrage, market maker, copy trading and grid bots. Returns an error when the trailing buy has already placed its buy order.
Example request
curl -X DELETE "https://api.cryptohopper.com/v1/hopper/HOPPER_ID/order/ORDER_ID/tsb" \
-H "access-token: YOUR_ACCESS_TOKEN"
const response = await fetch('https://api.cryptohopper.com/v1/hopper/HOPPER_ID/order/ORDER_ID/tsb', {
method: 'DELETE',
headers: {
"access-token": "YOUR_ACCESS_TOKEN"
}
});
const data = await response.json();
import requests
response = requests.delete(
"https://api.cryptohopper.com/v1/hopper/HOPPER_ID/order/ORDER_ID/tsb",
headers={
"access-token": "YOUR_ACCESS_TOKEN"
},
)
data = response.json()
$ch = curl_init('https://api.cryptohopper.com/v1/hopper/HOPPER_ID/order/ORDER_ID/tsb');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'access-token: YOUR_ACCESS_TOKEN',
],
]);
$data = json_decode(curl_exec($ch), true);
Parameters
Headers
| Name | Type | Required | Description |
|---|---|---|---|
access-token |
string | Optional | The OAuth access token of the user. |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
order_id |
string | Required | ID of the trailing buy order (the id field of an order with order_type "Trailing buy" in Get open orders). |
id |
string | Required | Hopper ID. |
Response
{
"data": "Deleted TSB order 19860001"
}