Off-Chain Settlement
Get Customer Trades
List one customer’s off-chain fills
GET
/
orderbooks
/
stocks
/
api
/
offchain
/
customers
/
{customerRef}
/
trades
curl "https://api.trusset.org/orderbooks/stocks/api/offchain/customers/cust_1042/trades?limit=50" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/stocks/api/offchain/customers/${customerRef}/trades?limit=50`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
const ref = `offchain:${customerRef}`;
for (const t of data.trades) {
const fee = t.makerAddress === ref ? t.makerFee : t.takerFee;
console.log(t.price, t.quantity, fee);
}
{
"success": true,
"data": {
"trades": [
{
"tradeId": "1c9e0f22-2b74-4a51-9f8e-73c1a0d4b6e5",
"orderBookId": "clx_ob_stock_001",
"origin": "CLOB",
"makerAddress": "offchain:cust_2288",
"takerAddress": "offchain:cust_1042",
"price": "182350000",
"quantity": "1000000",
"makerFee": "500",
"takerFee": "1500",
"side": "BUY",
"settlementStatus": "CONFIRMED",
"createdAt": "2025-06-15T12:02:00.000Z",
"orderBook": { "id": "clx_ob_stock_001", "symbol": "NYF1" }
}
],
"total": 1,
"limit": 50,
"offset": 0
}
}
Returns trades where the customer reference was maker or taker, newest first, each carrying its order book. This is the read behind a customer-facing trade history or a statement.
The scope is your instance and that reference across every book, so a customer trading several instruments gets one combined history.
Path Parameters
string
required
Your reference for the customer, up to 256 characters. Matched exactly.
Query Parameters
integer
default:"50"
Page size, capped at 100.
integer
default:"0"
Rows to skip.
Response Fields
object
Show child attributes
Show child attributes
array
Trade records, each with its
orderBook. makerAddress and takerAddress carry offchain:<customerRef>. See Get Order Book Trades for the field list.integer
Total matching trades.
integer
Page size applied.
integer
Offset applied.
Read
makerAddress and takerAddress to tell which side the customer was on, and therefore whether the fee on the row is theirs. The maker pays makerFee; the taker pays takerFee.curl "https://api.trusset.org/orderbooks/stocks/api/offchain/customers/cust_1042/trades?limit=50" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/stocks/api/offchain/customers/${customerRef}/trades?limit=50`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
const ref = `offchain:${customerRef}`;
for (const t of data.trades) {
const fee = t.makerAddress === ref ? t.makerFee : t.takerFee;
console.log(t.price, t.quantity, fee);
}
{
"success": true,
"data": {
"trades": [
{
"tradeId": "1c9e0f22-2b74-4a51-9f8e-73c1a0d4b6e5",
"orderBookId": "clx_ob_stock_001",
"origin": "CLOB",
"makerAddress": "offchain:cust_2288",
"takerAddress": "offchain:cust_1042",
"price": "182350000",
"quantity": "1000000",
"makerFee": "500",
"takerFee": "1500",
"side": "BUY",
"settlementStatus": "CONFIRMED",
"createdAt": "2025-06-15T12:02:00.000Z",
"orderBook": { "id": "clx_ob_stock_001", "symbol": "NYF1" }
}
],
"total": 1,
"limit": 50,
"offset": 0
}
}
Error Codes
| Code | HTTP | Cause |
|---|---|---|
INVALID_PARAM | 400 | customerRef is missing or longer than 256 characters |
⌘I
curl "https://api.trusset.org/orderbooks/stocks/api/offchain/customers/cust_1042/trades?limit=50" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/stocks/api/offchain/customers/${customerRef}/trades?limit=50`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
const ref = `offchain:${customerRef}`;
for (const t of data.trades) {
const fee = t.makerAddress === ref ? t.makerFee : t.takerFee;
console.log(t.price, t.quantity, fee);
}
{
"success": true,
"data": {
"trades": [
{
"tradeId": "1c9e0f22-2b74-4a51-9f8e-73c1a0d4b6e5",
"orderBookId": "clx_ob_stock_001",
"origin": "CLOB",
"makerAddress": "offchain:cust_2288",
"takerAddress": "offchain:cust_1042",
"price": "182350000",
"quantity": "1000000",
"makerFee": "500",
"takerFee": "1500",
"side": "BUY",
"settlementStatus": "CONFIRMED",
"createdAt": "2025-06-15T12:02:00.000Z",
"orderBook": { "id": "clx_ob_stock_001", "symbol": "NYF1" }
}
],
"total": 1,
"limit": 50,
"offset": 0
}
}
