Markets
Get Index Status
Check how far the historical index trails the chain
GET
/
lending-external-securities-v2
/
api
/
markets
/
{marketId}
/
index-status
curl "https://api.trusset.org/lending-external-securities-v2/api/markets/{marketId}/index-status" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/lending-external-securities-v2/api/markets/${marketId}/index-status`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
const trustworthy = data.available && data.indexed && data.stale === false && !data.hasIndexingErrors;
{
"success": true,
"data": {
"marketId": "cmssh7p1k0001cghxq2m4v8rz",
"available": true,
"indexed": true,
"snapshotCount": 412,
"lastSnapshotBlock": 8412774,
"lastSnapshotAt": "2026-09-25T11:00:00.000Z",
"indexedBlock": 8412791,
"indexedAt": "2026-09-25T11:03:24.000Z",
"hasIndexingErrors": false,
"lagSeconds": 36,
"stale": false,
"staleThresholdSeconds": 300
}
}
{
"success": true,
"data": {
"marketId": "cmssh7p1k0001cghxq2m4v8rz",
"available": false,
"reason": "NOT_CONFIGURED",
"message": "Historical indexing is not configured for this network"
}
}
Reports whether the market has indexed history and how far behind the chain the index currently sits. Use it to decide whether Get Market History is trustworthy before charting it, and to tell “no activity” apart from “not indexed yet”. The answer is cached for up to a minute.
Like the history endpoint, an indexing outage returns
200 with available: false rather than an error.
Path Parameters
string
required
Response Fields
object
Show child attributes
Show child attributes
string
Market ID.
boolean
Whether the index could be reached. When
false, only reason and message accompany it.boolean
Whether this market has at least one snapshot.
integer
Snapshots recorded for this market.
integer
Block of the most recent snapshot, or
0.string
ISO 8601 timestamp of the most recent snapshot, or null.
integer
Latest block the indexer has processed, or null.
string
ISO 8601 timestamp of that block, or null.
boolean
Whether the indexer reports errors on this deployment.
integer
How many seconds the indexed block trailed the clock when the status was read, which can be up to a minute before this response.
null when the index reported no block time.boolean
true when lagSeconds exceeds staleThresholdSeconds. null when the lag is unknown.integer
The lag beyond which the index counts as stale:
300. Get Lifecycle Statement refuses to generate past it unless told otherwise.string
Present when
available is false. One of NOT_CONFIGURED, NO_MARKET_ADDRESS, INDEX_NOT_DEPLOYED, UPSTREAM_ERROR, QUERY_ERROR, EMPTY_RESPONSE, TIMEOUT, NETWORK_ERROR.string
Human-readable explanation accompanying
reason.curl "https://api.trusset.org/lending-external-securities-v2/api/markets/{marketId}/index-status" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/lending-external-securities-v2/api/markets/${marketId}/index-status`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
const trustworthy = data.available && data.indexed && data.stale === false && !data.hasIndexingErrors;
{
"success": true,
"data": {
"marketId": "cmssh7p1k0001cghxq2m4v8rz",
"available": true,
"indexed": true,
"snapshotCount": 412,
"lastSnapshotBlock": 8412774,
"lastSnapshotAt": "2026-09-25T11:00:00.000Z",
"indexedBlock": 8412791,
"indexedAt": "2026-09-25T11:03:24.000Z",
"hasIndexingErrors": false,
"lagSeconds": 36,
"stale": false,
"staleThresholdSeconds": 300
}
}
{
"success": true,
"data": {
"marketId": "cmssh7p1k0001cghxq2m4v8rz",
"available": false,
"reason": "NOT_CONFIGURED",
"message": "Historical indexing is not configured for this network"
}
}
Error Codes
| Code | HTTP | Cause |
|---|---|---|
MISSING_MARKET_ID | 400 | marketId is longer than 100 characters |
MARKET_NOT_FOUND | 404 | No market with this ID on your instance |
⌘I
curl "https://api.trusset.org/lending-external-securities-v2/api/markets/{marketId}/index-status" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/lending-external-securities-v2/api/markets/${marketId}/index-status`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
const trustworthy = data.available && data.indexed && data.stale === false && !data.hasIndexingErrors;
{
"success": true,
"data": {
"marketId": "cmssh7p1k0001cghxq2m4v8rz",
"available": true,
"indexed": true,
"snapshotCount": 412,
"lastSnapshotBlock": 8412774,
"lastSnapshotAt": "2026-09-25T11:00:00.000Z",
"indexedBlock": 8412791,
"indexedAt": "2026-09-25T11:03:24.000Z",
"hasIndexingErrors": false,
"lagSeconds": 36,
"stale": false,
"staleThresholdSeconds": 300
}
}
{
"success": true,
"data": {
"marketId": "cmssh7p1k0001cghxq2m4v8rz",
"available": false,
"reason": "NOT_CONFIGURED",
"message": "Historical indexing is not configured for this network"
}
}
