POST
https://api.cryptohopper.com/v1/hopper/{id}/backtest
Starts a backtest of one strategy on one coin, using the exchange and quote currency of the hopper's config. Only one strategy backtest can run at a time per account.
OAuth scope:
read About scopes
currency is required. strategy is user_<id>, market_<id> or ai_<id>; built-in strategies (multiple_ta) are refused. date_range is only used when custom_period is 1. The result appears in List strategy backtests when the run finishes. Uses the backtest rate limit: one request per 2 seconds per token and app. Refused with 403 when you reached today's strategy backtest limit.
Example request
curl -X POST "https://api.cryptohopper.com/v1/hopper/HOPPER_ID/backtest" \
-H "access-token: YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"currency":"ETH","strategy":"user_4521","take_profit":2,"sell_with_strategy":0,"stop_loss":1,"stop_loss_percentage":5,"trailing_stop_loss":0,"trailing_stop_loss_only":0,"trailing_stop_loss_percentage":0,"trailing_stop_loss_arm":0,"trailing_buy":0,"trailing_buy_percentage":0,"custom_period":1,"date_range":"2026-08-01 00:00:00 - 2026-08-31 00:00:00"}'
const response = await fetch('https://api.cryptohopper.com/v1/hopper/HOPPER_ID/backtest', {
method: 'POST',
headers: {
"access-token": "YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"currency": "ETH",
"strategy": "user_4521",
"take_profit": 2,
"sell_with_strategy": 0,
"stop_loss": 1,
"stop_loss_percentage": 5,
"trailing_stop_loss": 0,
"trailing_stop_loss_only": 0,
"trailing_stop_loss_percentage": 0,
"trailing_stop_loss_arm": 0,
"trailing_buy": 0,
"trailing_buy_percentage": 0,
"custom_period": 1,
"date_range": "2026-08-01 00:00:00 - 2026-08-31 00:00:00"
})
});
const data = await response.json();
import requests
response = requests.post(
"https://api.cryptohopper.com/v1/hopper/HOPPER_ID/backtest",
headers={
"access-token": "YOUR_ACCESS_TOKEN"
},
json={
"currency": "ETH",
"strategy": "user_4521",
"take_profit": 2,
"sell_with_strategy": 0,
"stop_loss": 1,
"stop_loss_percentage": 5,
"trailing_stop_loss": 0,
"trailing_stop_loss_only": 0,
"trailing_stop_loss_percentage": 0,
"trailing_stop_loss_arm": 0,
"trailing_buy": 0,
"trailing_buy_percentage": 0,
"custom_period": 1,
"date_range": "2026-08-01 00:00:00 - 2026-08-31 00:00:00"
},
)
data = response.json()
$ch = curl_init('https://api.cryptohopper.com/v1/hopper/HOPPER_ID/backtest');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'access-token: YOUR_ACCESS_TOKEN',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'currency' => 'ETH',
'strategy' => 'user_4521',
'take_profit' => 2,
'sell_with_strategy' => 0,
'stop_loss' => 1,
'stop_loss_percentage' => 5,
'trailing_stop_loss' => 0,
'trailing_stop_loss_only' => 0,
'trailing_stop_loss_percentage' => 0,
'trailing_stop_loss_arm' => 0,
'trailing_buy' => 0,
'trailing_buy_percentage' => 0,
'custom_period' => 1,
'date_range' => '2026-08-01 00:00:00 - 2026-08-31 00:00:00',
]),
]);
$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. Must be one of your hoppers; arbitrage, market maker, copy, grid and AI bots are refused. |
Response
{
"data": "Backtest has started."
}