PATCH
https://api.cryptohopper.com/v1/hopper/{id}/rebalance
Sends a portfolio bot the command to rebalance right away instead of at its next scheduled check.
Only for portfolio bots (bot type 6).
Example request
curl -X PATCH "https://api.cryptohopper.com/v1/hopper/HOPPER_ID/rebalance" \
-H "access-token: YOUR_ACCESS_TOKEN"
const response = await fetch('https://api.cryptohopper.com/v1/hopper/HOPPER_ID/rebalance', {
method: 'PATCH',
headers: {
"access-token": "YOUR_ACCESS_TOKEN"
}
});
const data = await response.json();
import requests
response = requests.patch(
"https://api.cryptohopper.com/v1/hopper/HOPPER_ID/rebalance",
headers={
"access-token": "YOUR_ACCESS_TOKEN"
},
)
data = response.json()
$ch = curl_init('https://api.cryptohopper.com/v1/hopper/HOPPER_ID/rebalance');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
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 | Required | The OAuth access token of the user. |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id |
string | Required | Hopper ID. |
Response
{
"data": "Rebalance command sent."
}