Trading accounts
List close-all runs
Every close-all run of your organization, newest first, with its progress counters. Use GET /organization/flatten-runs/{runId} for the affected accounts and failures of one run.
Requires view permission on traders.
curl "https://api.hyperprop.com/platform/v1/organization/flatten-runs?limit=20" \
-H "X-API-Key: hp_live_your_key_here"
GET
/
v1
/
organization
/
flatten-runs
List close-all runs
curl --request GET \
--url https://api.hyperprop.com/platform/v1/organization/flatten-runs \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.hyperprop.com/platform/v1/organization/flatten-runs"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.hyperprop.com/platform/v1/organization/flatten-runs', 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/flatten-runs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.hyperprop.com/platform/v1/organization/flatten-runs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.hyperprop.com/platform/v1/organization/flatten-runs")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/platform/v1/organization/flatten-runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"runs": [
{
"runId": "3f2a9c1e-8b7d-4e6f-a5c4-1d2e3f4a5b6c",
"scope": "all",
"status": "completed",
"reason": "Market data outage",
"requestedBy": "ops@yourfirm.com",
"total": 7180,
"processed": 7180,
"accountsFlattened": 412,
"positionsClosed": 530,
"ordersCancelled": 244,
"failed": 0,
"createdAt": "2026-10-17T14:02:11.000Z",
"lastProgressAt": "2026-10-17T14:04:52.000Z",
"completedAt": "2026-10-17T14:04:52.000Z"
}
],
"pagination": {
"total": 1,
"limit": 20,
"offset": 0,
"hasMore": false
}
}
}{
"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"
}{
"statusCode": 504,
"error": "Gateway Timeout",
"message": "The request did not complete within 25 seconds. Try again, or narrow it (for example a shorter date range).",
"code": "REQUEST_TIMEOUT"
}Authorizations
Organization API key. Format: "hp_live_{key}". Organization admins manage the key in the dashboard.
Query Parameters
Results per page
Required range:
1 <= x <= 100Pagination offset
Required range:
x >= 0⌘I
List close-all runs
curl --request GET \
--url https://api.hyperprop.com/platform/v1/organization/flatten-runs \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.hyperprop.com/platform/v1/organization/flatten-runs"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.hyperprop.com/platform/v1/organization/flatten-runs', 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/flatten-runs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.hyperprop.com/platform/v1/organization/flatten-runs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.hyperprop.com/platform/v1/organization/flatten-runs")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/platform/v1/organization/flatten-runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"runs": [
{
"runId": "3f2a9c1e-8b7d-4e6f-a5c4-1d2e3f4a5b6c",
"scope": "all",
"status": "completed",
"reason": "Market data outage",
"requestedBy": "ops@yourfirm.com",
"total": 7180,
"processed": 7180,
"accountsFlattened": 412,
"positionsClosed": 530,
"ordersCancelled": 244,
"failed": 0,
"createdAt": "2026-10-17T14:02:11.000Z",
"lastProgressAt": "2026-10-17T14:04:52.000Z",
"completedAt": "2026-10-17T14:04:52.000Z"
}
],
"pagination": {
"total": 1,
"limit": 20,
"offset": 0,
"hasMore": false
}
}
}{
"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"
}{
"statusCode": 504,
"error": "Gateway Timeout",
"message": "The request did not complete within 25 seconds. Try again, or narrow it (for example a shorter date range).",
"code": "REQUEST_TIMEOUT"
}