Mass credit
Create a mass credit template
Saves a set of rules (and optionally account filters) under a name, to start previews from. Names are unique per organization.
Requires manage permission on traders.
curl -X POST "https://api.hyperprop.com/platform/v1/organization/balance-adjustments/templates" \
-H "X-API-Key: hp_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"name": "Outage - net loss, cap 1000", "rules": {"lossBasis": "net", "maxCreditPerAccount": 1000}}'
POST
/
v1
/
organization
/
balance-adjustments
/
templates
Create a mass credit template
curl --request POST \
--url https://api.hyperprop.com/platform/v1/organization/balance-adjustments/templates \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Platform outage - net loss, capped",
"rules": {
"windowStart": "2026-10-21T13:30:00Z",
"windowEnd": "2026-10-21T14:15:00Z",
"lossBasis": "net",
"includeFees": true,
"maxCreditPerAccount": null,
"minCreditPerAccount": null,
"countTowardDailyPnl": false,
"moveHighWaterMark": false,
"requireFlat": false,
"skipAlreadyCredited": true
},
"description": "<string>"
}
'import requests
url = "https://api.hyperprop.com/platform/v1/organization/balance-adjustments/templates"
payload = {
"name": "Platform outage - net loss, capped",
"rules": {
"windowStart": "2026-10-21T13:30:00Z",
"windowEnd": "2026-10-21T14:15:00Z",
"lossBasis": "net",
"includeFees": True,
"maxCreditPerAccount": None,
"minCreditPerAccount": None,
"countTowardDailyPnl": False,
"moveHighWaterMark": False,
"requireFlat": False,
"skipAlreadyCredited": True
},
"description": "<string>"
}
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({
name: 'Platform outage - net loss, capped',
rules: {
windowStart: '2026-10-21T13:30:00Z',
windowEnd: '2026-10-21T14:15:00Z',
lossBasis: 'net',
includeFees: true,
maxCreditPerAccount: null,
minCreditPerAccount: null,
countTowardDailyPnl: false,
moveHighWaterMark: false,
requireFlat: false,
skipAlreadyCredited: true
},
description: '<string>'
})
};
fetch('https://api.hyperprop.com/platform/v1/organization/balance-adjustments/templates', 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/templates",
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([
'name' => 'Platform outage - net loss, capped',
'rules' => [
'windowStart' => '2026-10-21T13:30:00Z',
'windowEnd' => '2026-10-21T14:15:00Z',
'lossBasis' => 'net',
'includeFees' => true,
'maxCreditPerAccount' => null,
'minCreditPerAccount' => null,
'countTowardDailyPnl' => false,
'moveHighWaterMark' => false,
'requireFlat' => false,
'skipAlreadyCredited' => true
],
'description' => '<string>'
]),
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/templates"
payload := strings.NewReader("{\n \"name\": \"Platform outage - net loss, capped\",\n \"rules\": {\n \"windowStart\": \"2026-10-21T13:30:00Z\",\n \"windowEnd\": \"2026-10-21T14:15:00Z\",\n \"lossBasis\": \"net\",\n \"includeFees\": true,\n \"maxCreditPerAccount\": null,\n \"minCreditPerAccount\": null,\n \"countTowardDailyPnl\": false,\n \"moveHighWaterMark\": false,\n \"requireFlat\": false,\n \"skipAlreadyCredited\": true\n },\n \"description\": \"<string>\"\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/templates")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Platform outage - net loss, capped\",\n \"rules\": {\n \"windowStart\": \"2026-10-21T13:30:00Z\",\n \"windowEnd\": \"2026-10-21T14:15:00Z\",\n \"lossBasis\": \"net\",\n \"includeFees\": true,\n \"maxCreditPerAccount\": null,\n \"minCreditPerAccount\": null,\n \"countTowardDailyPnl\": false,\n \"moveHighWaterMark\": false,\n \"requireFlat\": false,\n \"skipAlreadyCredited\": true\n },\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/platform/v1/organization/balance-adjustments/templates")
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 \"name\": \"Platform outage - net loss, capped\",\n \"rules\": {\n \"windowStart\": \"2026-10-21T13:30:00Z\",\n \"windowEnd\": \"2026-10-21T14:15:00Z\",\n \"lossBasis\": \"net\",\n \"includeFees\": true,\n \"maxCreditPerAccount\": null,\n \"minCreditPerAccount\": null,\n \"countTowardDailyPnl\": false,\n \"moveHighWaterMark\": false,\n \"requireFlat\": false,\n \"skipAlreadyCredited\": true\n },\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "3f2a1b0c-9d8e-4f7a-8b6c-5d4e3f2a1b0c",
"name": "Platform outage - net loss, capped",
"description": "<string>",
"rules": {
"windowStart": "2026-10-21T13:30:00Z",
"windowEnd": "2026-10-21T14:15:00Z",
"lossBasis": "net",
"includeFees": true,
"maxCreditPerAccount": null,
"minCreditPerAccount": null,
"countTowardDailyPnl": false,
"moveHighWaterMark": false,
"requireFlat": false,
"skipAlreadyCredited": true
},
"selection": {
"mode": "all",
"filters": {
"planIds": [
"<string>"
],
"statuses": [
"in_progress"
],
"types": [
"evaluation"
],
"createdFrom": "2023-11-07T05:31:56Z",
"createdTo": "2023-11-07T05:31:56Z"
}
},
"createdBy": "ops@yourfirm.com",
"updatedBy": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
}{
"success": false,
"statusCode": 400,
"error": "Bad Request",
"message": "`minCreditPerAccount` cannot be larger than `maxCreditPerAccount`",
"code": "VALIDATION_ERROR"
}{
"success": false,
"statusCode": 401,
"error": "Unauthorized",
"message": "Authentication required",
"code": "UNAUTHORIZED"
}{
"statusCode": 403,
"error": "Forbidden",
"message": "Insufficient permissions",
"code": "INSUFFICIENT_PERMISSIONS"
}{
"success": false,
"statusCode": 409,
"error": "Conflict",
"message": "A template named \"Outage\" already exists",
"code": "TEMPLATE_EXISTS"
}{
"success": false,
"statusCode": 500,
"error": "Internal Server Error",
"message": "An unexpected error occurred",
"code": "INTERNAL_ERROR"
}{
"success": false,
"statusCode": 503,
"error": "Error",
"message": "Mass credit is 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
application/json
Required string length:
1 - 80Example:
"Platform outage - net loss, capped"
How the credit is computed. Every field is optional (a template or the defaults fill the rest), except the window, which the request or the template must give.
Show child attributes
Show child attributes
Maximum string length:
500Optional: all or filter (a template cannot hold an account list)
Show child attributes
Show child attributes
⌘I
Create a mass credit template
curl --request POST \
--url https://api.hyperprop.com/platform/v1/organization/balance-adjustments/templates \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Platform outage - net loss, capped",
"rules": {
"windowStart": "2026-10-21T13:30:00Z",
"windowEnd": "2026-10-21T14:15:00Z",
"lossBasis": "net",
"includeFees": true,
"maxCreditPerAccount": null,
"minCreditPerAccount": null,
"countTowardDailyPnl": false,
"moveHighWaterMark": false,
"requireFlat": false,
"skipAlreadyCredited": true
},
"description": "<string>"
}
'import requests
url = "https://api.hyperprop.com/platform/v1/organization/balance-adjustments/templates"
payload = {
"name": "Platform outage - net loss, capped",
"rules": {
"windowStart": "2026-10-21T13:30:00Z",
"windowEnd": "2026-10-21T14:15:00Z",
"lossBasis": "net",
"includeFees": True,
"maxCreditPerAccount": None,
"minCreditPerAccount": None,
"countTowardDailyPnl": False,
"moveHighWaterMark": False,
"requireFlat": False,
"skipAlreadyCredited": True
},
"description": "<string>"
}
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({
name: 'Platform outage - net loss, capped',
rules: {
windowStart: '2026-10-21T13:30:00Z',
windowEnd: '2026-10-21T14:15:00Z',
lossBasis: 'net',
includeFees: true,
maxCreditPerAccount: null,
minCreditPerAccount: null,
countTowardDailyPnl: false,
moveHighWaterMark: false,
requireFlat: false,
skipAlreadyCredited: true
},
description: '<string>'
})
};
fetch('https://api.hyperprop.com/platform/v1/organization/balance-adjustments/templates', 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/templates",
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([
'name' => 'Platform outage - net loss, capped',
'rules' => [
'windowStart' => '2026-10-21T13:30:00Z',
'windowEnd' => '2026-10-21T14:15:00Z',
'lossBasis' => 'net',
'includeFees' => true,
'maxCreditPerAccount' => null,
'minCreditPerAccount' => null,
'countTowardDailyPnl' => false,
'moveHighWaterMark' => false,
'requireFlat' => false,
'skipAlreadyCredited' => true
],
'description' => '<string>'
]),
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/templates"
payload := strings.NewReader("{\n \"name\": \"Platform outage - net loss, capped\",\n \"rules\": {\n \"windowStart\": \"2026-10-21T13:30:00Z\",\n \"windowEnd\": \"2026-10-21T14:15:00Z\",\n \"lossBasis\": \"net\",\n \"includeFees\": true,\n \"maxCreditPerAccount\": null,\n \"minCreditPerAccount\": null,\n \"countTowardDailyPnl\": false,\n \"moveHighWaterMark\": false,\n \"requireFlat\": false,\n \"skipAlreadyCredited\": true\n },\n \"description\": \"<string>\"\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/templates")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Platform outage - net loss, capped\",\n \"rules\": {\n \"windowStart\": \"2026-10-21T13:30:00Z\",\n \"windowEnd\": \"2026-10-21T14:15:00Z\",\n \"lossBasis\": \"net\",\n \"includeFees\": true,\n \"maxCreditPerAccount\": null,\n \"minCreditPerAccount\": null,\n \"countTowardDailyPnl\": false,\n \"moveHighWaterMark\": false,\n \"requireFlat\": false,\n \"skipAlreadyCredited\": true\n },\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/platform/v1/organization/balance-adjustments/templates")
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 \"name\": \"Platform outage - net loss, capped\",\n \"rules\": {\n \"windowStart\": \"2026-10-21T13:30:00Z\",\n \"windowEnd\": \"2026-10-21T14:15:00Z\",\n \"lossBasis\": \"net\",\n \"includeFees\": true,\n \"maxCreditPerAccount\": null,\n \"minCreditPerAccount\": null,\n \"countTowardDailyPnl\": false,\n \"moveHighWaterMark\": false,\n \"requireFlat\": false,\n \"skipAlreadyCredited\": true\n },\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "3f2a1b0c-9d8e-4f7a-8b6c-5d4e3f2a1b0c",
"name": "Platform outage - net loss, capped",
"description": "<string>",
"rules": {
"windowStart": "2026-10-21T13:30:00Z",
"windowEnd": "2026-10-21T14:15:00Z",
"lossBasis": "net",
"includeFees": true,
"maxCreditPerAccount": null,
"minCreditPerAccount": null,
"countTowardDailyPnl": false,
"moveHighWaterMark": false,
"requireFlat": false,
"skipAlreadyCredited": true
},
"selection": {
"mode": "all",
"filters": {
"planIds": [
"<string>"
],
"statuses": [
"in_progress"
],
"types": [
"evaluation"
],
"createdFrom": "2023-11-07T05:31:56Z",
"createdTo": "2023-11-07T05:31:56Z"
}
},
"createdBy": "ops@yourfirm.com",
"updatedBy": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
}{
"success": false,
"statusCode": 400,
"error": "Bad Request",
"message": "`minCreditPerAccount` cannot be larger than `maxCreditPerAccount`",
"code": "VALIDATION_ERROR"
}{
"success": false,
"statusCode": 401,
"error": "Unauthorized",
"message": "Authentication required",
"code": "UNAUTHORIZED"
}{
"statusCode": 403,
"error": "Forbidden",
"message": "Insufficient permissions",
"code": "INSUFFICIENT_PERMISSIONS"
}{
"success": false,
"statusCode": 409,
"error": "Conflict",
"message": "A template named \"Outage\" already exists",
"code": "TEMPLATE_EXISTS"
}{
"success": false,
"statusCode": 500,
"error": "Internal Server Error",
"message": "An unexpected error occurred",
"code": "INTERNAL_ERROR"
}{
"success": false,
"statusCode": 503,
"error": "Error",
"message": "Mass credit is not available yet; nothing was changed",
"code": "FEATURE_NOT_READY"
}