Global DeFi market
GET /api/global-defiGlobal DeFi snapshot: DeFi market cap (USD), ETH market cap, DeFi-to-ETH ratio, 24h DeFi trading volume, DeFi dominance % of the whole crypto market, and the top DeFi coin with its share of DeFi. Send GET /api/global-defi with no input and pay $0.005 per call over x402 or MPP (there is no free tier). It returns a JSON object with source, fetchedAt, cached, defiMarketCapUsd, ethMarketCapUsd and 4 more.
The DeFi companion of crypto-global (whole-market caps and BTC/ETH dominance) and of defi-tvl (locked value, a different measure). Cached in-process for 5 minutes.
Parameters
Global DeFi market takes no parameters.
Example request
curl -i "https://agent402.tools/api/global-defi"
Without payment this returns HTTP 402 Payment Required with the exact price for global-defi; any x402 v2 or MPP client pays it and retries.
Example response
{
"source": "coingecko",
"fetchedAt": "2026-08-22T13:20:00.000Z",
"cached": false,
"defiMarketCapUsd": 112237506811.1,
"ethMarketCapUsd": 292876442962.28,
"defiToEthRatioPct": 38.3317,
"defiVolume24hUsd": 10184726070.56,
"defiDominancePct": 4.1566,
"topCoin": {
"name": "Lido Staked Ether",
"defiDominancePct": 20.7086
}
}
| Field | Type | Always present | In the example |
|---|---|---|---|
source | string | yes | coingecko |
fetchedAt | string | yes | 2026-08-22T13:20:00.000Z |
cached | boolean | yes | false |
defiMarketCapUsd | number | yes | 112237506811.1 |
ethMarketCapUsd | number | yes | 292876442962.28 |
defiToEthRatioPct | number | yes | 38.3317 |
defiVolume24hUsd | number | yes | 10184726070.56 |
defiDominancePct | number | yes | 4.1566 |
topCoin | object | yes | 2 fields: name, defiDominancePct |
From an MCP client
catalog.call {
"slug": "global-defi",
"params": {}
}
The hosted connector at https://agent402.tools/mcp needs a payment for global-defi; the stdio package pays it from a wallet or from AGENT402_CREDITS_KEY. Local install: npx -y agent402-mcp.
Errors and behavior
- There is no input to get wrong: any request to /api/global-defi runs the tool.
- A paid call that ends in any status of 400 or above is not charged over x402, MPP or a prepaid credits key: settlement is cancelled when the tool fails. 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 (
Authorization: Bearer a402_...) also pays it. - A
POSTwith a JSON body to /api/global-defi 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?.(false); // keep your own spending ceiling in code
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);
const res = await payFetch("https://agent402.tools/api/global-defi");
Related tools
Crypto categories by market cap
GET /api/coin-categoriesCoin categories (Layer 1, Meme, AI, DeFi, Stablecoins, RWA, ...) ranked by market cap, with 24h market cap change %, 24h…
Crypto global market
GET /api/crypto-globalGlobal crypto market snapshot: total market cap, total 24h volume, BTC dominance, ETH dominance, active coin count, acti…
Coin snapshot on a date
GET /api/coin-historyPrice, market cap and 24h volume of a coin on ONE past date (00:00 UTC snapshot), in every currency at once plus your ch…
Crypto news headlines
POST /api/crypto-newsLatest crypto headlines aggregated from the public RSS/Atom feeds of 8 major outlets (coindesk, cointelegraph, decrypt, …
DeFi chain TVL history
POST /api/defi-chain-tvl-historyDaily TVL history for one chain (Ethereum, Base, Solana, Arbitrum...) or for all of DeFi (chain "all") from DefiLlama's …
DeFi TVL by chain
POST /api/defi-chainsBlockchains ranked by DeFi TVL from DefiLlama's free chain list: name, TVL in USD, share of total DeFi TVL, native token…