Off-Chain Settlement
Get Off-Chain Snapshot
Read depth, last price and 24-hour statistics for an off-chain book
GET
/
orderbooks
/
stocks
/
api
/
offchain
/
order-books
/
{orderBookId}
/
snapshot
curl "https://api.trusset.org/orderbooks/stocks/api/offchain/order-books/clx_ob_stock_001/snapshot?levels=10" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/stocks/api/offchain/order-books/${orderBookId}/snapshot?levels=10`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
console.log(data.depth.bids[0]?.price, data.depth.asks[0]?.price);
{
"success": true,
"data": {
"orderBook": {
"id": "clx_ob_stock_001",
"symbol": "NYF1",
"status": "ACTIVE",
"tokenType": "STOCK_TOKEN",
"settlementMode": "OFF_CHAIN",
"custodyContract": null,
"makerFeeBps": 5,
"takerFeeBps": 15,
"minOrderSize": "1000000",
"maxOrderSize": null,
"tickSize": "10000"
},
"depth": {
"bids": [{ "price": "182350000", "quantity": "4000000", "orderCount": 2 }],
"asks": [{ "price": "182600000", "quantity": "2500000", "orderCount": 1 }]
},
"lastPrice": "182350000",
"priceReference": null,
"stats24h": { "volume": "31000000", "trades": 12, "high": "183100000", "low": "181200000" },
"timestamp": "2025-06-15T12:00:00.000Z"
}
}
Returns the same snapshot as Get Order Book Snapshot, served from the off-chain surface so a customer-facing integration does not need the Trading service entitlement.
Because an off-chain book holds no balance locks, its depth is not filtered on lock state: every
OPEN or PARTIALLY_FILLED order that has not expired is counted.
This route does not assert the settlement mode, so it answers for on-chain books too. It also does not filter by token type.
Path Parameters
string
required
Order book ID.
Query Parameters
integer
default:"20"
Price levels per side, capped at 100.
Response Fields
Same shape as Get Order Book Snapshot:orderBook, depth, lastPrice, priceReference, stats24h and timestamp.
curl "https://api.trusset.org/orderbooks/stocks/api/offchain/order-books/clx_ob_stock_001/snapshot?levels=10" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/stocks/api/offchain/order-books/${orderBookId}/snapshot?levels=10`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
console.log(data.depth.bids[0]?.price, data.depth.asks[0]?.price);
{
"success": true,
"data": {
"orderBook": {
"id": "clx_ob_stock_001",
"symbol": "NYF1",
"status": "ACTIVE",
"tokenType": "STOCK_TOKEN",
"settlementMode": "OFF_CHAIN",
"custodyContract": null,
"makerFeeBps": 5,
"takerFeeBps": 15,
"minOrderSize": "1000000",
"maxOrderSize": null,
"tickSize": "10000"
},
"depth": {
"bids": [{ "price": "182350000", "quantity": "4000000", "orderCount": 2 }],
"asks": [{ "price": "182600000", "quantity": "2500000", "orderCount": 1 }]
},
"lastPrice": "182350000",
"priceReference": null,
"stats24h": { "volume": "31000000", "trades": 12, "high": "183100000", "low": "181200000" },
"timestamp": "2025-06-15T12:00:00.000Z"
}
}
Error Codes
| Code | HTTP | Cause |
|---|---|---|
ORDER_BOOK_NOT_FOUND | 404 | No such book on this instance, and not imported |
⌘I
curl "https://api.trusset.org/orderbooks/stocks/api/offchain/order-books/clx_ob_stock_001/snapshot?levels=10" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/stocks/api/offchain/order-books/${orderBookId}/snapshot?levels=10`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
console.log(data.depth.bids[0]?.price, data.depth.asks[0]?.price);
{
"success": true,
"data": {
"orderBook": {
"id": "clx_ob_stock_001",
"symbol": "NYF1",
"status": "ACTIVE",
"tokenType": "STOCK_TOKEN",
"settlementMode": "OFF_CHAIN",
"custodyContract": null,
"makerFeeBps": 5,
"takerFeeBps": 15,
"minOrderSize": "1000000",
"maxOrderSize": null,
"tickSize": "10000"
},
"depth": {
"bids": [{ "price": "182350000", "quantity": "4000000", "orderCount": 2 }],
"asks": [{ "price": "182600000", "quantity": "2500000", "orderCount": 1 }]
},
"lastPrice": "182350000",
"priceReference": null,
"stats24h": { "volume": "31000000", "trades": 12, "high": "183100000", "low": "181200000" },
"timestamp": "2025-06-15T12:00:00.000Z"
}
}
