Get a completed trade
curl --request GET \
--url https://api.hypedexer.com/completed-trades/{trade_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.hypedexer.com/completed-trades/{trade_id}"
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.hypedexer.com/completed-trades/{trade_id}', 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.hypedexer.com/completed-trades/{trade_id}",
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.hypedexer.com/completed-trades/{trade_id}"
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.hypedexer.com/completed-trades/{trade_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hypedexer.com/completed-trades/{trade_id}")
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,
"message": "Completed trade trade_BTC_20a96155",
"data": {
"user": "0x50bba1ebee0056af4a6fae7032f227f292739384",
"coin": "BTC",
"direction": "long",
"start_time": "2026-10-31T10:42:39.460000",
"end_time": "2026-10-31T12:26:33.708000",
"duration_s": 6234,
"entry_price": 77462,
"exit_price": 77560,
"size_close": 0.00136,
"pnl_realized": 0.13328,
"leverage_type": "cross",
"position_value": 105.34832,
"total_fills": 2,
"total_fees": 0.200286,
"avg_fill_price": 77511,
"first_fill_time": "2026-10-31T10:42:39.460000",
"last_fill_time": "2026-10-31T12:26:33.708000",
"total_volume": 210.82992,
"trade_id": "trade_BTC_20a96155",
"close_hash": "0x11c532a2eda5ce33133e0447c312a3020153008888a8ed05b58dddf5aca9a81d",
"created_at": "2026-10-31T12:27:46.518000"
},
"total_count": null,
"execution_time_ms": null,
"next_cursor": null,
"has_more": null
}{
"detail": "Completed trade 'trade_BTC_00000000' not found"
}Completed Trades
Get a completed trade
One completed trade by its trade_id (as returned by GET /completed-trades/), with the same fields as a row of that list. Set include_fills=true to embed the trade’s fills in data.fills, in the same shape as GET /completed-trades/{trade_id}/fills. An unknown trade_id returns 404.
GET
/
completed-trades
/
{trade_id}
Get a completed trade
curl --request GET \
--url https://api.hypedexer.com/completed-trades/{trade_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.hypedexer.com/completed-trades/{trade_id}"
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.hypedexer.com/completed-trades/{trade_id}', 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.hypedexer.com/completed-trades/{trade_id}",
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.hypedexer.com/completed-trades/{trade_id}"
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.hypedexer.com/completed-trades/{trade_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hypedexer.com/completed-trades/{trade_id}")
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,
"message": "Completed trade trade_BTC_20a96155",
"data": {
"user": "0x50bba1ebee0056af4a6fae7032f227f292739384",
"coin": "BTC",
"direction": "long",
"start_time": "2026-10-31T10:42:39.460000",
"end_time": "2026-10-31T12:26:33.708000",
"duration_s": 6234,
"entry_price": 77462,
"exit_price": 77560,
"size_close": 0.00136,
"pnl_realized": 0.13328,
"leverage_type": "cross",
"position_value": 105.34832,
"total_fills": 2,
"total_fees": 0.200286,
"avg_fill_price": 77511,
"first_fill_time": "2026-10-31T10:42:39.460000",
"last_fill_time": "2026-10-31T12:26:33.708000",
"total_volume": 210.82992,
"trade_id": "trade_BTC_20a96155",
"close_hash": "0x11c532a2eda5ce33133e0447c312a3020153008888a8ed05b58dddf5aca9a81d",
"created_at": "2026-10-31T12:27:46.518000"
},
"total_count": null,
"execution_time_ms": null,
"next_cursor": null,
"has_more": null
}{
"detail": "Completed trade 'trade_BTC_00000000' not found"
}Authorizations
Your Hypedexer API key. Create one in the console at https://app.hypedexer.com. Authorization: Bearer <key> and the api_key query parameter are accepted as well.
Headers
Path Parameters
Completed trade id, e.g. trade_BTC_20a96155
Query Parameters
Embed the trade's fills in data.fills