Skip to main content

Location Records Statistics

GET /api/v0/location-records/stats
Returns aggregated statistics about location attestations across all supported chains.

Example

curl "https://api.astral.global/api/v0/location-records/stats"

Response

{
  "total": 1250,
  "by_chain": {
    "base-sepolia": 450,
    "sepolia": 320,
    "arbitrum": 300,
    "celo": 180
  },
  "by_time": {
    "last_24_hours": 50,
    "last_7_days": 210,
    "last_30_days": 480
  },
  "revoked": 15
}

Response Fields

FieldTypeDescription
totalnumberTotal attestations across all chains
by_chainobjectCount per blockchain
by_timeobjectCounts for recent time windows
revokednumberTotal revoked attestations

Use Cases

Dashboard Metrics

const stats = await fetch('https://api.astral.global/api/v0/location-records/stats')
  .then(r => r.json());

console.log(`Total records: ${stats.total}`);
console.log(`New today: ${stats.by_time.last_24_hours}`);

Chain Activity Monitoring

const mostActive = Object.entries(stats.by_chain)
  .sort(([,a], [,b]) => b - a)[0];

console.log(`Most active chain: ${mostActive[0]} (${mostActive[1]} records)`);