Create a verifiable PnL card from a closed trade
Overview
Persists a server-attested PnL card for a closed trade. The card’s values are recomputed on the server from the persisted fill history and contract specifications; the client’s local PnL is not trusted. The returned card carries a server HMAC signature.
Idempotency
If the user already has a non-revoked card for the same trade, the existing
card is returned with HTTP 200 and created: false. New cards return 201.
Limits
| Limit | Value |
|---|---|
| Lifetime cards per user | 200 |
| Cards created per minute | 10 |
curl --request POST \
--url https://api.hyperprop.com/platform/v1/cards \
--header 'Content-Type: application/json' \
--data '
{
"accountId": "<string>",
"tradeRef": {
"entryOrderId": "<string>",
"exitOrderId": "<string>",
"entryOrderIds": [
"<string>"
],
"exitOrderIds": [
"<string>"
]
},
"id": "<string>",
"type": "per_trade",
"visibility": "public",
"description": "<string>"
}
'import requests
url = "https://api.hyperprop.com/platform/v1/cards"
payload = {
"accountId": "<string>",
"tradeRef": {
"entryOrderId": "<string>",
"exitOrderId": "<string>",
"entryOrderIds": ["<string>"],
"exitOrderIds": ["<string>"]
},
"id": "<string>",
"type": "per_trade",
"visibility": "public",
"description": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
accountId: '<string>',
tradeRef: {
entryOrderId: '<string>',
exitOrderId: '<string>',
entryOrderIds: ['<string>'],
exitOrderIds: ['<string>']
},
id: '<string>',
type: 'per_trade',
visibility: 'public',
description: '<string>'
})
};
fetch('https://api.hyperprop.com/platform/v1/cards', 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/cards",
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([
'accountId' => '<string>',
'tradeRef' => [
'entryOrderId' => '<string>',
'exitOrderId' => '<string>',
'entryOrderIds' => [
'<string>'
],
'exitOrderIds' => [
'<string>'
]
],
'id' => '<string>',
'type' => 'per_trade',
'visibility' => 'public',
'description' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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/cards"
payload := strings.NewReader("{\n \"accountId\": \"<string>\",\n \"tradeRef\": {\n \"entryOrderId\": \"<string>\",\n \"exitOrderId\": \"<string>\",\n \"entryOrderIds\": [\n \"<string>\"\n ],\n \"exitOrderIds\": [\n \"<string>\"\n ]\n },\n \"id\": \"<string>\",\n \"type\": \"per_trade\",\n \"visibility\": \"public\",\n \"description\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/cards")
.header("Content-Type", "application/json")
.body("{\n \"accountId\": \"<string>\",\n \"tradeRef\": {\n \"entryOrderId\": \"<string>\",\n \"exitOrderId\": \"<string>\",\n \"entryOrderIds\": [\n \"<string>\"\n ],\n \"exitOrderIds\": [\n \"<string>\"\n ]\n },\n \"id\": \"<string>\",\n \"type\": \"per_trade\",\n \"visibility\": \"public\",\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/platform/v1/cards")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"accountId\": \"<string>\",\n \"tradeRef\": {\n \"entryOrderId\": \"<string>\",\n \"exitOrderId\": \"<string>\",\n \"entryOrderIds\": [\n \"<string>\"\n ],\n \"exitOrderIds\": [\n \"<string>\"\n ]\n },\n \"id\": \"<string>\",\n \"type\": \"per_trade\",\n \"visibility\": \"public\",\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "PnL card already exists",
"data": {
"card": {
"id": "<string>",
"userId": "<string>",
"accountId": "<string>",
"tradeRef": {
"entryOrderId": "<string>",
"exitOrderId": "<string>",
"entryOrderIds": [
"<string>"
],
"exitOrderIds": [
"<string>"
]
},
"periodRef": {},
"snapshot": {
"symbol": "ES",
"contract": "ESM6",
"contractName": "E-mini S&P 500",
"side": "long",
"quantity": 2,
"entryPrice": 5210.25,
"exitPrice": 5215.75,
"openedAt": "2026-05-22T13:01:14.000Z",
"closedAt": "2026-05-22T13:42:09.000Z",
"pnlGross": 550,
"fees": 6,
"pnlNet": 544,
"pricePerPoint": 50,
"feePerSide": 1.5,
"currency": "USD",
"accountLabel": null
},
"description": "First trade with my new setup",
"revokedAt": "<string>",
"revokedReason": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
},
"created": false
}
}{
"success": true,
"message": "PnL card created",
"data": {
"card": {
"id": "<string>",
"userId": "<string>",
"accountId": "<string>",
"tradeRef": {
"entryOrderId": "<string>",
"exitOrderId": "<string>",
"entryOrderIds": [
"<string>"
],
"exitOrderIds": [
"<string>"
]
},
"periodRef": {},
"snapshot": {
"symbol": "ES",
"contract": "ESM6",
"contractName": "E-mini S&P 500",
"side": "long",
"quantity": 2,
"entryPrice": 5210.25,
"exitPrice": 5215.75,
"openedAt": "2026-05-22T13:01:14.000Z",
"closedAt": "2026-05-22T13:42:09.000Z",
"pnlGross": 550,
"fees": 6,
"pnlNet": 544,
"pricePerPoint": 50,
"feePerSide": 1.5,
"currency": "USD",
"accountLabel": null
},
"description": "First trade with my new setup",
"revokedAt": "<string>",
"revokedReason": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
},
"created": true
}
}{
"success": false,
"statusCode": 400,
"error": "Bad Request",
"message": "Invalid request data",
"code": "BAD_REQUEST"
}{
"success": false,
"statusCode": 401,
"error": "Unauthorized",
"message": "Authentication required",
"code": "UNAUTHORIZED"
}{
"success": false,
"statusCode": 404,
"error": "Not Found",
"message": "Resource not found",
"code": "NOT_FOUND"
}{
"statusCode": 429,
"error": "Too Many Requests",
"message": "<string>",
"code": "RATE_LIMITED"
}{
"success": false,
"statusCode": 500,
"error": "Internal Server Error",
"message": "An unexpected error occurred",
"code": "INTERNAL_ERROR"
}Body
Trading account the trade was executed on
IDs of every filled order that made up the round-trip trade
Show child attributes
Show child attributes
Optional caller-suggested card id (UUID v4). Lets the client pre-allocate an id so a QR baked into the card preview will resolve once saved. Ignored if the same trade is already saved or the id collides.
Card type. Only 'per_trade' is supported today.
per_trade Who can view the card. 'public' surfaces it on the user's public profile.
public, unlisted, private Optional free-form caption (max 500 chars). Empty string is stored as null.
500Related topics
Public verification payload for a PnL cardList the authenticated user's PnL cardsRevoke (soft delete) a PnL cardGet one of the authenticated user’s PnL cardsUpdate a PnL card (visibility and/or description)curl --request POST \
--url https://api.hyperprop.com/platform/v1/cards \
--header 'Content-Type: application/json' \
--data '
{
"accountId": "<string>",
"tradeRef": {
"entryOrderId": "<string>",
"exitOrderId": "<string>",
"entryOrderIds": [
"<string>"
],
"exitOrderIds": [
"<string>"
]
},
"id": "<string>",
"type": "per_trade",
"visibility": "public",
"description": "<string>"
}
'import requests
url = "https://api.hyperprop.com/platform/v1/cards"
payload = {
"accountId": "<string>",
"tradeRef": {
"entryOrderId": "<string>",
"exitOrderId": "<string>",
"entryOrderIds": ["<string>"],
"exitOrderIds": ["<string>"]
},
"id": "<string>",
"type": "per_trade",
"visibility": "public",
"description": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
accountId: '<string>',
tradeRef: {
entryOrderId: '<string>',
exitOrderId: '<string>',
entryOrderIds: ['<string>'],
exitOrderIds: ['<string>']
},
id: '<string>',
type: 'per_trade',
visibility: 'public',
description: '<string>'
})
};
fetch('https://api.hyperprop.com/platform/v1/cards', 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/cards",
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([
'accountId' => '<string>',
'tradeRef' => [
'entryOrderId' => '<string>',
'exitOrderId' => '<string>',
'entryOrderIds' => [
'<string>'
],
'exitOrderIds' => [
'<string>'
]
],
'id' => '<string>',
'type' => 'per_trade',
'visibility' => 'public',
'description' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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/cards"
payload := strings.NewReader("{\n \"accountId\": \"<string>\",\n \"tradeRef\": {\n \"entryOrderId\": \"<string>\",\n \"exitOrderId\": \"<string>\",\n \"entryOrderIds\": [\n \"<string>\"\n ],\n \"exitOrderIds\": [\n \"<string>\"\n ]\n },\n \"id\": \"<string>\",\n \"type\": \"per_trade\",\n \"visibility\": \"public\",\n \"description\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/cards")
.header("Content-Type", "application/json")
.body("{\n \"accountId\": \"<string>\",\n \"tradeRef\": {\n \"entryOrderId\": \"<string>\",\n \"exitOrderId\": \"<string>\",\n \"entryOrderIds\": [\n \"<string>\"\n ],\n \"exitOrderIds\": [\n \"<string>\"\n ]\n },\n \"id\": \"<string>\",\n \"type\": \"per_trade\",\n \"visibility\": \"public\",\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/platform/v1/cards")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"accountId\": \"<string>\",\n \"tradeRef\": {\n \"entryOrderId\": \"<string>\",\n \"exitOrderId\": \"<string>\",\n \"entryOrderIds\": [\n \"<string>\"\n ],\n \"exitOrderIds\": [\n \"<string>\"\n ]\n },\n \"id\": \"<string>\",\n \"type\": \"per_trade\",\n \"visibility\": \"public\",\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "PnL card already exists",
"data": {
"card": {
"id": "<string>",
"userId": "<string>",
"accountId": "<string>",
"tradeRef": {
"entryOrderId": "<string>",
"exitOrderId": "<string>",
"entryOrderIds": [
"<string>"
],
"exitOrderIds": [
"<string>"
]
},
"periodRef": {},
"snapshot": {
"symbol": "ES",
"contract": "ESM6",
"contractName": "E-mini S&P 500",
"side": "long",
"quantity": 2,
"entryPrice": 5210.25,
"exitPrice": 5215.75,
"openedAt": "2026-05-22T13:01:14.000Z",
"closedAt": "2026-05-22T13:42:09.000Z",
"pnlGross": 550,
"fees": 6,
"pnlNet": 544,
"pricePerPoint": 50,
"feePerSide": 1.5,
"currency": "USD",
"accountLabel": null
},
"description": "First trade with my new setup",
"revokedAt": "<string>",
"revokedReason": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
},
"created": false
}
}{
"success": true,
"message": "PnL card created",
"data": {
"card": {
"id": "<string>",
"userId": "<string>",
"accountId": "<string>",
"tradeRef": {
"entryOrderId": "<string>",
"exitOrderId": "<string>",
"entryOrderIds": [
"<string>"
],
"exitOrderIds": [
"<string>"
]
},
"periodRef": {},
"snapshot": {
"symbol": "ES",
"contract": "ESM6",
"contractName": "E-mini S&P 500",
"side": "long",
"quantity": 2,
"entryPrice": 5210.25,
"exitPrice": 5215.75,
"openedAt": "2026-05-22T13:01:14.000Z",
"closedAt": "2026-05-22T13:42:09.000Z",
"pnlGross": 550,
"fees": 6,
"pnlNet": 544,
"pricePerPoint": 50,
"feePerSide": 1.5,
"currency": "USD",
"accountLabel": null
},
"description": "First trade with my new setup",
"revokedAt": "<string>",
"revokedReason": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
},
"created": true
}
}{
"success": false,
"statusCode": 400,
"error": "Bad Request",
"message": "Invalid request data",
"code": "BAD_REQUEST"
}{
"success": false,
"statusCode": 401,
"error": "Unauthorized",
"message": "Authentication required",
"code": "UNAUTHORIZED"
}{
"success": false,
"statusCode": 404,
"error": "Not Found",
"message": "Resource not found",
"code": "NOT_FOUND"
}{
"statusCode": 429,
"error": "Too Many Requests",
"message": "<string>",
"code": "RATE_LIMITED"
}{
"success": false,
"statusCode": 500,
"error": "Internal Server Error",
"message": "An unexpected error occurred",
"code": "INTERNAL_ERROR"
}