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 5 more.
The DeFi companion of crypto-global (whole-market caps and BTC/ETH dominance); this is token market value, not locked value. Cached in-process for 5 minutes. Data provided by CoinGecko (https://www.coingecko.com/en/api).
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.
Watch a call get paid
GET /api/global-defi$0.005 USDCPAYMENT-SIGNATUREon 14 chains200 OKAgent402-ReceiptEd25519Example 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
},
"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-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 |
credit | string | yes | Data provided by CoinGecko (https://www.coingecko.com/en/api). |
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 an AGENT402_CREDITS_KEY issued earlier. Local install: npx -y agent402-mcp@0.14.0.
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 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/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?.({ 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/global-defi");Part of these workflows
Global DeFi market is one step in this skill pack, each sold as a single call:
- DeFi dashboard - DeFi market overview: DeFi market cap and dominance, ETH price, Base gas, and global crypto stats in one call.
Related tools
Crypto categories by market cap
Coin categories (Layer 1, Meme, AI, DeFi, Stablecoins, RWA, ...) ranked by market cap, with 24h market cap change %, 24h.
Crypto global market
Global crypto market snapshot: total market cap, total 24h volume, BTC dominance, ETH dominance, active coin count.
Chain board by native asset
Blockchains ranked by their native asset, computed from three market documents: each native asset's share of the whole.
Coin snapshot on a date
Price, market cap and 24h volume of a coin on ONE past date (00:00 UTC snapshot), in every currency at once plus your.
Crypto news headlines
Latest crypto headlines aggregated from the public RSS/Atom feeds of 8 major outlets (coindesk, cointelegraph, decrypt.
DeFi token screener
Screen the DeFi category's 250 largest tokens with computed columns: share of the category's market cap, turnover (24h.