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
string
required
Order book ID.
Response Fields
object
Show child attributes
Show child attributes
boolean
Whether the band is enforced.
string
MANUAL, STOCK_FEED or EXTERNAL_FEED.string
Refresh interval.
integer
Band half-width in basis points, or
null.boolean
Whether a stale reference stops trading.
integer
Staleness window in seconds, or
null.string
Live reference price as a plain decimal, or
null.string
Lowest accepted price, or
null.string
Highest accepted price, or
null.string
ISO 8601 timestamp, or
null.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 |
⌘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"
}
}
