Analytics
Retrieve analytics and usage metrics for your tenant.
const urblock = new Urblock("sk_test_...");
overview(params?)
Get a high-level summary of tenant activity.
const overview = await urblock.analytics.overview({ period: "30d" });
console.log(`Transactions: ${overview.total_transactions}`);
console.log(`Tokens: ${overview.total_tokens}`);
console.log(`Wallets: ${overview.total_wallets}`);
console.log(`Webhooks: ${overview.total_webhooks_sent}`);
| Param | Type | Required | Description |
|---|---|---|---|
period | string | No | 7d, 30d (default), 90d, 1y |
Returns: AnalyticsOverviewResponse
transactions(params?)
Get detailed transaction analytics.
const tx = await urblock.analytics.transactions({ period: "7d" });
console.log(`Total: ${tx.total}, Avg gas: ${tx.avg_gas_used}`);
console.log(`Avg confirmation: ${tx.avg_confirmation_time_ms}ms`);
for (const [network, count] of Object.entries(tx.by_network)) {
console.log(` ${network}: ${count}`);
}
| Param | Type | Required | Description |
|---|---|---|---|
period | string | No | 7d, 30d (default), 90d, 1y |
Returns: AnalyticsTransactionsResponse
tokens(params?)
Get token deployment analytics.
const tokens = await urblock.analytics.tokens({ period: "90d" });
console.log(`Total tokens: ${tokens.total_tokens}`);
for (const [standard, count] of Object.entries(tokens.by_standard)) {
console.log(` ${standard}: ${count}`);
}
| Param | Type | Required | Description |
|---|---|---|---|
period | string | No | 7d, 30d (default), 90d, 1y |
Returns: AnalyticsTokensResponse
webhooks(params?)
Get webhook delivery analytics.
const wh = await urblock.analytics.webhooks({ period: "30d" });
console.log(`Delivery rate: ${(wh.delivery_rate * 100).toFixed(1)}%`);
console.log(`Sent: ${wh.total_sent}, Failed: ${wh.total_failed}`);
console.log(`Avg delivery: ${wh.avg_delivery_time_ms}ms`);
| Param | Type | Required | Description |
|---|---|---|---|
period | string | No | 7d, 30d (default), 90d, 1y |
Returns: AnalyticsWebhooksResponse
See Also
- Analytics API — full endpoint reference
- Billing API — manage plans and subscriptions