Off-Chain Settlement
Get Off-Chain Price Reference
Read the reference price and band for an off-chain book
GET
/
orderbooks
/
stocks
/
api
/
offchain
/
order-books
/
{orderBookId}
/
price-reference
curl "https://api.trusset.org/orderbooks/stocks/api/offchain/order-books/clx_ob_stock_001/price-reference" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/stocks/api/offchain/order-books/${orderBookId}/price-reference`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
{
"success": true,
"data": {
"enabled": true,
"mode": "MANUAL",
"enforcement": "EVERY_TRADE",
"spreadBps": 200,
"haltOnStale": false,
"staleTolerance": null,
"currentPrice": "182.35",
"lowerBound": "178.703",
"upperBound": "185.997",
"lastUpdated": "2025-06-15T11:58:00.000Z"
}
}
{
"success": false,
"data": null,
"error": {
"code": "WRONG_SETTLEMENT_MODE",
"message": "Use on-chain API for this order book"
}
}
Returns the reference configuration, the live price and the band it implies, in the same shape as Get Price Reference.
Unlike the equivalent on the main surface, this route asserts the settlement mode: an on-chain book is refused with
WRONG_SETTLEMENT_MODE.
A source that could not be reached reports currentPrice: null rather than failing, so a monitoring poll never errors on a blinking feed.
Path Parameters
Response Fields
Show child attributes
Show child attributes
curl "https://api.trusset.org/orderbooks/stocks/api/offchain/order-books/clx_ob_stock_001/price-reference" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/stocks/api/offchain/order-books/${orderBookId}/price-reference`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
{
"success": true,
"data": {
"enabled": true,
"mode": "MANUAL",
"enforcement": "EVERY_TRADE",
"spreadBps": 200,
"haltOnStale": false,
"staleTolerance": null,
"currentPrice": "182.35",
"lowerBound": "178.703",
"upperBound": "185.997",
"lastUpdated": "2025-06-15T11:58:00.000Z"
}
}
{
"success": false,
"data": null,
"error": {
"code": "WRONG_SETTLEMENT_MODE",
"message": "Use on-chain API for this order book"
}
}
Error Codes
| Code | HTTP | Cause |
|---|---|---|
INVALID_PARAM | 400 | orderBookId is missing or longer than 100 characters |
WRONG_SETTLEMENT_MODE | 400 | The book settles on chain |
ORDER_BOOK_NOT_FOUND | 404 | No such book on this instance, and not imported |
SERVICE_NOT_ENABLED | 403 | The Trading service is not enabled on this instance |
⌘I
curl "https://api.trusset.org/orderbooks/stocks/api/offchain/order-books/clx_ob_stock_001/price-reference" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/stocks/api/offchain/order-books/${orderBookId}/price-reference`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
{
"success": true,
"data": {
"enabled": true,
"mode": "MANUAL",
"enforcement": "EVERY_TRADE",
"spreadBps": 200,
"haltOnStale": false,
"staleTolerance": null,
"currentPrice": "182.35",
"lowerBound": "178.703",
"upperBound": "185.997",
"lastUpdated": "2025-06-15T11:58:00.000Z"
}
}
{
"success": false,
"data": null,
"error": {
"code": "WRONG_SETTLEMENT_MODE",
"message": "Use on-chain API for this order book"
}
}
