DELETE
https://api.cryptohopper.com/v1/hopper/{id}/trigger/{trigger_id}
Deletes a trigger of the hopper and returns how many triggers are left.
The handler checks no OAuth scope: any valid access token can call it. No request body is needed.
Example request
curl -X DELETE "https://api.cryptohopper.com/v1/hopper/HOPPER_ID/trigger/TRIGGER_ID" \
-H "access-token: YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"indicators":["price"],"actions":["load_template"]}'
const response = await fetch('https://api.cryptohopper.com/v1/hopper/HOPPER_ID/trigger/TRIGGER_ID', {
method: 'DELETE',
headers: {
"access-token": "YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"indicators": [
"price"
],
"actions": [
"load_template"
]
})
});
const data = await response.json();
import requests
response = requests.delete(
"https://api.cryptohopper.com/v1/hopper/HOPPER_ID/trigger/TRIGGER_ID",
headers={
"access-token": "YOUR_ACCESS_TOKEN"
},
json={
"indicators": [
"price"
],
"actions": [
"load_template"
]
},
)
data = response.json()
$ch = curl_init('https://api.cryptohopper.com/v1/hopper/HOPPER_ID/trigger/TRIGGER_ID');
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([
'indicators' => [
'price',
],
'actions' => [
'load_template',
],
]),
]);
$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 |
|---|---|---|---|
trigger_id |
string | Required | Trigger ID. |
id |
string | Required | Hopper ID. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
indicators | array of string | Optional | |
actions | array of string | Optional |
Response
{
"data": {
"message": "Trigger deleted.",
"triggers_left": 5,
"triggers_total": 0
}
}