Market Data
Get Daily Stats
Daily OHLC and volume history for every book on one commodity token
GET
/
orderbooks
/
commodities
/
api
/
order-books
/
by-token
/
{tokenAddress}
/
daily-stats
curl "https://api.trusset.org/orderbooks/commodities/api/order-books/by-token/0xd8f3ba9de5b7b83f66d1a7b1ad96c1a64b811ff9/daily-stats?range=1M" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/commodities/api/order-books/by-token/${tokenAddress}/daily-stats?range=1M`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
{
"success": true,
"data": {
"hasOrderbook": true,
"orderbooks": [
{
"id": "clx_ob_comm_001",
"name": "Allocated Gold 999.9",
"symbol": "XAUA",
"settlementMode": "ON_CHAIN",
"status": "ACTIVE",
"tokenType": "LIGHT_TOKEN",
"quoteTokenAddress": "0x98ad0ca091552e23c564b41c74282e5343d03e8a"
}
],
"stats": [
{
"date": "2025-06-14",
"orderCount": 6,
"tradeCount": 3,
"volumeBase": 6,
"volumeQuote": 14463.3,
"priceHigh": 2418,
"priceLow": 2405,
"priceOpen": 2405,
"priceClose": 2412.55
}
],
"range": "1M",
"truncated": false,
"totals": {
"orderCount": 173,
"tradeCount": 86,
"volumeBase": 391,
"volumeQuote": 942000.5
}
}
}
Returns a day-by-day series for a commodity token rather than a single book. Every non-closed commodity book your instance holds on that token contributes, and any pooled peers of those books contribute too, so the series describes the instrument as your venue sees it.
The response always carries one entry per calendar day in the range, in UTC, including days with no activity, so the series is directly plottable.
Path Parameters
Query Parameters
Response Fields
Show child attributes
Show child attributes
False when your instance holds no non-closed commodity book on this token.
orderbooks and stats are then empty and totals are zero.The books that contributed, oldest first, each with
id, name, symbol, settlementMode, status, tokenType and quoteTokenAddress.One entry per day, oldest first.
Show child attributes
Show child attributes
True when the underlying scan hit its 50,000-row ceiling, meaning the series understates a very busy instrument.
Prices and volumes here are decimal numbers, not order book unit strings. Everywhere else on this surface amounts are integer strings; this endpoint is the display series and is scaled for charting.
curl "https://api.trusset.org/orderbooks/commodities/api/order-books/by-token/0xd8f3ba9de5b7b83f66d1a7b1ad96c1a64b811ff9/daily-stats?range=1M" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/commodities/api/order-books/by-token/${tokenAddress}/daily-stats?range=1M`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
{
"success": true,
"data": {
"hasOrderbook": true,
"orderbooks": [
{
"id": "clx_ob_comm_001",
"name": "Allocated Gold 999.9",
"symbol": "XAUA",
"settlementMode": "ON_CHAIN",
"status": "ACTIVE",
"tokenType": "LIGHT_TOKEN",
"quoteTokenAddress": "0x98ad0ca091552e23c564b41c74282e5343d03e8a"
}
],
"stats": [
{
"date": "2025-06-14",
"orderCount": 6,
"tradeCount": 3,
"volumeBase": 6,
"volumeQuote": 14463.3,
"priceHigh": 2418,
"priceLow": 2405,
"priceOpen": 2405,
"priceClose": 2412.55
}
],
"range": "1M",
"truncated": false,
"totals": {
"orderCount": 173,
"tradeCount": 86,
"volumeBase": 391,
"volumeQuote": 942000.5
}
}
}
Error Codes
| Code | HTTP | Cause |
|---|---|---|
INVALID_PARAM | 400 | range is not one of the five accepted values |
VALIDATION_ERROR | 400 | tokenAddress is not a valid address |
INSTANCE_REQUIRED | 400 | The request carried no resolvable instance |
SERVICE_NOT_ENABLED | 403 | The Trading service is not enabled on this instance |
⌘I
curl "https://api.trusset.org/orderbooks/commodities/api/order-books/by-token/0xd8f3ba9de5b7b83f66d1a7b1ad96c1a64b811ff9/daily-stats?range=1M" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/commodities/api/order-books/by-token/${tokenAddress}/daily-stats?range=1M`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
{
"success": true,
"data": {
"hasOrderbook": true,
"orderbooks": [
{
"id": "clx_ob_comm_001",
"name": "Allocated Gold 999.9",
"symbol": "XAUA",
"settlementMode": "ON_CHAIN",
"status": "ACTIVE",
"tokenType": "LIGHT_TOKEN",
"quoteTokenAddress": "0x98ad0ca091552e23c564b41c74282e5343d03e8a"
}
],
"stats": [
{
"date": "2025-06-14",
"orderCount": 6,
"tradeCount": 3,
"volumeBase": 6,
"volumeQuote": 14463.3,
"priceHigh": 2418,
"priceLow": 2405,
"priceOpen": 2405,
"priceClose": 2412.55
}
],
"range": "1M",
"truncated": false,
"totals": {
"orderCount": 173,
"tradeCount": 86,
"volumeBase": 391,
"volumeQuote": 942000.5
}
}
}
