Market Data
Get Settlement
Read the settlement record grouping one or more fills
GET
/
orderbooks
/
stocks
/
api
/
settlements
/
{settlementId}
curl "https://api.trusset.org/orderbooks/stocks/api/settlements/clx_settle_51" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/stocks/api/settlements/${settlementId}`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
console.log(data.status, data.txHash);
{
"success": true,
"data": {
"id": "clx_settle_51",
"settlementId": "8c2b0a51-3f7e-4d19-9a02-1b6c74e5d830",
"instanceId": "inst_abc123",
"status": "CONFIRMED",
"txHash": "0x9f2c41d8b7e05a3164c2870fbd935e1a4c7802db6135ea9048f7c21b5d3ea41b",
"blockNumber": 6412887,
"gasUsed": "184213",
"error": null,
"settledAt": "2025-06-15T12:02:41.000Z",
"createdAt": "2025-06-15T12:02:00.000Z",
"updatedAt": "2025-06-15T12:02:41.000Z",
"trades": [
{
"tradeId": "1c9e0f22-2b74-4a51-9f8e-73c1a0d4b6e5",
"price": "182350000",
"quantity": "1000000",
"settlementStatus": "CONFIRMED",
"settlementError": null
}
]
}
}
{
"success": false,
"data": null,
"error": {
"code": "SETTLEMENT_NOT_FOUND",
"message": "Settlement not found"
}
}
Returns a settlement and the trades it covers. A settlement groups the fills produced by a single match into one on-chain transfer, so several trades commonly share one record.
Only settlements belonging to your instance resolve. Both the public
settlementId and the internal row ID are accepted.
Path Parameters
Response Fields
Show child attributes
Show child attributes
The trades covered, each carrying its own
settlementStatus and settlementError. See Get Order Book Trades.A settlement can be
FAILED while individual trades read CONFIRMED, or the reverse, when a batch was partly retried. The per-trade status is the one to act on.curl "https://api.trusset.org/orderbooks/stocks/api/settlements/clx_settle_51" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/stocks/api/settlements/${settlementId}`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
console.log(data.status, data.txHash);
{
"success": true,
"data": {
"id": "clx_settle_51",
"settlementId": "8c2b0a51-3f7e-4d19-9a02-1b6c74e5d830",
"instanceId": "inst_abc123",
"status": "CONFIRMED",
"txHash": "0x9f2c41d8b7e05a3164c2870fbd935e1a4c7802db6135ea9048f7c21b5d3ea41b",
"blockNumber": 6412887,
"gasUsed": "184213",
"error": null,
"settledAt": "2025-06-15T12:02:41.000Z",
"createdAt": "2025-06-15T12:02:00.000Z",
"updatedAt": "2025-06-15T12:02:41.000Z",
"trades": [
{
"tradeId": "1c9e0f22-2b74-4a51-9f8e-73c1a0d4b6e5",
"price": "182350000",
"quantity": "1000000",
"settlementStatus": "CONFIRMED",
"settlementError": null
}
]
}
}
{
"success": false,
"data": null,
"error": {
"code": "SETTLEMENT_NOT_FOUND",
"message": "Settlement not found"
}
}
Error Codes
| Code | HTTP | Cause |
|---|---|---|
SETTLEMENT_NOT_FOUND | 404 | No settlement with that ID on your instance |
SERVICE_NOT_ENABLED | 403 | The Trading service is not enabled on this instance |
⌘I
curl "https://api.trusset.org/orderbooks/stocks/api/settlements/clx_settle_51" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/stocks/api/settlements/${settlementId}`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
console.log(data.status, data.txHash);
{
"success": true,
"data": {
"id": "clx_settle_51",
"settlementId": "8c2b0a51-3f7e-4d19-9a02-1b6c74e5d830",
"instanceId": "inst_abc123",
"status": "CONFIRMED",
"txHash": "0x9f2c41d8b7e05a3164c2870fbd935e1a4c7802db6135ea9048f7c21b5d3ea41b",
"blockNumber": 6412887,
"gasUsed": "184213",
"error": null,
"settledAt": "2025-06-15T12:02:41.000Z",
"createdAt": "2025-06-15T12:02:00.000Z",
"updatedAt": "2025-06-15T12:02:41.000Z",
"trades": [
{
"tradeId": "1c9e0f22-2b74-4a51-9f8e-73c1a0d4b6e5",
"price": "182350000",
"quantity": "1000000",
"settlementStatus": "CONFIRMED",
"settlementError": null
}
]
}
}
{
"success": false,
"data": null,
"error": {
"code": "SETTLEMENT_NOT_FOUND",
"message": "Settlement not found"
}
}
