Order Books
Get Order Book
Retrieve the full configuration of one commodity order book
GET
/
orderbooks
/
commodities
/
api
/
order-books
/
{orderBookId}
curl "https://api.trusset.org/orderbooks/commodities/api/order-books/clx_ob_comm_001" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/commodities/api/order-books/${orderBookId}`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
console.log(data.symbol, data.cfid ?? 'unpooled');
{
"success": true,
"data": {
"id": "clx_ob_comm_001",
"instanceId": "inst_abc123",
"tokenAddress": "0xd8f3ba9de5b7b83f66d1a7b1ad96c1a64b811ff9",
"quoteTokenAddress": "0x98ad0ca091552e23c564b41c74282e5343d03e8a",
"name": "Allocated Gold 999.9",
"symbol": "XAUA",
"status": "ACTIVE",
"tokenType": "LIGHT_TOKEN",
"settlementMode": "ON_CHAIN",
"custodyContract": "0xf3dac9cf19da1c95a80de890e200bc86e0c6f2da",
"cfid": "0x6b1f0d2c8a3e57941b6d0af25c8e3714b90d6f2a41c5e807396ba2d5f10c84e7",
"minOrderSize": "1000000",
"maxOrderSize": null,
"tickSize": "10000",
"makerFeeBps": 2,
"takerFeeBps": 8,
"mmMakerRebateBps": null,
"allowImport": true,
"allowSharedLiquidity": true,
"tradingMode": "CONTINUOUS",
"underlyingIdentifier": null,
"baseDecimals": null,
"quoteDecimals": null,
"settlementOperator": null,
"priceRefEnabled": true,
"priceRefMode": "EXTERNAL_FEED",
"priceRefFeedUrl": "https://feeds.example.com/xau",
"priceRefFeedHeaders": null,
"priceRefFeedPath": "data.price",
"priceRefEnforcement": "1MIN",
"priceRefSpreadBps": 100,
"priceRefLastPrice": "2412.55",
"priceRefLastUpdated": "2025-06-15T11:59:30.000Z",
"priceRefHaltOnStale": true,
"priceRefStaleTolerance": 300,
"priceRefCircuitBreakerBps": 800,
"createdAt": "2025-06-01T09:00:00.000Z",
"updatedAt": "2025-06-15T11:59:30.000Z"
}
}
Returns the stored record for a single book: its pair, status, sizing rules, fees, fungibility class, and price reference configuration.
Books you own and books you have imported both resolve. A book that is neither, or whose token type is not a commodity token, returns
ORDER_BOOK_NOT_FOUND rather than disclosing that it exists.
Path Parameters
string
required
Order book ID.
Response Fields
object
Show child attributes
Show child attributes
string
Order book ID.
string
Owning instance. Differs from yours on an imported book.
string
Commodity token.
string
Settlement token (stablecoin).
string
Display name.
string
Display symbol.
string
ACTIVE, PAUSED or CLOSED.string
LIGHT_TOKEN.string
ON_CHAIN.string
Custody contract the book settles through.
string
Fungibility class the book pools on, or
null.string
Minimum quantity in order book units.
string
Maximum quantity, or
null.string
Price increment in order book units.
integer
Maker fee in basis points.
integer
Taker fee in basis points.
integer
Market maker fee override, or
null. Not settable on this surface.boolean
Whether other instances may import the book.
boolean
Whether the book pools depth with its class.
string
CONTINUOUS.string
null on this venue.integer
null on this venue.integer
null on this venue.string
null on this venue.boolean
Whether the band is enforced.
string
MANUAL, STOCK_FEED or EXTERNAL_FEED.string
External feed endpoint, or
null.string
Feed headers as a JSON string, or
null.string
JSON path, or the ticker in
STOCK_FEED mode.string
Refresh interval.
integer
Band half-width in basis points, or
null.string
Last recorded reference price, as a plain decimal.
string
ISO 8601 timestamp, or
null.boolean
Whether a stale reference stops trading.
integer
Staleness window in seconds, or
null.integer
Move that pauses the book, or
null.string
ISO 8601 timestamp.
string
ISO 8601 timestamp.
curl "https://api.trusset.org/orderbooks/commodities/api/order-books/clx_ob_comm_001" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/commodities/api/order-books/${orderBookId}`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
console.log(data.symbol, data.cfid ?? 'unpooled');
{
"success": true,
"data": {
"id": "clx_ob_comm_001",
"instanceId": "inst_abc123",
"tokenAddress": "0xd8f3ba9de5b7b83f66d1a7b1ad96c1a64b811ff9",
"quoteTokenAddress": "0x98ad0ca091552e23c564b41c74282e5343d03e8a",
"name": "Allocated Gold 999.9",
"symbol": "XAUA",
"status": "ACTIVE",
"tokenType": "LIGHT_TOKEN",
"settlementMode": "ON_CHAIN",
"custodyContract": "0xf3dac9cf19da1c95a80de890e200bc86e0c6f2da",
"cfid": "0x6b1f0d2c8a3e57941b6d0af25c8e3714b90d6f2a41c5e807396ba2d5f10c84e7",
"minOrderSize": "1000000",
"maxOrderSize": null,
"tickSize": "10000",
"makerFeeBps": 2,
"takerFeeBps": 8,
"mmMakerRebateBps": null,
"allowImport": true,
"allowSharedLiquidity": true,
"tradingMode": "CONTINUOUS",
"underlyingIdentifier": null,
"baseDecimals": null,
"quoteDecimals": null,
"settlementOperator": null,
"priceRefEnabled": true,
"priceRefMode": "EXTERNAL_FEED",
"priceRefFeedUrl": "https://feeds.example.com/xau",
"priceRefFeedHeaders": null,
"priceRefFeedPath": "data.price",
"priceRefEnforcement": "1MIN",
"priceRefSpreadBps": 100,
"priceRefLastPrice": "2412.55",
"priceRefLastUpdated": "2025-06-15T11:59:30.000Z",
"priceRefHaltOnStale": true,
"priceRefStaleTolerance": 300,
"priceRefCircuitBreakerBps": 800,
"createdAt": "2025-06-01T09:00:00.000Z",
"updatedAt": "2025-06-15T11:59:30.000Z"
}
}
Error Codes
| Code | HTTP | Cause |
|---|---|---|
ORDER_BOOK_NOT_FOUND | 404 | No such commodity 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/commodities/api/order-books/clx_ob_comm_001" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/commodities/api/order-books/${orderBookId}`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
console.log(data.symbol, data.cfid ?? 'unpooled');
{
"success": true,
"data": {
"id": "clx_ob_comm_001",
"instanceId": "inst_abc123",
"tokenAddress": "0xd8f3ba9de5b7b83f66d1a7b1ad96c1a64b811ff9",
"quoteTokenAddress": "0x98ad0ca091552e23c564b41c74282e5343d03e8a",
"name": "Allocated Gold 999.9",
"symbol": "XAUA",
"status": "ACTIVE",
"tokenType": "LIGHT_TOKEN",
"settlementMode": "ON_CHAIN",
"custodyContract": "0xf3dac9cf19da1c95a80de890e200bc86e0c6f2da",
"cfid": "0x6b1f0d2c8a3e57941b6d0af25c8e3714b90d6f2a41c5e807396ba2d5f10c84e7",
"minOrderSize": "1000000",
"maxOrderSize": null,
"tickSize": "10000",
"makerFeeBps": 2,
"takerFeeBps": 8,
"mmMakerRebateBps": null,
"allowImport": true,
"allowSharedLiquidity": true,
"tradingMode": "CONTINUOUS",
"underlyingIdentifier": null,
"baseDecimals": null,
"quoteDecimals": null,
"settlementOperator": null,
"priceRefEnabled": true,
"priceRefMode": "EXTERNAL_FEED",
"priceRefFeedUrl": "https://feeds.example.com/xau",
"priceRefFeedHeaders": null,
"priceRefFeedPath": "data.price",
"priceRefEnforcement": "1MIN",
"priceRefSpreadBps": 100,
"priceRefLastPrice": "2412.55",
"priceRefLastUpdated": "2025-06-15T11:59:30.000Z",
"priceRefHaltOnStale": true,
"priceRefStaleTolerance": 300,
"priceRefCircuitBreakerBps": 800,
"createdAt": "2025-06-01T09:00:00.000Z",
"updatedAt": "2025-06-15T11:59:30.000Z"
}
}
