Credit back an incident window's losses
Credits each account the loss it took in the window, as computed by the preview, and records it as one batch.
The credit is applied to the live account straight away, alongside any trading on it, and exactly once per account and batch. By default the day’s starting balance moves with the credit, so it is not counted as that day’s profit, and the high-water mark does not change (see policy).
The batch continues in the background and the call returns 202 with a batchId at once. Follow it with GET /organization/balance-adjustments/{batchId}. Each credited account gets an account.updated event with trigger balance_adjustment, the batch ID, tag and reason, and an account.balance_changed event with reason adjustment.
Requires manage permission on traders.
curl -X POST "https://api.hyperprop.com/platform/v1/organization/balance-adjustments" \
-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", "reason": "US-open outage", "tag": "incident-2026-10-21", "expectedTotalAmount": 412.5}'
curl --request POST \
--url https://api.hyperprop.com/platform/v1/organization/balance-adjustments \
--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",
"reason": "US-open outage, 21 October",
"tag": "incident-2026-10-21",
"expectedTotalAmount": 186420.75,
"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"
payload = {
"accountIds": ["7c9e6679-7425-40de-944b-e07fc1f90ae7"],
"windowStart": "2026-10-21T13:30:00Z",
"windowEnd": "2026-10-21T14:15:00Z",
"reason": "US-open outage, 21 October",
"tag": "incident-2026-10-21",
"expectedTotalAmount": 186420.75,
"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',
reason: 'US-open outage, 21 October',
tag: 'incident-2026-10-21',
expectedTotalAmount: 186420.75,
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', 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",
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',
'reason' => 'US-open outage, 21 October',
'tag' => 'incident-2026-10-21',
'expectedTotalAmount' => 186420.75,
'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"
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 \"reason\": \"US-open outage, 21 October\",\n \"tag\": \"incident-2026-10-21\",\n \"expectedTotalAmount\": 186420.75,\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")
.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 \"reason\": \"US-open outage, 21 October\",\n \"tag\": \"incident-2026-10-21\",\n \"expectedTotalAmount\": 186420.75,\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")
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 \"reason\": \"US-open outage, 21 October\",\n \"tag\": \"incident-2026-10-21\",\n \"expectedTotalAmount\": 186420.75,\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": {
"batchId": "5d1c7a2e-3b4f-4c8d-9e0a-1b2c3d4e5f60",
"kind": "credit",
"tag": "incident-2026-10-21",
"reason": "US-open outage, 21 October",
"status": "completed",
"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
},
"requestedBy": "ops@yourfirm.com",
"total": 840,
"processed": 840,
"applied": 838,
"failed": 2,
"skipped": 410,
"totalAmount": 186420.75,
"appliedAmount": 186010.25,
"reversesBatchId": null,
"createdAt": "2026-10-25T15:02:11.000Z",
"lastProgressAt": "2026-10-25T15:04:52.000Z",
"completedAt": "2026-10-25T15:04:52.000Z",
"skippedAccounts": [
{
"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": 409,
"error": "Conflict",
"message": "The credit total is now $186,532.75, not the $186,420.75 you confirmed; preview again. Nothing was credited.",
"code": "PREVIEW_CHANGED",
"totals": {}
}{
"success": false,
"statusCode": 500,
"error": "Internal Server Error",
"message": "An unexpected error occurred",
"code": "INTERNAL_ERROR"
}{
"success": false,
"statusCode": 503,
"error": "Error",
"message": "Balance adjustments are not available yet; nothing was changed",
"code": "FEATURE_NOT_READY"
}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"
Why the accounts are credited. Recorded on every adjustment, the account activity and the webhook.
3 - 200"US-open outage, 21 October"
Your name for this credit (letters, digits, ., _, :, -). One credit batch per tag: sending the same tag again is refused with 409.
3 - 80^[A-Za-z0-9._:-]+$"incident-2026-10-21"
totals.totalAmount from the preview you reviewed. If the recomputed total differs, nothing is credited and the call answers 409 PREVIEW_CHANGED.
186420.75
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 \
--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",
"reason": "US-open outage, 21 October",
"tag": "incident-2026-10-21",
"expectedTotalAmount": 186420.75,
"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"
payload = {
"accountIds": ["7c9e6679-7425-40de-944b-e07fc1f90ae7"],
"windowStart": "2026-10-21T13:30:00Z",
"windowEnd": "2026-10-21T14:15:00Z",
"reason": "US-open outage, 21 October",
"tag": "incident-2026-10-21",
"expectedTotalAmount": 186420.75,
"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',
reason: 'US-open outage, 21 October',
tag: 'incident-2026-10-21',
expectedTotalAmount: 186420.75,
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', 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",
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',
'reason' => 'US-open outage, 21 October',
'tag' => 'incident-2026-10-21',
'expectedTotalAmount' => 186420.75,
'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"
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 \"reason\": \"US-open outage, 21 October\",\n \"tag\": \"incident-2026-10-21\",\n \"expectedTotalAmount\": 186420.75,\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")
.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 \"reason\": \"US-open outage, 21 October\",\n \"tag\": \"incident-2026-10-21\",\n \"expectedTotalAmount\": 186420.75,\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")
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 \"reason\": \"US-open outage, 21 October\",\n \"tag\": \"incident-2026-10-21\",\n \"expectedTotalAmount\": 186420.75,\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": {
"batchId": "5d1c7a2e-3b4f-4c8d-9e0a-1b2c3d4e5f60",
"kind": "credit",
"tag": "incident-2026-10-21",
"reason": "US-open outage, 21 October",
"status": "completed",
"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
},
"requestedBy": "ops@yourfirm.com",
"total": 840,
"processed": 840,
"applied": 838,
"failed": 2,
"skipped": 410,
"totalAmount": 186420.75,
"appliedAmount": 186010.25,
"reversesBatchId": null,
"createdAt": "2026-10-25T15:02:11.000Z",
"lastProgressAt": "2026-10-25T15:04:52.000Z",
"completedAt": "2026-10-25T15:04:52.000Z",
"skippedAccounts": [
{
"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": 409,
"error": "Conflict",
"message": "The credit total is now $186,532.75, not the $186,420.75 you confirmed; preview again. Nothing was credited.",
"code": "PREVIEW_CHANGED",
"totals": {}
}{
"success": false,
"statusCode": 500,
"error": "Internal Server Error",
"message": "An unexpected error occurred",
"code": "INTERNAL_ERROR"
}{
"success": false,
"statusCode": 503,
"error": "Error",
"message": "Balance adjustments are not available yet; nothing was changed",
"code": "FEATURE_NOT_READY"
}