Preview a balance credit
Shows what crediting back an incident window’s losses would do, without changing anything.
For each account you list, it adds up the net P&L of every fill in the window (windowStart inclusive, windowEnd exclusive): realized P&L minus fees and commission. An account whose window net P&L is a loss gets that loss back as a credit. Accounts left out are listed in skipped with the reason: passed, failed or expired accounts are never credited.
Review the warnings before applying: BALANCE_TRAIL_MISMATCH means the account’s recorded balance changes for these fills do not add up to their net P&L, so crediting it may pay back a loss its balance never took.
Apply it with POST /organization/balance-adjustments, sending totals.totalAmount back as expectedTotalAmount.
Requires manage permission on traders.
curl -X POST "https://api.hyperprop.com/platform/v1/organization/balance-adjustments/preview" \
-H "X-API-Key: hp_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"accountIds": ["7c9e6679-7425-40de-944b-e07fc1f90ae7"], "windowStart": "2026-10-21T13:30:00Z", "windowEnd": "2026-10-21T14:15:00Z"}'
curl --request POST \
--url https://api.hyperprop.com/platform/v1/organization/balance-adjustments/preview \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"accountIds": [
"7c9e6679-7425-40de-944b-e07fc1f90ae7"
],
"windowStart": "2026-10-21T13:30:00Z",
"windowEnd": "2026-10-21T14:15:00Z",
"policy": {
"lossBasis": "net_after_fees",
"shiftDailyBaseline": true,
"highWaterMarkMode": "unchanged",
"requireFlat": false,
"skipAlreadyCredited": true,
"maxCreditPerAccount": null
}
}
'import requests
url = "https://api.hyperprop.com/platform/v1/organization/balance-adjustments/preview"
payload = {
"accountIds": ["7c9e6679-7425-40de-944b-e07fc1f90ae7"],
"windowStart": "2026-10-21T13:30:00Z",
"windowEnd": "2026-10-21T14:15:00Z",
"policy": {
"lossBasis": "net_after_fees",
"shiftDailyBaseline": True,
"highWaterMarkMode": "unchanged",
"requireFlat": False,
"skipAlreadyCredited": True,
"maxCreditPerAccount": None
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
accountIds: ['7c9e6679-7425-40de-944b-e07fc1f90ae7'],
windowStart: '2026-10-21T13:30:00Z',
windowEnd: '2026-10-21T14:15:00Z',
policy: {
lossBasis: 'net_after_fees',
shiftDailyBaseline: true,
highWaterMarkMode: 'unchanged',
requireFlat: false,
skipAlreadyCredited: true,
maxCreditPerAccount: null
}
})
};
fetch('https://api.hyperprop.com/platform/v1/organization/balance-adjustments/preview', 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/balance-adjustments/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'accountIds' => [
'7c9e6679-7425-40de-944b-e07fc1f90ae7'
],
'windowStart' => '2026-10-21T13:30:00Z',
'windowEnd' => '2026-10-21T14:15:00Z',
'policy' => [
'lossBasis' => 'net_after_fees',
'shiftDailyBaseline' => true,
'highWaterMarkMode' => 'unchanged',
'requireFlat' => false,
'skipAlreadyCredited' => true,
'maxCreditPerAccount' => null
]
]),
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/balance-adjustments/preview"
payload := strings.NewReader("{\n \"accountIds\": [\n \"7c9e6679-7425-40de-944b-e07fc1f90ae7\"\n ],\n \"windowStart\": \"2026-10-21T13:30:00Z\",\n \"windowEnd\": \"2026-10-21T14:15:00Z\",\n \"policy\": {\n \"lossBasis\": \"net_after_fees\",\n \"shiftDailyBaseline\": true,\n \"highWaterMarkMode\": \"unchanged\",\n \"requireFlat\": false,\n \"skipAlreadyCredited\": true,\n \"maxCreditPerAccount\": null\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.hyperprop.com/platform/v1/organization/balance-adjustments/preview")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"accountIds\": [\n \"7c9e6679-7425-40de-944b-e07fc1f90ae7\"\n ],\n \"windowStart\": \"2026-10-21T13:30:00Z\",\n \"windowEnd\": \"2026-10-21T14:15:00Z\",\n \"policy\": {\n \"lossBasis\": \"net_after_fees\",\n \"shiftDailyBaseline\": true,\n \"highWaterMarkMode\": \"unchanged\",\n \"requireFlat\": false,\n \"skipAlreadyCredited\": true,\n \"maxCreditPerAccount\": null\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/platform/v1/organization/balance-adjustments/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"accountIds\": [\n \"7c9e6679-7425-40de-944b-e07fc1f90ae7\"\n ],\n \"windowStart\": \"2026-10-21T13:30:00Z\",\n \"windowEnd\": \"2026-10-21T14:15:00Z\",\n \"policy\": {\n \"lossBasis\": \"net_after_fees\",\n \"shiftDailyBaseline\": true,\n \"highWaterMarkMode\": \"unchanged\",\n \"requireFlat\": false,\n \"skipAlreadyCredited\": true,\n \"maxCreditPerAccount\": null\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"windowStart": "2026-10-21T13:30:00.000Z",
"windowEnd": "2026-10-21T14:15:00.000Z",
"policy": {
"lossBasis": "net_after_fees",
"shiftDailyBaseline": true,
"highWaterMarkMode": "unchanged",
"requireFlat": false,
"skipAlreadyCredited": true,
"maxCreditPerAccount": null
},
"totals": {
"accounts": 1250,
"credited": 840,
"skipped": 410,
"totalAmount": 186420.75,
"warnings": 3
},
"credits": [
{
"accountId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"accountNumber": "ACC-50K-000123",
"status": "in_progress",
"amount": 412.5,
"netPnl": -412.5,
"realizedPnl": -398.1,
"fees": 14.4,
"fills": 6,
"currentBalance": 48920,
"warnings": []
}
],
"skipped": [
{
"accountId": "9b2e1f4c-3d5a-4b6c-8e7f-0a1b2c3d4e5f",
"accountNumber": "ACC-50K-000456",
"reason": "ACCOUNT_CLOSED",
"netPnl": -120
}
]
}
}{
"success": false,
"statusCode": 400,
"error": "Bad Request",
"message": "2 of the account IDs are not accounts of your organization; nothing was changed",
"code": "ACCOUNTS_NOT_FOUND",
"unknownAccountIds": [
"<string>"
],
"unknownCount": 123
}{
"success": false,
"statusCode": 401,
"error": "Unauthorized",
"message": "Authentication required",
"code": "UNAUTHORIZED"
}{
"statusCode": 403,
"error": "Forbidden",
"message": "Your role does not have write access to \"Traders & accounts\"",
"code": "INSUFFICIENT_PERMISSIONS"
}{
"success": false,
"statusCode": 500,
"error": "Internal Server Error",
"message": "An unexpected error occurred",
"code": "INTERNAL_ERROR"
}Authorizations
Organization API key. Format: "hp_live_{key}". Organization admins manage the key in the dashboard.
Body
The accounts to consider (1 to 5,000 of your organization; duplicates are ignored).
1 - 5000 elements["7c9e6679-7425-40de-944b-e07fc1f90ae7"]
Start of the incident window (inclusive), ISO 8601.
"2026-10-21T13:30:00Z"
End of the incident window (exclusive). Must be in the past; the window may span at most 7 days.
"2026-10-21T14:15:00Z"
How the credit is computed and applied. Every field is optional; the defaults are shown.
Show child attributes
Show child attributes
curl --request POST \
--url https://api.hyperprop.com/platform/v1/organization/balance-adjustments/preview \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"accountIds": [
"7c9e6679-7425-40de-944b-e07fc1f90ae7"
],
"windowStart": "2026-10-21T13:30:00Z",
"windowEnd": "2026-10-21T14:15:00Z",
"policy": {
"lossBasis": "net_after_fees",
"shiftDailyBaseline": true,
"highWaterMarkMode": "unchanged",
"requireFlat": false,
"skipAlreadyCredited": true,
"maxCreditPerAccount": null
}
}
'import requests
url = "https://api.hyperprop.com/platform/v1/organization/balance-adjustments/preview"
payload = {
"accountIds": ["7c9e6679-7425-40de-944b-e07fc1f90ae7"],
"windowStart": "2026-10-21T13:30:00Z",
"windowEnd": "2026-10-21T14:15:00Z",
"policy": {
"lossBasis": "net_after_fees",
"shiftDailyBaseline": True,
"highWaterMarkMode": "unchanged",
"requireFlat": False,
"skipAlreadyCredited": True,
"maxCreditPerAccount": None
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
accountIds: ['7c9e6679-7425-40de-944b-e07fc1f90ae7'],
windowStart: '2026-10-21T13:30:00Z',
windowEnd: '2026-10-21T14:15:00Z',
policy: {
lossBasis: 'net_after_fees',
shiftDailyBaseline: true,
highWaterMarkMode: 'unchanged',
requireFlat: false,
skipAlreadyCredited: true,
maxCreditPerAccount: null
}
})
};
fetch('https://api.hyperprop.com/platform/v1/organization/balance-adjustments/preview', 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/balance-adjustments/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'accountIds' => [
'7c9e6679-7425-40de-944b-e07fc1f90ae7'
],
'windowStart' => '2026-10-21T13:30:00Z',
'windowEnd' => '2026-10-21T14:15:00Z',
'policy' => [
'lossBasis' => 'net_after_fees',
'shiftDailyBaseline' => true,
'highWaterMarkMode' => 'unchanged',
'requireFlat' => false,
'skipAlreadyCredited' => true,
'maxCreditPerAccount' => null
]
]),
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/balance-adjustments/preview"
payload := strings.NewReader("{\n \"accountIds\": [\n \"7c9e6679-7425-40de-944b-e07fc1f90ae7\"\n ],\n \"windowStart\": \"2026-10-21T13:30:00Z\",\n \"windowEnd\": \"2026-10-21T14:15:00Z\",\n \"policy\": {\n \"lossBasis\": \"net_after_fees\",\n \"shiftDailyBaseline\": true,\n \"highWaterMarkMode\": \"unchanged\",\n \"requireFlat\": false,\n \"skipAlreadyCredited\": true,\n \"maxCreditPerAccount\": null\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.hyperprop.com/platform/v1/organization/balance-adjustments/preview")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"accountIds\": [\n \"7c9e6679-7425-40de-944b-e07fc1f90ae7\"\n ],\n \"windowStart\": \"2026-10-21T13:30:00Z\",\n \"windowEnd\": \"2026-10-21T14:15:00Z\",\n \"policy\": {\n \"lossBasis\": \"net_after_fees\",\n \"shiftDailyBaseline\": true,\n \"highWaterMarkMode\": \"unchanged\",\n \"requireFlat\": false,\n \"skipAlreadyCredited\": true,\n \"maxCreditPerAccount\": null\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/platform/v1/organization/balance-adjustments/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"accountIds\": [\n \"7c9e6679-7425-40de-944b-e07fc1f90ae7\"\n ],\n \"windowStart\": \"2026-10-21T13:30:00Z\",\n \"windowEnd\": \"2026-10-21T14:15:00Z\",\n \"policy\": {\n \"lossBasis\": \"net_after_fees\",\n \"shiftDailyBaseline\": true,\n \"highWaterMarkMode\": \"unchanged\",\n \"requireFlat\": false,\n \"skipAlreadyCredited\": true,\n \"maxCreditPerAccount\": null\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"windowStart": "2026-10-21T13:30:00.000Z",
"windowEnd": "2026-10-21T14:15:00.000Z",
"policy": {
"lossBasis": "net_after_fees",
"shiftDailyBaseline": true,
"highWaterMarkMode": "unchanged",
"requireFlat": false,
"skipAlreadyCredited": true,
"maxCreditPerAccount": null
},
"totals": {
"accounts": 1250,
"credited": 840,
"skipped": 410,
"totalAmount": 186420.75,
"warnings": 3
},
"credits": [
{
"accountId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"accountNumber": "ACC-50K-000123",
"status": "in_progress",
"amount": 412.5,
"netPnl": -412.5,
"realizedPnl": -398.1,
"fees": 14.4,
"fills": 6,
"currentBalance": 48920,
"warnings": []
}
],
"skipped": [
{
"accountId": "9b2e1f4c-3d5a-4b6c-8e7f-0a1b2c3d4e5f",
"accountNumber": "ACC-50K-000456",
"reason": "ACCOUNT_CLOSED",
"netPnl": -120
}
]
}
}{
"success": false,
"statusCode": 400,
"error": "Bad Request",
"message": "2 of the account IDs are not accounts of your organization; nothing was changed",
"code": "ACCOUNTS_NOT_FOUND",
"unknownAccountIds": [
"<string>"
],
"unknownCount": 123
}{
"success": false,
"statusCode": 401,
"error": "Unauthorized",
"message": "Authentication required",
"code": "UNAUTHORIZED"
}{
"statusCode": 403,
"error": "Forbidden",
"message": "Your role does not have write access to \"Traders & accounts\"",
"code": "INSUFFICIENT_PERMISSIONS"
}{
"success": false,
"statusCode": 500,
"error": "Internal Server Error",
"message": "An unexpected error occurred",
"code": "INTERNAL_ERROR"
}