Orders
Get trade execution history
Returns all executed trades (fills) for the authenticated user.
Each trade represents a single fill event with the execution price, quantity, realized P&L, fee, and the parent order reference.
realized_pnl is gross P&L (price difference only). fee is the trading cost. Net P&L = realized_pnl - fee.
Use this to build a trade blotter or calculate performance statistics.
GET
/
trade
/
trades
fetch
const response = await fetch('/trade/trades', {
headers: { 'Authorization': `Bearer ${token}` }
});
const { data: trades } = await response.json();
trades.forEach(t => {
console.log(`${t.side} ${t.quantity} ${t.contract} @ ${t.price}`);
});curl --request GET \
--url https://api.hyperprop.com/trade/tradesimport requests
url = "https://api.hyperprop.com/trade/trades"
response = requests.get(url)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hyperprop.com/trade/trades",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/trade/trades"
req, _ := http.NewRequest("GET", url, nil)
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/trade/trades")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/trade/trades")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"code": null,
"data": [
{
"account_id": "550e8400-e29b-41d4-a716-446655440001",
"commission": 2,
"contract": "ESH6",
"fee": 3,
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"order_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"price": 6045.5,
"quantity": 2,
"realized_pnl": 0,
"side": "buy",
"timestamp": "2024-01-15T10:30:00Z",
"user_id": "550e8400-e29b-41d4-a716-446655440000"
}
],
"error": null,
"success": true
}{
"code": "ERROR_CODE",
"data": null,
"error": "Error message describing what went wrong",
"success": false
}⌘I
fetch
const response = await fetch('/trade/trades', {
headers: { 'Authorization': `Bearer ${token}` }
});
const { data: trades } = await response.json();
trades.forEach(t => {
console.log(`${t.side} ${t.quantity} ${t.contract} @ ${t.price}`);
});curl --request GET \
--url https://api.hyperprop.com/trade/tradesimport requests
url = "https://api.hyperprop.com/trade/trades"
response = requests.get(url)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hyperprop.com/trade/trades",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/trade/trades"
req, _ := http.NewRequest("GET", url, nil)
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/trade/trades")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/trade/trades")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"code": null,
"data": [
{
"account_id": "550e8400-e29b-41d4-a716-446655440001",
"commission": 2,
"contract": "ESH6",
"fee": 3,
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"order_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"price": 6045.5,
"quantity": 2,
"realized_pnl": 0,
"side": "buy",
"timestamp": "2024-01-15T10:30:00Z",
"user_id": "550e8400-e29b-41d4-a716-446655440000"
}
],
"error": null,
"success": true
}{
"code": "ERROR_CODE",
"data": null,
"error": "Error message describing what went wrong",
"success": false
}