API Reference
Access real-time stablecoin peg stability data. Get stability scores, depeg event history, price snapshots, and multi-coin comparisons for 180+ stablecoins.
Base URL
stablelens.io/api/v1Format
JSON over HTTPS
Rate Limit
30 req/min (public)
# Quick start — no API key needed
curl https://stablelens.io/api/v1/tokens/USDTAuthentication
Free (No Key)
Two endpoints available without authentication:
GET /api/v1/healthGET /api/v1/tokens/:symbol
API Key Required
Pass your key via the X-API-Key header:
/tokens·/tokens/:symbol/history/events·/events/:id/compare·/webhooks
curl -H "X-API-Key: pw_your_key_here" \
https://stablelens.io/api/v1/tokensEndpoints
Free Tier
/api/v1/healthPublicCheck API and database status. Returns 503 if the database is unreachable.
No parameters
Response
{
"status": "ok"
}/api/v1/tokens/:symbolPublicLook up a single stablecoin by symbol. Returns current price, stability score, peg streak, and depeg history.
Parameters
:symbolstringreqToken symbol, e.g. USDTResponse
{
"status": "ok",
"data": {
"symbol": "USDT",
"pegType": "usd",
"pegTarget": 1,
"stabilityScore": 98.5,
"pegStreak": 120,
"daysSinceDepeg": 45,
"severity": "minor"
}
}API Key Required
/api/v1/tokensAPI KeyList all active stablecoins with their current stability metrics.
No parameters
Response
{
"status": "ok",
"count": 189,
"data": [
{
"symbol": "USDT",
"pegType": "usd",
"stabilityScore": 98.5,
"pegStreak": 120
},
{
"symbol": "USDC",
"pegType": "usd",
"stabilityScore": 99.2,
"pegStreak": 120
}
]
}/api/v1/tokens/:symbol/historyAPI KeyHistorical price snapshots for charting. Capped at 30 days, 500 data points.
Parameters
:symbolstringreqToken symboldaysnumberDays of history (default 30, max 30)limitnumberMax results (default 500, max 500)Response
{
"status": "ok",
"symbol": "USDT",
"days": 30,
"count": 120,
"data": [
{
"timestamp": "2026-02-15T00:00:00Z",
"price": 0.9998,
"marketCap": 142000000000,
"volume24h": 89000000000
}
]
}/api/v1/eventsAPI KeyDepeg events from the last 90 days with filtering and pagination.
Parameters
symbolstringFilter by symbolseveritystringminor, moderate, major, criticalresolvedbooleanFilter by resolution statuslimitnumberResults per page (default 20, max 50)offsetnumberPagination offset (max 500)sortstringasc or desc (default desc)Response
{
"status": "ok",
"count": 3,
"total": 12,
"data": [
{
"id": "cm1abc...",
"symbol": "USDT",
"severity": "minor",
"startDate": "2026-01-15T08:00:00Z",
"resolved": true,
"durationHours": 6
}
]
}/api/v1/events/:idAPI KeyFull details for a single depeg event including coin metadata and sources.
Parameters
:idstringreqEvent ID (CUID format)Response
{
"status": "ok",
"data": {
"id": "cm1abc...",
"symbol": "USDT",
"severity": "minor",
"startDate": "2026-01-15T08:00:00Z",
"endDate": "2026-01-15T14:00:00Z",
"lowestPrice": 0.997,
"resolved": true,
"durationHours": 6
}
}/api/v1/compareAPI KeyMulti-coin comparison with stability scores, statistical metrics, and 30-day price history.
Parameters
symbolsstringreqComma-separated, max 5 (e.g. USDT,USDC,DAI)Response
{
"status": "ok",
"count": 2,
"data": [
{
"symbol": "USDT",
"stabilityScore": 98.5,
"stats": {
"avgPrice": 1.0001,
"stdDeviation": 0.00023,
"depegEventCount": 3
},
"priceHistory": [
{
"timestamp": "2026-02-22T00:00:00Z",
"price": 0.9999
}
]
}
]
}/api/v1/webhooksAPI KeyRegister a webhook to receive depeg alerts. HTTPS URLs only. Max 10 per API key.
Parameters
urlstringreqHTTPS webhook URLsymbolsstring[]Filter by symbols (default: all)severitiesstring[]Filter by severity levelsResponse
{
"status": "ok",
"message": "Webhook registered",
"data": {
"id": "cm1xyz...",
"url": "https://example.com/hook",
"isActive": true
}
}Status Codes
| Code | Meaning |
|---|---|
| 200 | OK — Successful request |
| 201 | Created — Webhook registered successfully |
| 400 | Bad Request — Invalid parameters or missing required fields |
| 401 | Unauthorized — Missing or invalid API key |
| 404 | Not Found — Token or event not found |
| 405 | Method Not Allowed — Use the correct HTTP method |
| 409 | Conflict — Webhook URL already registered |
| 429 | Too Many Requests — Rate limit exceeded |
| 503 | Service Unavailable — Database unreachable |
Error Responses
All error responses follow a consistent JSON structure. Use the status field to check for errors programmatically.
{
"status": "error",
"error": "Rate limit exceeded. Please wait before making more requests.",
"retryAfter": 32
}{
"status": "error",
"error": "Invalid or missing API key. Pass your key via the X-API-Key header."
}{
"status": "error",
"error": "Token not found: FAKEUSD"
}{
"status": "error",
"error": "Missing required parameter: symbols"
}Rate Limits
Public (No Key)
- • 30 requests per minute per IP
- • Exceeded →
429with retry info
API Key
- • Configurable per key
- • Default: 60 requests per minute
- • Usage tracked per key
Data Export Limits
To protect the integrity of our data, all endpoints enforce strict limits:
Price History
30 days, 500 snapshots
Depeg Events
90 days, 50/page, offset ≤ 500
Compare
5 symbols, 30-day price window
Questions? Contact support<@>stablelens<.>io