Trading accounts
Get an account's open positions
The open positions of one trading account, each marked at the current price when you call, with the organization API key. No trader session or trader API key is needed.
The values are the ones the trader sees and the real-time trading stream sends: unrealizedPnl is the same as in PositionUpdate messages. An account without open positions returns an empty positions list.
Use it with GET .../equity or the many-accounts read (GET /organization/trading-accounts/positions) to catch up after a stream disconnect; see the real-time trading stream guide.
Requires view permission on traders. About 600 requests per minute per organization, shared with GET .../equity.
curl "https://api.hyperprop.com/platform/v1/organization/trading-accounts/7c9e6679-7425-40de-944b-e07fc1f90ae7/positions" \
-H "X-API-Key: hp_live_your_key_here"
GET
/
v1
/
organization
/
trading-accounts
/
{accountId}
/
positions
Get an account's open positions
curl --request GET \
--url https://api.hyperprop.com/platform/v1/organization/trading-accounts/{accountId}/positions \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.hyperprop.com/platform/v1/organization/trading-accounts/{accountId}/positions"
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/trading-accounts/{accountId}/positions', 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/{accountId}/positions",
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/trading-accounts/{accountId}/positions"
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/trading-accounts/{accountId}/positions")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/platform/v1/organization/trading-accounts/{accountId}/positions")
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": {
"accountId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"asOf": "2026-10-30T14:41:07.118Z",
"positionsVersion": 12,
"unrealizedPnl": 41,
"positions": [
{
"positionId": "3f6c1d2e-8a4b-5c7d-9e0f-1a2b3c4d5e6f",
"contract": "MNQZ6",
"side": "long",
"quantity": 2,
"avgEntryPrice": 20000.25,
"markPrice": 20010.5,
"markedAt": "2026-10-30T14:41:07.250Z",
"unrealizedPnl": 41,
"realizedPnl": 0,
"isolatedMargin": null,
"openedAt": "2026-10-30T14:30:00.000Z",
"updatedAt": "2026-10-30T14:35:12.000Z",
"stateVersion": 12
}
]
}
}{
"success": false,
"statusCode": 400,
"error": "Bad Request",
"message": "Validation failed",
"code": "VALIDATION_ERROR"
}{
"success": false,
"statusCode": 401,
"error": "Unauthorized",
"message": "Authentication required",
"code": "UNAUTHORIZED"
}{
"statusCode": 403,
"error": "Forbidden",
"message": "Your role does not have view access to \"Traders & accounts\"",
"code": "INSUFFICIENT_PERMISSIONS"
}{
"success": false,
"statusCode": 404,
"error": "Not Found",
"message": "Trading account not found",
"code": "ACCOUNT_NOT_FOUND"
}{
"success": false,
"statusCode": 429,
"error": "Too Many Requests",
"message": "Too many live state requests; retry in 12s",
"code": "RATE_LIMITED",
"retryAfterSeconds": 12
}{
"success": false,
"statusCode": 500,
"error": "Internal Server Error",
"message": "An unexpected error occurred",
"code": "INTERNAL_ERROR"
}{
"success": false,
"statusCode": 503,
"error": "Error",
"message": "Live account state is temporarily unavailable; retry shortly",
"code": "LIVE_STATE_UNAVAILABLE"
}{
"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"
}⌘I
Get an account's open positions
curl --request GET \
--url https://api.hyperprop.com/platform/v1/organization/trading-accounts/{accountId}/positions \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.hyperprop.com/platform/v1/organization/trading-accounts/{accountId}/positions"
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/trading-accounts/{accountId}/positions', 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/{accountId}/positions",
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/trading-accounts/{accountId}/positions"
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/trading-accounts/{accountId}/positions")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/platform/v1/organization/trading-accounts/{accountId}/positions")
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": {
"accountId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"asOf": "2026-10-30T14:41:07.118Z",
"positionsVersion": 12,
"unrealizedPnl": 41,
"positions": [
{
"positionId": "3f6c1d2e-8a4b-5c7d-9e0f-1a2b3c4d5e6f",
"contract": "MNQZ6",
"side": "long",
"quantity": 2,
"avgEntryPrice": 20000.25,
"markPrice": 20010.5,
"markedAt": "2026-10-30T14:41:07.250Z",
"unrealizedPnl": 41,
"realizedPnl": 0,
"isolatedMargin": null,
"openedAt": "2026-10-30T14:30:00.000Z",
"updatedAt": "2026-10-30T14:35:12.000Z",
"stateVersion": 12
}
]
}
}{
"success": false,
"statusCode": 400,
"error": "Bad Request",
"message": "Validation failed",
"code": "VALIDATION_ERROR"
}{
"success": false,
"statusCode": 401,
"error": "Unauthorized",
"message": "Authentication required",
"code": "UNAUTHORIZED"
}{
"statusCode": 403,
"error": "Forbidden",
"message": "Your role does not have view access to \"Traders & accounts\"",
"code": "INSUFFICIENT_PERMISSIONS"
}{
"success": false,
"statusCode": 404,
"error": "Not Found",
"message": "Trading account not found",
"code": "ACCOUNT_NOT_FOUND"
}{
"success": false,
"statusCode": 429,
"error": "Too Many Requests",
"message": "Too many live state requests; retry in 12s",
"code": "RATE_LIMITED",
"retryAfterSeconds": 12
}{
"success": false,
"statusCode": 500,
"error": "Internal Server Error",
"message": "An unexpected error occurred",
"code": "INTERNAL_ERROR"
}{
"success": false,
"statusCode": 503,
"error": "Error",
"message": "Live account state is temporarily unavailable; retry shortly",
"code": "LIVE_STATE_UNAVAILABLE"
}{
"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"
}