Update revert settings
How a point-in-time restore (revertTo on POST /accounts/{accountId}/revert-trading-day and POST /accounts/revert-trading-day) treats the high-water mark and the trading day of the instant. End-of-day reverts (tradingDay) are not affected.
| Field | Values |
|---|---|
instantRevertHighWaterMark | at_instant (default): the high-water mark as it stood at the instant. Intraday-trailing accounts take the peak balance up to the instant; end-of-day-trailing accounts the last close’s value. · restored_balance: as at_instant, and the restored balance also counts as a high, as if the day had closed at the instant. Stricter: the trailing floor rises to the restored balance minus the drawdown. · keep_current: the revert leaves the high-water mark as it is. |
instantRevertDaySnapshot | partial (default): the trading day containing the instant keeps its snapshot, cut at the instant: ending balance = restored balance, P&L, fills and contracts up to the instant. The day stays in calendars, reports and consistency. · void: the whole trading day of the instant is voided, like every later day. |
Undo restores the snapshot of the instant’s day as it was before the revert.
Send only the fields to change. Requires the settings: manage permission. A change applies to reverts started after it; earlier reverts keep what they wrote.
Example:
curl -X PUT "https://api.hyperprop.com/platform/v1/organization/time-machine-settings" \
-H "X-API-Key: hp_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"instantRevertHighWaterMark": "restored_balance"}'
curl --request PUT \
--url https://api.hyperprop.com/platform/v1/organization/time-machine-settings \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"instantRevertHighWaterMark": "at_instant",
"instantRevertDaySnapshot": "partial"
}
'import requests
url = "https://api.hyperprop.com/platform/v1/organization/time-machine-settings"
payload = {
"instantRevertHighWaterMark": "at_instant",
"instantRevertDaySnapshot": "partial"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({instantRevertHighWaterMark: 'at_instant', instantRevertDaySnapshot: 'partial'})
};
fetch('https://api.hyperprop.com/platform/v1/organization/time-machine-settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hyperprop.com/platform/v1/organization/time-machine-settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'instantRevertHighWaterMark' => 'at_instant',
'instantRevertDaySnapshot' => 'partial'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hyperprop.com/platform/v1/organization/time-machine-settings"
payload := strings.NewReader("{\n \"instantRevertHighWaterMark\": \"at_instant\",\n \"instantRevertDaySnapshot\": \"partial\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.hyperprop.com/platform/v1/organization/time-machine-settings")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"instantRevertHighWaterMark\": \"at_instant\",\n \"instantRevertDaySnapshot\": \"partial\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/platform/v1/organization/time-machine-settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"instantRevertHighWaterMark\": \"at_instant\",\n \"instantRevertDaySnapshot\": \"partial\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"instantRevertHighWaterMark": "at_instant",
"instantRevertDaySnapshot": "partial"
}
}Authorizations
Organization API key. Format: "hp_live_{key}". Organization admins manage the key in the dashboard.
Body
High-water mark after a point-in-time (revertTo) restore: at_instant (default) = as it stood at the instant · restored_balance = the restored balance also counts as a high · keep_current = unchanged by the revert
at_instant, restored_balance, keep_current "at_instant"
The instant's trading-day snapshot after a point-in-time restore: partial (default) = kept with the activity up to the instant · void = the whole day is voided
partial, void "partial"
curl --request PUT \
--url https://api.hyperprop.com/platform/v1/organization/time-machine-settings \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"instantRevertHighWaterMark": "at_instant",
"instantRevertDaySnapshot": "partial"
}
'import requests
url = "https://api.hyperprop.com/platform/v1/organization/time-machine-settings"
payload = {
"instantRevertHighWaterMark": "at_instant",
"instantRevertDaySnapshot": "partial"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({instantRevertHighWaterMark: 'at_instant', instantRevertDaySnapshot: 'partial'})
};
fetch('https://api.hyperprop.com/platform/v1/organization/time-machine-settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hyperprop.com/platform/v1/organization/time-machine-settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'instantRevertHighWaterMark' => 'at_instant',
'instantRevertDaySnapshot' => 'partial'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hyperprop.com/platform/v1/organization/time-machine-settings"
payload := strings.NewReader("{\n \"instantRevertHighWaterMark\": \"at_instant\",\n \"instantRevertDaySnapshot\": \"partial\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.hyperprop.com/platform/v1/organization/time-machine-settings")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"instantRevertHighWaterMark\": \"at_instant\",\n \"instantRevertDaySnapshot\": \"partial\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/platform/v1/organization/time-machine-settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"instantRevertHighWaterMark\": \"at_instant\",\n \"instantRevertDaySnapshot\": \"partial\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"instantRevertHighWaterMark": "at_instant",
"instantRevertDaySnapshot": "partial"
}
}