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
Query Parameters
Response Fields
Show child attributes
Show child attributes
Trade records, each with its
orderBook in the shape of Get Order Book. makerAddress and takerAddress carry offchain:<customerRef>. See Get Order Book Trades for the field list.Read
makerAddress and takerAddress to tell which side the customer was on. The venue records makerFee for the maker and takerFee for the taker, for its own invoicing. Neither is deducted from the custody ledger.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 |
SERVICE_NOT_ENABLED | 403 | The Trading service is not enabled on this instance |
⌘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
}
}
