# DefiLlama on Onekey > 10 endpoints for DefiLlama (10 stable, 0 beta), 1 to 5 credits each. Category: Finance & markets. One key, one JSON shape. Base URL: https://api.onekey.dev Auth: header `x-api-key: `. Call shape: `GET /v1/{platform}/{endpoint}?{params}`. Every response is `{success, data, metadata, error}`; check `success` first. Cost is in `metadata.credits_charged`. Free when served from cache (0.2 credit for a cached response over 100 KB). Failed and not-found calls are refunded. Status: stable = verified against the live source; beta = not yet verified, fields may be missing. Page: https://onekey.dev/platforms/defillama Reference (Markdown): https://onekey.dev/docs/api/defillama.md All docs: https://onekey.dev/llms.txt ## Canonical fields returned Unified-schema fields (same names on every platform), with how many of the 10 mapped DefiLlama endpoints return each: - `entity.name` (string): 6 - `market.symbol` (string): 5 - `entity.category` (string): 4 - `entity.date` (ISO 8601 date): 4 - `entity.id` (string): 3 - `entity.url` (URL): 3 - `market.price` (number): 1 - `market.volume24h` (number): 1 - plus 21 platform-specific fields under `ext.` ## Endpoints ### defillama.chain_tvl_history Daily TVL history for a chain (all time). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/defillama/chain_tvl_history?chain=Ethereum` with header `x-api-key: YOUR_API_KEY` - Parameters: - `chain` (string, required): Chain name, e.g. Ethereum - Fields returned: `entity.date`, `ext.tvl` - Reference: https://onekey.dev/docs/api/defillama/chain_tvl_history.md ### defillama.chains TVL per chain across DeFi. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/defillama/chains` with header `x-api-key: YOUR_API_KEY` - Parameters: none - Fields returned: `entity.name`, `market.symbol`, `entity.id`, `ext.chainId`, `ext.tvl` - Reference: https://onekey.dev/docs/api/defillama/chains.md ### defillama.global_tvl_history Daily global DeFi TVL history (all time). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/defillama/global_tvl_history` with header `x-api-key: YOUR_API_KEY` - Parameters: none - Fields returned: `entity.date`, `ext.tvl` - Reference: https://onekey.dev/docs/api/defillama/global_tvl_history.md ### defillama.hacks DeFi hacks and exploits database. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/defillama/hacks` with header `x-api-key: YOUR_API_KEY` - Parameters: none - Fields returned: `entity.name`, `entity.date`, `entity.category`, `entity.url`, `ext.technique`, `ext.targetType`, `ext.amountUsd`, `ext.chains` - Reference: https://onekey.dev/docs/api/defillama/hacks.md ### defillama.pool_chart TVL/APY history for a yield pool (by pool UUID). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/defillama/pool_chart?pool=747c1d2a-c668-4682-b9f9-296708a3dd90` with header `x-api-key: YOUR_API_KEY` - Parameters: - `pool` (string, required): Pool UUID from DefiLlama yields - Fields returned: `entity.date`, `ext.tvlUsd`, `ext.apy`, `ext.apyBase`, `ext.apyReward` - Reference: https://onekey.dev/docs/api/defillama/pool_chart.md ### defillama.protocol_dex_volume DEX volume summary of a protocol (24h/7d/30d/all-time). - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/defillama/protocol_dex_volume?protocol=uniswap` with header `x-api-key: YOUR_API_KEY` - Parameters: - `protocol` (string, required): Protocol slug, e.g. uniswap - Fields returned: `entity.name`, `market.symbol`, `entity.url`, `entity.category`, `market.volume24h`, `ext.volume7d`, `ext.volume30d`, `ext.volumeAllTime` - Reference: https://onekey.dev/docs/api/defillama/protocol_dex_volume.md ### defillama.protocol_fees Fees/revenue summary of a protocol (24h/7d/30d/all-time). - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/defillama/protocol_fees?protocol=aave` with header `x-api-key: YOUR_API_KEY` - Parameters: - `protocol` (string, required): Protocol slug, e.g. aave - Fields returned: `entity.name`, `market.symbol`, `entity.url`, `entity.category`, `ext.fees24h`, `ext.fees7d`, `ext.fees30d`, `ext.feesAllTime` - Reference: https://onekey.dev/docs/api/defillama/protocol_fees.md ### defillama.protocol_tvl Current TVL of a DeFi protocol (by DefiLlama slug). - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/defillama/protocol_tvl?protocol=aave` with header `x-api-key: YOUR_API_KEY` - Parameters: - `protocol` (string, required): Protocol slug, e.g. aave - Fields returned: `ext.tvl` - Reference: https://onekey.dev/docs/api/defillama/protocol_tvl.md ### defillama.stablecoin_chains Stablecoin market cap per chain. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/defillama/stablecoin_chains` with header `x-api-key: YOUR_API_KEY` - Parameters: none - Fields returned: `entity.name`, `market.symbol`, `entity.id`, `ext.circulatingUsd` - Reference: https://onekey.dev/docs/api/defillama/stablecoin_chains.md ### defillama.stablecoins All stablecoins with circulating supply and peg info. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/defillama/stablecoins` with header `x-api-key: YOUR_API_KEY` - Parameters: none - Fields returned: `entity.id`, `entity.name`, `market.symbol`, `entity.category`, `market.price`, `ext.pegMechanism`, `ext.circulatingUsd`, `ext.circulatingPrevDayUsd`, `ext.geckoId` - Reference: https://onekey.dev/docs/api/defillama/stablecoins.md ## Sample request ```bash curl "https://api.onekey.dev/v1/defillama/protocol_dex_volume?protocol=uniswap" \ -H "x-api-key: YOUR_API_KEY" ```