Stablecoins
Monitor stablecoin market caps, supply changes, and market dominance.
Try it Live
Open in Swagger UI โ to test these endpoints interactively.
Endpointsโ
| Endpoint | Description | Price |
|---|---|---|
GET /api/defi/stablecoins | All stablecoins | $0.01 |
GET /api/stablecoins/{symbol} | Single stablecoin | $0.01 |
GET /api/defi/stablecoinsโ
List all stablecoins with market cap and supply data.
Requestโ
curl https://api.web3identity.com/api/defi/stablecoins
Query Parametersโ
| Parameter | Type | Default | Description |
|---|---|---|---|
minMarketCap | number | - | Minimum market cap |
type | string | - | Filter by type: fiat-backed, crypto-backed, algorithmic |
sort | string | marketCap | Sort by: marketCap, change24h |
limit | number | 100 | Max results |
Responseโ
{
"stablecoins": [
{
"id": "tether",
"name": "Tether",
"symbol": "USDT",
"type": "fiat-backed",
"marketCap": 96789012345,
"marketCapChange24h": 123456789,
"marketCapChange7d": 456789012,
"marketCapChange30d": 1234567890,
"circulatingSupply": 96789012345,
"price": 1.0001,
"chains": {
"ethereum": 45678901234,
"tron": 34567890123,
"bsc": 8901234567,
"arbitrum": 3456789012,
"polygon": 2345678901,
"avalanche": 1234567890
},
"pegStability": {
"price": 1.0001,
"deviation": 0.01,
"timestamp": "2026-02-08T16:30:00Z"
},
"logo": "https://assets.coingecko.com/coins/images/325/large/Tether.png"
},
{
"id": "usd-coin",
"name": "USD Coin",
"symbol": "USDC",
"type": "fiat-backed",
"marketCap": 34567890123,
"marketCapChange24h": 45678901,
"marketCapChange7d": 123456789,
"marketCapChange30d": 456789012,
"circulatingSupply": 34567890123,
"price": 0.9999,
"chains": {
"ethereum": 18901234567,
"base": 6789012345,
"arbitrum": 3456789012,
"polygon": 2345678901,
"optimism": 1234567890,
"solana": 1840567408
},
"pegStability": {
"price": 0.9999,
"deviation": -0.01,
"timestamp": "2026-02-08T16:30:00Z"
},
"logo": "https://assets.coingecko.com/coins/images/6319/large/USD_Coin_icon.png"
},
{
"id": "dai",
"name": "Dai",
"symbol": "DAI",
"type": "crypto-backed",
"marketCap": 5678901234,
"marketCapChange24h": 12345678,
"marketCapChange7d": 34567890,
"marketCapChange30d": 123456789,
"circulatingSupply": 5678901234,
"price": 1.0002,
"chains": {
"ethereum": 4567890123,
"polygon": 567890123,
"arbitrum": 345678901,
"optimism": 123456789,
"gnosis": 73885398
},
"pegStability": {
"price": 1.0002,
"deviation": 0.02,
"timestamp": "2026-02-08T16:30:00Z"
},
"collateral": {
"type": "overcollateralized",
"ratio": 165.5,
"assets": ["USDC", "ETH", "wBTC"]
},
"logo": "https://assets.coingecko.com/coins/images/9956/large/Badge_Dai.png"
}
],
"total": 3,
"totalMarketCap": 137035803702,
"timestamp": "2026-02-08T16:30:00Z"
}
GET /api/stablecoins/{symbol}โ
Get detailed data for a specific stablecoin.
Requestโ
curl https://api.web3identity.com/api/stablecoins/USDC
Responseโ
{
"id": "usd-coin",
"name": "USD Coin",
"symbol": "USDC",
"type": "fiat-backed",
"issuer": "Circle",
"website": "https://www.circle.com/en/usdc",
"marketCap": 34567890123,
"circulatingSupply": 34567890123,
"price": 0.9999,
"pegStability": {
"current": 0.9999,
"deviation": -0.01,
"high24h": 1.0005,
"low24h": 0.9995,
"volatility": 0.05
},
"marketCapHistory": {
"24h": 34522211222,
"7d": 34444434444,
"30d": 34110901111,
"90d": 33000000000
},
"chains": {
"ethereum": {
"supply": 18901234567,
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"holders": 2345678
},
"base": {
"supply": 6789012345,
"address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"holders": 567890
},
"arbitrum": {
"supply": 3456789012,
"address": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
"holders": 345678
},
"polygon": {
"supply": 2345678901,
"address": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
"holders": 234567
}
},
"reserves": {
"cash": 32000000000,
"treasury": 2500000000,
"lastAudit": "2026-02-01T00:00:00Z",
"auditor": "Grant Thornton LLP"
},
"usage": {
"defiTvl": 12345678901,
"dailyTransfers": 456789012,
"activeAddresses24h": 123456
}
}
Stablecoin Typesโ
| Type | Description | Examples | Risk Profile |
|---|---|---|---|
| Fiat-backed | Backed 1:1 by fiat reserves | USDT, USDC | Low (custody risk) |
| Crypto-backed | Overcollateralized with crypto | DAI, sUSD | Medium (volatility) |
| Algorithmic | Algorithm-stabilized supply | FRAX, USDD | Higher (mechanism) |
| Hybrid | Mix of backing methods | FRAX, LUSD | Medium |
SDK Examplesโ
JavaScriptโ
import { Web3IdentityClient } from '@web3identity/sdk';
const client = new Web3IdentityClient();
// Get all stablecoins
const stablecoins = await client.getStablecoins({ sort: 'marketCap' });
console.log('Top stablecoins by market cap:');
stablecoins.stablecoins.forEach((coin, i) => {
const mcap = (coin.marketCap / 1e9).toFixed(2);
const change = coin.marketCapChange24h / coin.marketCap * 100;
console.log(`${i + 1}. ${coin.symbol}: $${mcap}B (${change > 0 ? '+' : ''}${change.toFixed(2)}%)`);
});
// Get specific stablecoin
const usdc = await client.getStablecoin('USDC');
console.log(`\nUSDC Market Cap: $${(usdc.marketCap / 1e9).toFixed(2)}B`);
console.log(`Price: $${usdc.price}`);
console.log(`Deviation from peg: ${usdc.pegStability.deviation}%`);
// Chain distribution
console.log('\nChain distribution:');
Object.entries(usdc.chains).forEach(([chain, data]) => {
const percentage = (data.supply / usdc.circulatingSupply * 100).toFixed(1);
console.log(` ${chain}: ${percentage}%`);
});
// Monitor peg stability
const depegged = stablecoins.stablecoins.filter(
s => Math.abs(s.pegStability.deviation) > 0.5
);
if (depegged.length > 0) {
console.log('\nโ ๏ธ Stablecoins off peg:');
depegged.forEach(s => {
console.log(` ${s.symbol}: $${s.price} (${s.pegStability.deviation}%)`);
});
}
Pythonโ
from web3identity import Client
client = Client()
# Get all stablecoins
stablecoins = client.get_stablecoins()
print("Stablecoin market overview:")
print(f"Total market cap: ${stablecoins['totalMarketCap'] / 1e9:.2f}B\n")
# Analyze market share
for coin in stablecoins['stablecoins'][:5]:
market_share = (coin['marketCap'] / stablecoins['totalMarketCap'] * 100)
print(f"{coin['symbol']}: ${coin['marketCap'] / 1e9:.2f}B ({market_share:.1f}%)")
# Get DAI details
dai = client.get_stablecoin('DAI')
print(f"\nDAI:")
print(f" Type: {dai['type']}")
print(f" Collateral ratio: {dai['collateral']['ratio']}%")
print(f" Collateral assets: {', '.join(dai['collateral']['assets'])}")
# Track supply changes
usdt = client.get_stablecoin('USDT')
change_30d = usdt['marketCapChange30d'] / 1e9
print(f"\nUSDT 30-day supply change: ${change_30d:.2f}B")
# Find best peg stability
best_peg = min(
stablecoins['stablecoins'],
key=lambda x: abs(x['pegStability']['deviation'])
)
print(f"\nMost stable peg: {best_peg['symbol']} (${best_peg['price']})")
cURL Examplesโ
# Get all stablecoins
curl https://api.web3identity.com/api/defi/stablecoins
# Filter by type
curl "https://api.web3identity.com/api/defi/stablecoins?type=fiat-backed"
# Minimum market cap
curl "https://api.web3identity.com/api/defi/stablecoins?minMarketCap=1000000000"
# Get USDT details
curl https://api.web3identity.com/api/stablecoins/USDT
# Get USDC details
curl https://api.web3identity.com/api/stablecoins/USDC
# Get DAI details
curl https://api.web3identity.com/api/stablecoins/DAI
Rate Limitsโ
| Tier | Rate Limit | Notes |
|---|---|---|
| Free | 100 requests/day | No payment required |
| Paid | Unlimited | $0.01 per call via x402 |
Common Use Casesโ
Market Dominance Trackerโ
// Track stablecoin dominance trends
async function trackDominance() {
const data = await client.getStablecoins();
const dominance = data.stablecoins.map(coin => ({
symbol: coin.symbol,
marketCap: coin.marketCap,
dominance: (coin.marketCap / data.totalMarketCap * 100).toFixed(2) + '%',
change30d: ((coin.marketCapChange30d / coin.marketCap) * 100).toFixed(2) + '%'
}));
return dominance.sort((a, b) => b.marketCap - a.marketCap);
}
const dominance = await trackDominance();
console.log('Stablecoin market share:', dominance);
Peg Deviation Alertโ
// Monitor for depegging events
async function monitorPegStability() {
const stablecoins = await client.getStablecoins();
const alerts = stablecoins.stablecoins
.filter(s => Math.abs(s.pegStability.deviation) > 0.3) // >0.3% off peg
.map(s => ({
symbol: s.symbol,
price: s.price,
deviation: s.pegStability.deviation,
severity: Math.abs(s.pegStability.deviation) > 1 ? 'HIGH' : 'MEDIUM'
}));
return alerts;
}
const alerts = await monitorPegStability();
if (alerts.length > 0) {
console.log('โ ๏ธ Peg stability alerts:', alerts);
}
Related Endpointsโ
- DeFi Protocols โ Protocol data
- Token Prices โ Real-time prices
- Bridges โ Cross-chain transfers
- Wallet Balances โ Portfolio tracking