Monitoring
Get block scanner metrics
Returns per-chain block scanner lag and health. Used for observability of ETH/UTXO block-based wallet monitoring. Alerts when lag exceeds threshold.
GET
/api/monitoring/scanner-metricsSDK setup
Create a client and set credentials (JWT and/or API key) before calling the API. Match the authentication type shown above.
import { Configuration, MonitoringApi } from 'mudbase-sdk';
const configuration = new Configuration({
basePath: 'https://cloud.mudbase.dev',
accessToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c3JfbW9yZ2FuX2RlIiwiZW1haWwiOiJtb3JnYW4uY2hlbkBub3J0aHdpbmQuZGV2IiwiZXhwIjoxODI1MTI5NjAwfQ.doc_preview_sig',
});
const monitoring = new MonitoringApi(configuration);import { Configuration, MonitoringApi } from 'mudbase-sdk';
const configuration = new Configuration({
basePath: 'https://cloud.mudbase.dev',
accessToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c3JfbW9yZ2FuX2RlIiwiZW1haWwiOiJtb3JnYW4uY2hlbkBub3J0aHdpbmQuZGV2IiwiZXhwIjoxODI1MTI5NjAwfQ.doc_preview_sig',
});
const monitoring = new MonitoringApi(configuration);Example request
Call this endpoint using the client from SDK setup. Use View HTTP for a raw cURL example.
const { data: result } = await monitoring.getScannerMetrics();const { data: result } = await monitoring.getScannerMetrics();Playground
liveTest this endpoint with your own credentials. Your requests will be sent to the live API.
Use the auth endpoints to obtain a JWT.
No Request Yet
Send a request to see the full inspector
Authentication
Requires JWT
Note
Include your JWT in the
Authorization: Bearer YOUR_TOKEN header (user-facing apps, RBAC). View authentication guide →Responses
200Scanner metrics and optional lag alerts
json
{
"metrics": {
"ethereum": {
"lastScannedBlock": 21234567,
"currentBlock": 21234620,
"lag": 53,
"lastUpdated": "2026-03-02T02:00:00.000Z"
},
"bitcoin": {
"lastScannedBlock": 938900,
"currentBlock": 938940,
"lag": 40,
"lastUpdated": "2026-03-02T02:00:00.000Z"
}
},
"lagAlertThreshold": 50,
"alerts": [
{
"chain": "ethereum",
"lag": 53,
"threshold": 50
}
]
}{
"metrics": {
"ethereum": {
"lastScannedBlock": 21234567,
"currentBlock": 21234620,
"lag": 53,
"lastUpdated": "2026-03-02T02:00:00.000Z"
},
"bitcoin": {
"lastScannedBlock": 938900,
"currentBlock": 938940,
"lag": 40,
"lastUpdated": "2026-03-02T02:00:00.000Z"
}
},
"lagAlertThreshold": 50,
"alerts": [
{
"chain": "ethereum",
"lag": 53,
"threshold": 50
}
]
}401—
500Failed to fetch scanner metrics
json
{
"error": "Failed to fetch scanner metrics"
}{
"error": "Failed to fetch scanner metrics"
}Errors
| Code | Meaning |
|---|---|
401 | — |
500 | Failed to fetch scanner metrics |