Market Data
Get Daily Stats
Daily OHLC and volume history for every book on one token
GET
/
orderbooks
/
stocks
/
api
/
order-books
/
by-token
/
{tokenAddress}
/
daily-stats
curl "https://api.trusset.org/orderbooks/stocks/api/order-books/by-token/0xabc7f1093d5e26b804a1c3f78de025916b47c0d3/daily-stats?range=3M" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/stocks/api/order-books/by-token/${tokenAddress}/daily-stats?range=3M`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
if (!data.hasOrderbook) console.log('no book on this token');
if (data.truncated) console.warn('series truncated at the scan limit');
{
"success": true,
"data": {
"hasOrderbook": true,
"orderbooks": [
{
"id": "clx_ob_stock_002",
"name": "Nyala Fund I",
"symbol": "NYF1",
"settlementMode": "OFF_CHAIN",
"status": "ACTIVE",
"tokenType": "STOCK_TOKEN",
"quoteTokenAddress": "0x98ad0ca091552e23c564b41c74282e5343d03e8a"
}
],
"stats": [
{
"date": "2025-06-13",
"orderCount": 0,
"tradeCount": 0,
"volumeBase": 0,
"volumeQuote": 0,
"priceHigh": null,
"priceLow": null,
"priceOpen": null,
"priceClose": null
},
{
"date": "2025-06-14",
"orderCount": 9,
"tradeCount": 4,
"volumeBase": 12,
"volumeQuote": 2185.2,
"priceHigh": 182.6,
"priceLow": 181.2,
"priceOpen": 181.4,
"priceClose": 182.35
}
],
"range": "3M",
"truncated": false,
"totals": {
"orderCount": 241,
"tradeCount": 118,
"volumeBase": 702,
"volumeQuote": 127884.5
}
}
}
Returns a day-by-day series for a base token rather than a single book. Every non-closed stock 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. That keeps the series directly plottable without gap-filling on the client.
Path Parameters
string
required
Base token contract. Matched case-insensitively.
Query Parameters
string
default:"1M"
Window length:
1W, 1M, 3M, 6M or 1Y. Anything else returns INVALID_PARAM.Response Fields
object
Show child attributes
Show child attributes
boolean
False when your instance holds no non-closed stock book on this token.
orderbooks and stats are then empty and totals are zero.array
array
One entry per day in the range, oldest first.
Show child attributes
Show child attributes
string
UTC day,
YYYY-MM-DD.integer
Orders submitted that day.
integer
Trades executed that day.
number
Base volume as a decimal number, already divided out of order book units.
number
Quote notional as a decimal number.
number
Highest trade price that day, or
null.number
Lowest trade price, or
null.number
First trade price, or
null.number
Last trade price, or
null.string
The range applied.
boolean
True when the underlying order or trade 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/stocks/api/order-books/by-token/0xabc7f1093d5e26b804a1c3f78de025916b47c0d3/daily-stats?range=3M" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/stocks/api/order-books/by-token/${tokenAddress}/daily-stats?range=3M`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
if (!data.hasOrderbook) console.log('no book on this token');
if (data.truncated) console.warn('series truncated at the scan limit');
{
"success": true,
"data": {
"hasOrderbook": true,
"orderbooks": [
{
"id": "clx_ob_stock_002",
"name": "Nyala Fund I",
"symbol": "NYF1",
"settlementMode": "OFF_CHAIN",
"status": "ACTIVE",
"tokenType": "STOCK_TOKEN",
"quoteTokenAddress": "0x98ad0ca091552e23c564b41c74282e5343d03e8a"
}
],
"stats": [
{
"date": "2025-06-13",
"orderCount": 0,
"tradeCount": 0,
"volumeBase": 0,
"volumeQuote": 0,
"priceHigh": null,
"priceLow": null,
"priceOpen": null,
"priceClose": null
},
{
"date": "2025-06-14",
"orderCount": 9,
"tradeCount": 4,
"volumeBase": 12,
"volumeQuote": 2185.2,
"priceHigh": 182.6,
"priceLow": 181.2,
"priceOpen": 181.4,
"priceClose": 182.35
}
],
"range": "3M",
"truncated": false,
"totals": {
"orderCount": 241,
"tradeCount": 118,
"volumeBase": 702,
"volumeQuote": 127884.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/stocks/api/order-books/by-token/0xabc7f1093d5e26b804a1c3f78de025916b47c0d3/daily-stats?range=3M" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/stocks/api/order-books/by-token/${tokenAddress}/daily-stats?range=3M`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
if (!data.hasOrderbook) console.log('no book on this token');
if (data.truncated) console.warn('series truncated at the scan limit');
{
"success": true,
"data": {
"hasOrderbook": true,
"orderbooks": [
{
"id": "clx_ob_stock_002",
"name": "Nyala Fund I",
"symbol": "NYF1",
"settlementMode": "OFF_CHAIN",
"status": "ACTIVE",
"tokenType": "STOCK_TOKEN",
"quoteTokenAddress": "0x98ad0ca091552e23c564b41c74282e5343d03e8a"
}
],
"stats": [
{
"date": "2025-06-13",
"orderCount": 0,
"tradeCount": 0,
"volumeBase": 0,
"volumeQuote": 0,
"priceHigh": null,
"priceLow": null,
"priceOpen": null,
"priceClose": null
},
{
"date": "2025-06-14",
"orderCount": 9,
"tradeCount": 4,
"volumeBase": 12,
"volumeQuote": 2185.2,
"priceHigh": 182.6,
"priceLow": 181.2,
"priceOpen": 181.4,
"priceClose": 182.35
}
],
"range": "3M",
"truncated": false,
"totals": {
"orderCount": 241,
"tradeCount": 118,
"volumeBase": 702,
"volumeQuote": 127884.5
}
}
}
