Stablecoin depeg watch
GET /api/stablecoin-depeg-watchEvery USD stablecoin above a market-cap floor in one call, flagged ones first: deviation from $1 now in basis points, the worst deviation over 24 hours and over 7 days, an on-peg / stressed / depegged status (within 50 bps, within 200 bps, beyond), each coin's share of the watched market cap, and how much of that cap sits on peg. Send GET /api/stablecoin-depeg-watch with no required fields (3 optional) and pay $0.005 per call over x402 or MPP (there is no free tier). It returns a JSON object with source, fetchedAt, cached, peg, minMarketCapUsd and 13 more.
A coin counts as USD-pegged when its 7-day median price is within 2% of $1; the rest of the category (other currencies, value-accruing tokens, pegs lost more than a week ago) is listed separately with its distance from $1, never dropped silently. The whole-market sibling of stablecoin-peg, which checks a named list. Deterministic code over market data; refreshed every 15 minutes. Data provided by CoinGecko (https://www.coingecko.com/en/api).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
minMarketCapUsd | number | no | Watch stablecoins at or above this market cap in USD (default 100000000, minimum 1000000). |
thresholdBps | number | no | Flag a coin whose deviation now, over 24 hours or over 7 days reaches this many basis points (default 50, 1-5000). |
limit | number | no | Coins returned, 1-100 (default 25). |
Example request
curl -i "https://agent402.tools/api/stablecoin-depeg-watch?minMarketCapUsd=100000000"
Without payment this returns HTTP 402 Payment Required with the exact price for stablecoin-depeg-watch; any x402 v2 or MPP client pays it and retries.
Example response
{
"source": "coingecko",
"fetchedAt": "2026-11-16T12:00:00.000Z",
"cached": false,
"peg": "USD $1.00",
"minMarketCapUsd": 100000000,
"thresholdBps": 50,
"screened": 38,
"assessed": 33,
"flaggedCount": 1,
"returned": 2,
"matched": 33,
"complete": false,
"truncated": true,
"onPegMarketCapSharePct": 99.41,
"worstNow": {
"symbol": "XUSD",
"deviationBps": -92.1
},
"coins": [
{
"rank": 1,
"id": "example-usd",
"symbol": "XUSD",
"name": "Example USD",
"deviationBps": -92.1,
"maxDeviation24hBps": 117.2,
"maxDeviation7dBps": 131.5,
"marketCapSharePct": 0.07,
"status": "stressed",
"flags": [
"off-peg-now",
"off-peg-24h",
"off-peg-7d"
]
},
{
"rank": 2,
"id": "tether",
"symbol": "USDT",
"name": "Tether",
"deviationBps": -6.49,
"maxDeviation24hBps": 9.1,
"maxDeviation7dBps": 14.3,
"marketCapSharePct": 61.2,
"status": "on-peg",
"flags": []
}
],
"notAssessed": {
"count": 5,
"reason": "7-day median price is more than 2% from $1: another currency's peg, a value-accruing token, or a peg lost more than a week ago",
"coins": [
{
"id": "example-euro",
"symbol": "XEUR",
"distanceFromUsdPct": 9.9
}
]
},
"credit": "Data provided by CoinGecko (https://www.coingecko.com/en/api)."
}| Field | Type | Always present | In the example |
|---|---|---|---|
source | string | yes | coingecko |
fetchedAt | string | yes | 2026-11-16T12:00:00.000Z |
cached | boolean | yes | false |
peg | string | yes | USD $1.00 |
minMarketCapUsd | number | yes | 100000000 |
thresholdBps | number | yes | 50 |
screened | number | yes | 38 |
assessed | number | yes | 33 |
flaggedCount | number | yes | 1 |
returned | number | yes | 2 |
matched | number | yes | 33 |
complete | boolean | yes | false |
truncated | boolean | yes | true |
onPegMarketCapSharePct | number | yes | 99.41 |
worstNow | object | yes | 2 fields: symbol, deviationBps |
coins | array of objects | yes | 2 items in the example |
notAssessed | object | yes | 3 fields: count, reason, coins |
credit | string | yes | Data provided by CoinGecko (https://www.coingecko.com/en/api). |
From an MCP client
catalog.call {
"slug": "stablecoin-depeg-watch",
"params": {
"minMarketCapUsd": 100000000
}
}The hosted connector at https://agent402.tools/mcp needs a payment for stablecoin-depeg-watch; the stdio package pays it from a wallet or from an AGENT402_CREDITS_KEY issued earlier. Local install: npx -y agent402-mcp@0.13.32.
Errors and behavior
- Every field is optional. An input the tool rejects returns an HTTP 4xx whose body carries
error,tool,expected,requiredandexample. - A paid call that ends in any status of 400 or above is not charged over x402, MPP or a prepaid credits key: settlement runs after the tool and only on a successful response. The exception is a Tempo push credential, a transfer the buyer sent before the call: it settles before the tool runs, so if the tool then fails the payment is recorded as a refund owed to the paying wallet.
- Wallet-only: this tool reaches the network or stored state, so it has no proof-of-work tier. A prepaid card-credits key issued earlier (
Authorization: Bearer a402_...) also pays it. - A
POSTwith a JSON body to /api/stablecoin-depeg-watch is served as this GET, with the body as the input. - An
Idempotency-Keyheader makes a retried paid call replay the first 200 instead of charging again (an answer larger than 1 MB is not replayed).
Paid call (JavaScript agent)
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client();
client.setSpendControls?.({ maxAmountPerPayment: "$0.005" }); // refuse any quote above this tool's price
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);
const res = await payFetch("https://agent402.tools/api/stablecoin-depeg-watch?minMarketCapUsd=100000000");Related tools
Stablecoin peg monitor
Live $1-peg deviation for the top USD stablecoins (USDT, USDC, USDS, DAI, USDe, PYUSD, USDD, TUSD, FDUSD by default.
DeFi token screener
Screen the DeFi category's 250 largest tokens with computed columns: share of the category's market cap, turnover (24h.
Funding rate screener across venues
Perpetual funding for one coin across every listed derivatives venue, computed in one call: open-interest-weighted.
Perp funding screener
Rank perpetuals by funding rate: the N most positive (longs pay shorts) and N most negative (shorts pay longs) markets.
Token balances (named contracts)
ERC-20 balances of one wallet for a NAMED list of token contracts (1-20) - the targeted complement to the full-portfolio.
Known-address label lookup
Label a known EVM address from a curated, committed dataset: major stablecoin + token contracts (the USDC and USDG.