Skip to main content
Two related API surfaces:
  • /v1/usage — tenant-scoped billing and cost data. Used by your own billing and for portal-token-gated customer dashboards.
  • /v1/analytics — protocol-level activity metrics for dashboards.
Both are read-only.

Usage API

All endpoints accept start and end ISO-8601 query params; default window is last 30 days.

Summary

Response:
Useful for: monthly billing reports, dashboard tiles, capacity forecasting.

Operation events (paginated)

Every billable operation, individually:
Returns:

Request counts

API request aggregations (distinct from business operations — every HTTP call):
Useful for monitoring API-quota usage and debugging unexpected traffic.

External costs

Breakdown of costs Sly paid to external providers on your behalf (Circle fees, Stripe processing, etc.):
Use this to understand unit economics on each protocol and decide where to batch, cache, or route differently.

Analytics API

Protocol-level activity over time — drives the Sly dashboard’s charts. Typically fetched from server-rendered or client-rendered dashboards.

Protocol distribution

Params:
  • timeRange: 24h | 7d | 30d
  • metric: volume (USD) | count (number of operations)
Returns per-protocol totals for the window.

Protocol activity (time series)

Returns per-protocol time-bucketed activity — bucket size scales with timeRange (hourly for 24h, daily for 7d/30d).

Protocol stats

Summary statistics per protocol: total volume, transaction count, average amount, success rate.

Recent activity

Last N operations across all protocols. Good for an activity-feed widget.

Checkout demand

Checkout funnel metrics: sessions opened, completion rate, drop-off points, time-to-complete. Drives e-commerce conversion dashboards.

Portal token access

The /v1/usage/* endpoints accept portal tokens with the usage:read scope, letting you safely embed usage views in customer-facing dashboards without exposing your API key.
Return the portal_* token to the browser; it can call /v1/usage/summary etc. directly. Scope is enforced — out-of-scope calls return 403. /v1/analytics/* doesn’t support portal tokens (it’s tenant-wide, not customer-scoped).

Freshness

  • Usage API — operation_events table is updated within seconds of each operation. Summary aggregations may cache up to 30 seconds.
  • Analytics API — up-to-5-minute lag on materialized views for large tenants. For real-time signals, subscribe to webhooks instead.

Endpoints