Market Data
Get Settlement
Read the settlement record grouping one or more fills
GET
/
orderbooks
/
commodities
/
api
/
settlements
/
{settlementId}
curl "https://api.trusset.org/orderbooks/commodities/api/settlements/clx_settle_92" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/commodities/api/settlements/${settlementId}`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
{
"success": true,
"data": {
"id": "clx_settle_92",
"settlementId": "e17a2c04-8b5f-4d31-9760-2ca8d3f01b95",
"instanceId": "inst_abc123",
"status": "CONFIRMED",
"txHash": "0x9f2c41d8b7e05a3164c2870fbd935e1a4c7802db6135ea9048f7c21b5d3ea41b",
"blockNumber": 6412922,
"gasUsed": "173044",
"error": null,
"settledAt": "2025-06-15T12:02:35.000Z",
"createdAt": "2025-06-15T12:02:00.000Z",
"updatedAt": "2025-06-15T12:02:35.000Z",
"trades": [
{
"tradeId": "b40e7c12-3a86-4d95-8f01-6e2c9a5d7031",
"price": "2410000000",
"quantity": "2000000",
"settlementStatus": "CONFIRMED",
"settlementError": null
}
]
}
}
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
string
required
Settlement ID.
Response Fields
object
Show child attributes
Show child attributes
string
Internal row ID.
string
Public settlement ID.
string
Owning instance.
string
PENDING, PROCESSING, CONFIRMED or FAILED.string
Settlement transaction, or
null.integer
Block the transaction landed in, or
null.string
Gas consumed, or
null.string
Why the settlement failed, or
null.string
ISO 8601 timestamp of confirmation, or
null.string
ISO 8601 timestamp.
string
ISO 8601 timestamp.
array
The trades covered, each with its own
settlementStatus and settlementError.The per-trade status is the one to act on. A settlement can be
FAILED while individual trades read CONFIRMED, or the reverse, when a batch was partly retried.curl "https://api.trusset.org/orderbooks/commodities/api/settlements/clx_settle_92" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/commodities/api/settlements/${settlementId}`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
{
"success": true,
"data": {
"id": "clx_settle_92",
"settlementId": "e17a2c04-8b5f-4d31-9760-2ca8d3f01b95",
"instanceId": "inst_abc123",
"status": "CONFIRMED",
"txHash": "0x9f2c41d8b7e05a3164c2870fbd935e1a4c7802db6135ea9048f7c21b5d3ea41b",
"blockNumber": 6412922,
"gasUsed": "173044",
"error": null,
"settledAt": "2025-06-15T12:02:35.000Z",
"createdAt": "2025-06-15T12:02:00.000Z",
"updatedAt": "2025-06-15T12:02:35.000Z",
"trades": [
{
"tradeId": "b40e7c12-3a86-4d95-8f01-6e2c9a5d7031",
"price": "2410000000",
"quantity": "2000000",
"settlementStatus": "CONFIRMED",
"settlementError": null
}
]
}
}
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/commodities/api/settlements/clx_settle_92" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/commodities/api/settlements/${settlementId}`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
{
"success": true,
"data": {
"id": "clx_settle_92",
"settlementId": "e17a2c04-8b5f-4d31-9760-2ca8d3f01b95",
"instanceId": "inst_abc123",
"status": "CONFIRMED",
"txHash": "0x9f2c41d8b7e05a3164c2870fbd935e1a4c7802db6135ea9048f7c21b5d3ea41b",
"blockNumber": 6412922,
"gasUsed": "173044",
"error": null,
"settledAt": "2025-06-15T12:02:35.000Z",
"createdAt": "2025-06-15T12:02:00.000Z",
"updatedAt": "2025-06-15T12:02:35.000Z",
"trades": [
{
"tradeId": "b40e7c12-3a86-4d95-8f01-6e2c9a5d7031",
"price": "2410000000",
"quantity": "2000000",
"settlementStatus": "CONFIRMED",
"settlementError": null
}
]
}
}
