PATCH
https://api.cryptohopper.com/v1/backtest/{id}/notes/{note_id}
Saves a note on a backtest. The handler stores the title and note as a new note and does not change the note with note_id.
OAuth scope:
read manage About scopes
Requires an active subscription or trial; otherwise the request is refused with 403.
Example request
curl -X PATCH "https://api.cryptohopper.com/v1/backtest/BACKTEST_ID/notes/NOTE_ID" \
-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/NOTE_ID', {
method: 'PATCH',
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.patch(
"https://api.cryptohopper.com/v1/backtest/BACKTEST_ID/notes/NOTE_ID",
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/NOTE_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([
'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 |
|---|---|---|---|
note_id |
string | Required | Note ID, as returned by Get backtest notes. |
id |
string | Required | Backtest ID, as returned by List backtests. |
Response
{
"data": "Note saved."
}