Trading accounts
Bulk update trading accounts
Bulk update multiple trading accounts at once. Admin only.
All changes are logged to the audit trail with the batch ID for easy tracking.
Filters (at least one required):
| Filter | Description |
|---|---|
accountIds | Specific account IDs to update |
status | Filter by current status |
createdAfter / createdBefore | Filter by creation date |
startedAfter / startedBefore | Filter by start timestamp |
tradingPlanId | Filter by trading plan |
userId | Filter by user ID |
Updates (at least one required):
| Update | Description |
|---|---|
status | Change status |
currentBalance | Set new balance |
highWaterMark | Set new high water mark |
dailyStartingBalance | Set new daily starting balance |
violationReason | Set or clear (null) violation reason |
performanceData | Replace performance data |
metadata | Replace metadata |
resetToInitial | Reset to initial balance + in_progress status |
Safety:
- A reason is required for all bulk updates
- Max 100 accounts without specifying accountIds
- All changes are logged with before/after values
Example - Reset failed accounts after outage:
curl -X POST "https://api.hyperprop.com/platform/v1/organization/trading-accounts/bulk-update" \
-H "X-API-Key: hp_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"filters": {
"status": "failed",
"startedAfter": "2026-01-15T14:00:00Z",
"startedBefore": "2026-01-15T16:00:00Z"
},
"updates": {
"resetToInitial": true
},
"reason": "Outage compensation"
}'
Example - Bulk fail accounts:
curl -X POST ".../bulk-update" \
-d '{
"filters": { "accountIds": ["id1", "id2", "id3"] },
"updates": { "status": "failed", "violationReason": "Terms of service violation" },
"reason": "ToS violation - detected automated trading"
}'
Error Codes:
| Code | Description |
|---|---|
REASON_REQUIRED | Reason must be at least 3 characters |
NO_ACCOUNTS_FOUND | No accounts match the filters |
TOO_MANY_ACCOUNTS | Over 100 accounts without specific IDs |
NO_FIELDS_TO_UPDATE | No valid update fields provided |
POST
/
v1
/
organization
/
trading-accounts
/
bulk-update
Bulk update trading accounts
curl --request POST \
--url https://api.hyperprop.com/platform/v1/organization/trading-accounts/bulk-update \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"filters": {
"accountIds": [
"<string>"
],
"createdAfter": "<string>",
"createdBefore": "<string>",
"startedAfter": "<string>",
"startedBefore": "<string>",
"tradingPlanId": "<string>",
"userId": "<string>"
},
"updates": {
"currentBalance": 123,
"highWaterMark": 123,
"dailyStartingBalance": 123,
"violationReason": "<string>",
"performanceData": {},
"metadata": {},
"resetToInitial": true
},
"reason": "Goodwill credit"
}
'import requests
url = "https://api.hyperprop.com/platform/v1/organization/trading-accounts/bulk-update"
payload = {
"filters": {
"accountIds": ["<string>"],
"createdAfter": "<string>",
"createdBefore": "<string>",
"startedAfter": "<string>",
"startedBefore": "<string>",
"tradingPlanId": "<string>",
"userId": "<string>"
},
"updates": {
"currentBalance": 123,
"highWaterMark": 123,
"dailyStartingBalance": 123,
"violationReason": "<string>",
"performanceData": {},
"metadata": {},
"resetToInitial": True
},
"reason": "Goodwill credit"
}
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({
filters: {
accountIds: ['<string>'],
createdAfter: '<string>',
createdBefore: '<string>',
startedAfter: '<string>',
startedBefore: '<string>',
tradingPlanId: '<string>',
userId: '<string>'
},
updates: {
currentBalance: 123,
highWaterMark: 123,
dailyStartingBalance: 123,
violationReason: '<string>',
performanceData: {},
metadata: {},
resetToInitial: true
},
reason: 'Goodwill credit'
})
};
fetch('https://api.hyperprop.com/platform/v1/organization/trading-accounts/bulk-update', 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/trading-accounts/bulk-update",
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([
'filters' => [
'accountIds' => [
'<string>'
],
'createdAfter' => '<string>',
'createdBefore' => '<string>',
'startedAfter' => '<string>',
'startedBefore' => '<string>',
'tradingPlanId' => '<string>',
'userId' => '<string>'
],
'updates' => [
'currentBalance' => 123,
'highWaterMark' => 123,
'dailyStartingBalance' => 123,
'violationReason' => '<string>',
'performanceData' => [
],
'metadata' => [
],
'resetToInitial' => true
],
'reason' => 'Goodwill credit'
]),
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/trading-accounts/bulk-update"
payload := strings.NewReader("{\n \"filters\": {\n \"accountIds\": [\n \"<string>\"\n ],\n \"createdAfter\": \"<string>\",\n \"createdBefore\": \"<string>\",\n \"startedAfter\": \"<string>\",\n \"startedBefore\": \"<string>\",\n \"tradingPlanId\": \"<string>\",\n \"userId\": \"<string>\"\n },\n \"updates\": {\n \"currentBalance\": 123,\n \"highWaterMark\": 123,\n \"dailyStartingBalance\": 123,\n \"violationReason\": \"<string>\",\n \"performanceData\": {},\n \"metadata\": {},\n \"resetToInitial\": true\n },\n \"reason\": \"Goodwill credit\"\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/trading-accounts/bulk-update")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"filters\": {\n \"accountIds\": [\n \"<string>\"\n ],\n \"createdAfter\": \"<string>\",\n \"createdBefore\": \"<string>\",\n \"startedAfter\": \"<string>\",\n \"startedBefore\": \"<string>\",\n \"tradingPlanId\": \"<string>\",\n \"userId\": \"<string>\"\n },\n \"updates\": {\n \"currentBalance\": 123,\n \"highWaterMark\": 123,\n \"dailyStartingBalance\": 123,\n \"violationReason\": \"<string>\",\n \"performanceData\": {},\n \"metadata\": {},\n \"resetToInitial\": true\n },\n \"reason\": \"Goodwill credit\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/platform/v1/organization/trading-accounts/bulk-update")
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 \"filters\": {\n \"accountIds\": [\n \"<string>\"\n ],\n \"createdAfter\": \"<string>\",\n \"createdBefore\": \"<string>\",\n \"startedAfter\": \"<string>\",\n \"startedBefore\": \"<string>\",\n \"tradingPlanId\": \"<string>\",\n \"userId\": \"<string>\"\n },\n \"updates\": {\n \"currentBalance\": 123,\n \"highWaterMark\": 123,\n \"dailyStartingBalance\": 123,\n \"violationReason\": \"<string>\",\n \"performanceData\": {},\n \"metadata\": {},\n \"resetToInitial\": true\n },\n \"reason\": \"Goodwill credit\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Successfully updated 15 accounts",
"data": {
"batchId": "e4f5a6b7-c8d9-0123-efab-456789012345",
"accountsUpdated": 15,
"accountsTotal": 15,
"filters": {
"status": "failed",
"startDate": "2026-02-01"
},
"updates": {
"status": "in_progress",
"resetToInitial": true
},
"reason": "Server maintenance compensation - resetting failed accounts"
}
}{
"statusCode": 400,
"error": "Bad Request",
"message": "A reason is required for bulk updates",
"code": "REASON_REQUIRED"
}{
"success": false,
"statusCode": 401,
"error": "Unauthorized",
"message": "Authentication required",
"code": "UNAUTHORIZED"
}{
"success": false,
"statusCode": 403,
"error": "Forbidden",
"message": "Access denied",
"code": "FORBIDDEN"
}{
"statusCode": 404,
"error": "Not Found",
"message": "No accounts match the specified filters",
"code": "NO_ACCOUNTS_FOUND"
}{
"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
application/json
Response
Bulk update successful
Example:
true
Example:
"Successfully updated 15 accounts"
Show child attributes
Show child attributes
Example:
{
"batchId": "e4f5a6b7-c8d9-0123-efab-456789012345",
"accountsUpdated": 15,
"accountsTotal": 15,
"filters": {
"status": "failed",
"startDate": "2026-02-01"
},
"updates": {
"status": "in_progress",
"resetToInitial": true
},
"reason": "Server maintenance compensation - resetting failed accounts"
}
⌘I
Bulk update trading accounts
curl --request POST \
--url https://api.hyperprop.com/platform/v1/organization/trading-accounts/bulk-update \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"filters": {
"accountIds": [
"<string>"
],
"createdAfter": "<string>",
"createdBefore": "<string>",
"startedAfter": "<string>",
"startedBefore": "<string>",
"tradingPlanId": "<string>",
"userId": "<string>"
},
"updates": {
"currentBalance": 123,
"highWaterMark": 123,
"dailyStartingBalance": 123,
"violationReason": "<string>",
"performanceData": {},
"metadata": {},
"resetToInitial": true
},
"reason": "Goodwill credit"
}
'import requests
url = "https://api.hyperprop.com/platform/v1/organization/trading-accounts/bulk-update"
payload = {
"filters": {
"accountIds": ["<string>"],
"createdAfter": "<string>",
"createdBefore": "<string>",
"startedAfter": "<string>",
"startedBefore": "<string>",
"tradingPlanId": "<string>",
"userId": "<string>"
},
"updates": {
"currentBalance": 123,
"highWaterMark": 123,
"dailyStartingBalance": 123,
"violationReason": "<string>",
"performanceData": {},
"metadata": {},
"resetToInitial": True
},
"reason": "Goodwill credit"
}
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({
filters: {
accountIds: ['<string>'],
createdAfter: '<string>',
createdBefore: '<string>',
startedAfter: '<string>',
startedBefore: '<string>',
tradingPlanId: '<string>',
userId: '<string>'
},
updates: {
currentBalance: 123,
highWaterMark: 123,
dailyStartingBalance: 123,
violationReason: '<string>',
performanceData: {},
metadata: {},
resetToInitial: true
},
reason: 'Goodwill credit'
})
};
fetch('https://api.hyperprop.com/platform/v1/organization/trading-accounts/bulk-update', 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/trading-accounts/bulk-update",
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([
'filters' => [
'accountIds' => [
'<string>'
],
'createdAfter' => '<string>',
'createdBefore' => '<string>',
'startedAfter' => '<string>',
'startedBefore' => '<string>',
'tradingPlanId' => '<string>',
'userId' => '<string>'
],
'updates' => [
'currentBalance' => 123,
'highWaterMark' => 123,
'dailyStartingBalance' => 123,
'violationReason' => '<string>',
'performanceData' => [
],
'metadata' => [
],
'resetToInitial' => true
],
'reason' => 'Goodwill credit'
]),
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/trading-accounts/bulk-update"
payload := strings.NewReader("{\n \"filters\": {\n \"accountIds\": [\n \"<string>\"\n ],\n \"createdAfter\": \"<string>\",\n \"createdBefore\": \"<string>\",\n \"startedAfter\": \"<string>\",\n \"startedBefore\": \"<string>\",\n \"tradingPlanId\": \"<string>\",\n \"userId\": \"<string>\"\n },\n \"updates\": {\n \"currentBalance\": 123,\n \"highWaterMark\": 123,\n \"dailyStartingBalance\": 123,\n \"violationReason\": \"<string>\",\n \"performanceData\": {},\n \"metadata\": {},\n \"resetToInitial\": true\n },\n \"reason\": \"Goodwill credit\"\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/trading-accounts/bulk-update")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"filters\": {\n \"accountIds\": [\n \"<string>\"\n ],\n \"createdAfter\": \"<string>\",\n \"createdBefore\": \"<string>\",\n \"startedAfter\": \"<string>\",\n \"startedBefore\": \"<string>\",\n \"tradingPlanId\": \"<string>\",\n \"userId\": \"<string>\"\n },\n \"updates\": {\n \"currentBalance\": 123,\n \"highWaterMark\": 123,\n \"dailyStartingBalance\": 123,\n \"violationReason\": \"<string>\",\n \"performanceData\": {},\n \"metadata\": {},\n \"resetToInitial\": true\n },\n \"reason\": \"Goodwill credit\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/platform/v1/organization/trading-accounts/bulk-update")
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 \"filters\": {\n \"accountIds\": [\n \"<string>\"\n ],\n \"createdAfter\": \"<string>\",\n \"createdBefore\": \"<string>\",\n \"startedAfter\": \"<string>\",\n \"startedBefore\": \"<string>\",\n \"tradingPlanId\": \"<string>\",\n \"userId\": \"<string>\"\n },\n \"updates\": {\n \"currentBalance\": 123,\n \"highWaterMark\": 123,\n \"dailyStartingBalance\": 123,\n \"violationReason\": \"<string>\",\n \"performanceData\": {},\n \"metadata\": {},\n \"resetToInitial\": true\n },\n \"reason\": \"Goodwill credit\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Successfully updated 15 accounts",
"data": {
"batchId": "e4f5a6b7-c8d9-0123-efab-456789012345",
"accountsUpdated": 15,
"accountsTotal": 15,
"filters": {
"status": "failed",
"startDate": "2026-02-01"
},
"updates": {
"status": "in_progress",
"resetToInitial": true
},
"reason": "Server maintenance compensation - resetting failed accounts"
}
}{
"statusCode": 400,
"error": "Bad Request",
"message": "A reason is required for bulk updates",
"code": "REASON_REQUIRED"
}{
"success": false,
"statusCode": 401,
"error": "Unauthorized",
"message": "Authentication required",
"code": "UNAUTHORIZED"
}{
"success": false,
"statusCode": 403,
"error": "Forbidden",
"message": "Access denied",
"code": "FORBIDDEN"
}{
"statusCode": 404,
"error": "Not Found",
"message": "No accounts match the specified filters",
"code": "NO_ACCOUNTS_FOUND"
}{
"success": false,
"statusCode": 500,
"error": "Internal Server Error",
"message": "An unexpected error occurred",
"code": "INTERNAL_ERROR"
}