POST
https://api.cryptohopper.com/v1/backtest/{id}/notes
Saves a new note with an optional title on one of your backtests. Line breaks in the note are stored as <br /> tags.
OAuth scope:
read manage About scopes
Requires an active subscription or trial; otherwise the request is refused with 403.
Example request
curl -X POST "https://api.cryptohopper.com/v1/backtest/BACKTEST_ID/notes" \
-H "access-token: YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"title":"First run","note":"Good results on BTC. Try a lower take profit next."}'
const response = await fetch('https://api.cryptohopper.com/v1/backtest/BACKTEST_ID/notes', {
method: 'POST',
headers: {
"access-token": "YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"title": "First run",
"note": "Good results on BTC. Try a lower take profit next."
})
});
const data = await response.json();
import requests
response = requests.post(
"https://api.cryptohopper.com/v1/backtest/BACKTEST_ID/notes",
headers={
"access-token": "YOUR_ACCESS_TOKEN"
},
json={
"title": "First run",
"note": "Good results on BTC. Try a lower take profit next."
},
)
data = response.json()
$ch = curl_init('https://api.cryptohopper.com/v1/backtest/BACKTEST_ID/notes');
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([
'title' => 'First run',
'note' => 'Good results on BTC. Try a lower take profit next.',
]),
]);
$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 | Backtest ID, as returned by List backtests. |
Response
{
"data": "Note saved."
}