curl --request GET \
--url https://api.mainnet.aptoslabs.com/decibel/api/v1/trade_history \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.mainnet.aptoslabs.com/decibel/api/v1/trade_history"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mainnet.aptoslabs.com/decibel/api/v1/trade_history', 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.mainnet.aptoslabs.com/decibel/api/v1/trade_history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.mainnet.aptoslabs.com/decibel/api/v1/trade_history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.mainnet.aptoslabs.com/decibel/api/v1/trade_history")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mainnet.aptoslabs.com/decibel/api/v1/trade_history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"account": "0x1234567890abcdef1234567890abcdef12345678",
"action": "buy",
"asset_type": "perp",
"client_order_id": "client_order_abc",
"counter_party_account": "0xfedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210",
"fee_amount": 123,
"is_profit": true,
"is_rebate": true,
"market": "0xmarket123456789abcdef",
"order_id": "12345",
"price": 50000.25,
"realized_funding_amount": -15.5,
"realized_pnl_amount": 123,
"size": 100.5,
"source": "OrderFill",
"trade_id": "3647276",
"transaction_unix_ms": 1634567890000,
"transaction_version": 3647276285,
"fee_asset": "<string>"
}
],
"total_count": 1
}Get user trade history
Retrieve perp trade history for a specific user with optional filtering by one perp market address, order ID, side, and timestamp range. Returns executed trades with price, size, PnL, and fee details. Supports sorting by timestamp (default: descending) and pagination. Page size is capped at 200.
curl --request GET \
--url https://api.mainnet.aptoslabs.com/decibel/api/v1/trade_history \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.mainnet.aptoslabs.com/decibel/api/v1/trade_history"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mainnet.aptoslabs.com/decibel/api/v1/trade_history', 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.mainnet.aptoslabs.com/decibel/api/v1/trade_history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.mainnet.aptoslabs.com/decibel/api/v1/trade_history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.mainnet.aptoslabs.com/decibel/api/v1/trade_history")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mainnet.aptoslabs.com/decibel/api/v1/trade_history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"account": "0x1234567890abcdef1234567890abcdef12345678",
"action": "buy",
"asset_type": "perp",
"client_order_id": "client_order_abc",
"counter_party_account": "0xfedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210",
"fee_amount": 123,
"is_profit": true,
"is_rebate": true,
"market": "0xmarket123456789abcdef",
"order_id": "12345",
"price": 50000.25,
"realized_funding_amount": -15.5,
"realized_pnl_amount": 123,
"size": 100.5,
"source": "OrderFill",
"trade_id": "3647276",
"transaction_unix_ms": 1634567890000,
"transaction_version": 3647276285,
"fee_asset": "<string>"
}
],
"total_count": 1
}Authorizations
Bearer token from Geomi. See Authentication for setup instructions.
Query Parameters
User account address (user query alias is also accepted)
Filter by specific order ID (requires market to also be provided)
Filter by market address
Filter by side
Order side filter: buy or sell. Product-independent: a buy is a bid on
both venues, whether or not it opens a perp long.
For perp orders, maps to the is_buy column; for spot orders, is_bid.
For perp trades/funding, maps to action IN ('OpenLong','CloseShort') (buy)
or action IN ('CloseLong','OpenShort') (sell); for spot trades, to
is_taker_bid resolved against whether the account is the taker or maker.
buy, sell Filter by product ("perp" | "spot"); omit to include both Discriminator carried on DTOs that can mix perp and spot rows (markets, orders, trades, bulk orders, bulk order fills, and WebSocket payloads). Also accepted as a query parameter on REST endpoints that can filter to one product.
Wire format is lowercase ("perp" / "spot") and accepted
case-insensitively on the request side via [impl_case_insensitive_deserialize].
perp, spot Page size
0 <= x <= 200Page offset
0 <= x <= 10000Sort key for history endpoints
timestamp ASC, DESC 
