POST
https://api.cryptohopper.com/v1/backtest
Starts a backtest of one of your bots, one of your templates or a marketplace template. If you already have a backtest for the same template or bot, that backtest is reset and runs again with the new settings.
OAuth scope:
read manage About scopes
Send hopper_id instead of template_id to test one of your bots; it takes precedence. template_type is user or market (default market). subscription_id (1, 2 or 3) sets the plan level to simulate and defaults to your highest plan. When you are at your limit of running backtests or daily backtests, the backtest is queued and the message says so. Only trading, portfolio and grid bots and templates can be backtested. Requires an active subscription or trial; otherwise the request is refused with 403.
Example request
curl -X POST "https://api.cryptohopper.com/v1/backtest" \
-H "access-token: YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"template_id":8812,"template_type":"market","start_date":"2026-08-01 00:00:00","end_date":"2026-08-31 00:00:00","start_amount":1000,"maker_fee":0.1,"taker_fee":0.1,"subscription_id":3}'
const response = await fetch('https://api.cryptohopper.com/v1/backtest', {
method: 'POST',
headers: {
"access-token": "YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"template_id": 8812,
"template_type": "market",
"start_date": "2026-08-01 00:00:00",
"end_date": "2026-08-31 00:00:00",
"start_amount": 1000,
"maker_fee": 0.1,
"taker_fee": 0.1,
"subscription_id": 3
})
});
const data = await response.json();
import requests
response = requests.post(
"https://api.cryptohopper.com/v1/backtest",
headers={
"access-token": "YOUR_ACCESS_TOKEN"
},
json={
"template_id": 8812,
"template_type": "market",
"start_date": "2026-08-01 00:00:00",
"end_date": "2026-08-31 00:00:00",
"start_amount": 1000,
"maker_fee": 0.1,
"taker_fee": 0.1,
"subscription_id": 3
},
)
data = response.json()
$ch = curl_init('https://api.cryptohopper.com/v1/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([
'template_id' => 8812,
'template_type' => 'market',
'start_date' => '2026-08-01 00:00:00',
'end_date' => '2026-08-31 00:00:00',
'start_amount' => 1000,
'maker_fee' => 0.1,
'taker_fee' => 0.1,
'subscription_id' => 3,
]),
]);
$data = json_decode(curl_exec($ch), true);
Parameters
Headers
| Name | Type | Required | Description |
|---|---|---|---|
access-token |
string | Required | The OAuth access token of the user. |
Response
{
"data": "Your backtest has started. You can track the progress on this page."
}