PATCH
https://api.cryptohopper.com/v1/hopper/{id}/config/pool/{pool_id}
Updates a config pool of the hopper. The config is validated before it is saved; name, coins and enabled are optional.
OAuth scope:
read manage About scopes
config is required. The field names differ from creating a pool: name and coins instead of pool_name and selected_coins. coins can be an array or a comma separated string; an empty value clears the coins. enabled accepts true, false, 1 or 0. Not available for AI Bots.
Example request
curl -X PATCH "https://api.cryptohopper.com/v1/hopper/HOPPER_ID/config/pool/POOL_ID" \
-H "access-token: YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"Altcoins","coins":["ETH","SOL","ADA"],"config":{"max_open_positions":5,"stop_loss":1,"stop_loss_percentage":3},"enabled":true}'
const response = await fetch('https://api.cryptohopper.com/v1/hopper/HOPPER_ID/config/pool/POOL_ID', {
method: 'PATCH',
headers: {
"access-token": "YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "Altcoins",
"coins": [
"ETH",
"SOL",
"ADA"
],
"config": {
"max_open_positions": 5,
"stop_loss": 1,
"stop_loss_percentage": 3
},
"enabled": true
})
});
const data = await response.json();
import requests
response = requests.patch(
"https://api.cryptohopper.com/v1/hopper/HOPPER_ID/config/pool/POOL_ID",
headers={
"access-token": "YOUR_ACCESS_TOKEN"
},
json={
"name": "Altcoins",
"coins": [
"ETH",
"SOL",
"ADA"
],
"config": {
"max_open_positions": 5,
"stop_loss": 1,
"stop_loss_percentage": 3
},
"enabled": True
},
)
data = response.json()
$ch = curl_init('https://api.cryptohopper.com/v1/hopper/HOPPER_ID/config/pool/POOL_ID');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'access-token: YOUR_ACCESS_TOKEN',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Altcoins',
'coins' => [
'ETH',
'SOL',
'ADA',
],
'config' => [
'max_open_positions' => 5,
'stop_loss' => 1,
'stop_loss_percentage' => 3,
],
'enabled' => true,
]),
]);
$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 |
|---|---|---|---|
pool_id |
string | Required | Config pool ID. |
id |
string | Required | Hopper ID. |
Response
{
"data": "Config pool updated."
}