@defillama/api

中文文档
0.1.5发布于 2026/11/04MITTypeScriptESM + CJS零依赖近 30 天下载 3569

TypeScript SDK for DefiLlama API

原始使用文档
文档目录96 节
  1. Installation
  2. Quick Start
  3. Configuration
  4. Modules
  5. TVL
  6. getProtocols
  7. getProtocol
  8. getTvl
  9. getChains
  10. getHistoricalChainTvl
  11. getTokenProtocols 🔐
  12. getInflows 🔐
  13. getChainAssets 🔐
  14. Prices
  15. getCurrentPrices
  16. getHistoricalPrices
  17. getBatchHistoricalPrices
  18. getChart
  19. getPercentageChange
  20. getFirstPrices
  21. getBlockAtTimestamp
  22. Stablecoins
  23. getStablecoins
  24. getAllCharts
  25. getChartsByChain
  26. getStablecoin
  27. getChains
  28. getPrices
  29. getDominance 🔐
  30. Yields 🔐
  31. getEarn
  32. queryEarn
  33. getEarnHistory
  34. getBorrowMarkets
  35. getBorrowMarketHistory
  36. getPerpFundingRates
  37. getLstRates
  38. Volumes
  39. getDexOverview
  40. getDexOverviewByChain
  41. getDexSummary
  42. getOptionsOverview
  43. getOptionsOverviewByChain
  44. getOptionsSummary
  45. getDerivativesOverview 🔐
  46. getDerivativesSummary 🔐
  47. getDexMetrics 🔐
  48. getDexMetricsByProtocol 🔐
  49. getDerivativesMetrics 🔐
  50. getDerivativesMetricsByProtocol 🔐
  51. getOptionsMetrics 🔐
  52. getOptionsMetricsByProtocol 🔐
  53. Fees
  54. Fee Data Types
  55. getOverview
  56. getOverviewByChain
  57. getSummary
  58. getChart 🔐
  59. getChartByProtocolChainBreakdown 🔐
  60. getChartByProtocolVersionBreakdown 🔐
  61. getChartByChainProtocolBreakdown 🔐
  62. getChartChainBreakdown 🔐
  63. getMetrics 🔐
  64. Emissions 🔐
  65. getAll
  66. getByProtocol
  67. Bridges 🔐
  68. getAll
  69. getById
  70. getVolumeByChain
  71. getDayStats
  72. getTransactions
  73. Ecosystem 🔐
  74. getCategories
  75. getForks
  76. getOracles
  77. getEntities
  78. getTreasuries
  79. getHacks
  80. getRaises
  81. ETFs 🔐
  82. getOverview
  83. getOverviewEth
  84. getHistory
  85. getHistoryEth
  86. getFdvPerformance
  87. DAT 🔐
  88. getInstitutions
  89. getInstitution
  90. Account 🔐
  91. getUsage
  92. Error Handling
  93. Type Exports
  94. Constants
  95. Requirements
  96. License

DefiLlama SDK

Official TypeScript/JavaScript SDK for the DefiLlama API. Access DeFi protocol data including TVL, prices, yields, volumes, fees, bridges, and more.

Installation

npm install @defillama/api
yarn add @defillama/api
pnpm add @defillama/api

Quick Start

import { DefiLlama } from "@defillama/api";

// Free tier
const client = new DefiLlama();

// Pro tier (required for premium endpoints)
const proClient = new DefiLlama({
  apiKey: "your-api-key",
});

// Get all protocols
const protocols = await client.tvl.getProtocols();

// Get current token prices
const prices = await client.prices.getCurrentPrices([
  "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
  "coingecko:bitcoin",
]);

Configuration

interface DefiLlamaConfig {
  apiKey?: string; // API key from https://defillama.com/subscription (requires API plan)
  timeout?: number; // Request timeout in ms (default: 30000)
}

Modules

  • TVL - Total Value Locked data
  • Prices - Token price data
  • Stablecoins - Stablecoin market data
  • Yields - Yield farming & lending rates 🔐
  • Volumes - DEX & derivatives volume
  • Fees - Protocol fees & revenue
  • Emissions - Token unlock schedules 🔐
  • Bridges - Cross-chain bridge data 🔐
  • Ecosystem - Categories, oracles, treasuries 🔐
  • ETFs - Bitcoin & Ethereum ETF data 🔐
  • DAT - Digital Asset Treasury data 🔐
  • Account - API usage management 🔐

🔐 = Requires Pro API key


TVL

Total Value Locked data for protocols and chains.

getProtocols

Get all protocols with current TVL.

const protocols = await client.tvl.getProtocols();
// Returns: Protocol[]

getProtocol

Get detailed protocol information including historical TVL.

const aave = await client.tvl.getProtocol("aave");
// Returns: ProtocolDetails

getTvl

Get only current TVL for a protocol.

const tvl = await client.tvl.getTvl("uniswap");
// Returns: number

getChains

Get current TVL for all chains.

const chains = await client.tvl.getChains();
// Returns: Chain[]

getHistoricalChainTvl

Get historical TVL data.

// All chains combined
const allHistory = await client.tvl.getHistoricalChainTvl();

// Specific chain
const ethHistory = await client.tvl.getHistoricalChainTvl("Ethereum");

getTokenProtocols 🔐

Get protocols holding a specific token.

const holders = await proClient.tvl.getTokenProtocols("ETH");
// Returns: TokenProtocolHolding[]

getInflows 🔐

Get token inflows/outflows between timestamps.

const inflows = await proClient.tvl.getInflows(
  "lido",
  1704067200, // start timestamp
  1704153600, // end timestamp
  "ETH,USDC" // optional tokens to exclude
);

getChainAssets 🔐

Get asset breakdown for all chains.

const assets = await proClient.tvl.getChainAssets();
// Returns: ChainAssetsResponse

Prices

Token price data and historical charts.

getCurrentPrices

Get current prices for multiple tokens.

const prices = await client.prices.getCurrentPrices([
  "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
  "coingecko:bitcoin",
  "solana:So11111111111111111111111111111111111111112", // SOL
]);
// Returns: CoinPricesResponse

getHistoricalPrices

Get prices at a specific timestamp.

const prices = await client.prices.getHistoricalPrices(1704067200, [
  "ethereum:0xdac17f958d2ee523a2206206994597c13d831ec7",
]);

getBatchHistoricalPrices

Get multiple historical price points in one request.

const prices = await client.prices.getBatchHistoricalPrices({
  "ethereum:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48": [
    1704067200, 1704153600, 1704240000,
  ],
});

getChart

Get price chart data at regular intervals.

const chart = await client.prices.getChart(["coingecko:ethereum"], {
  start: 1704067200,
  period: "1d",
  span: 30,
});

Options:

ParameterTypeDescription
startnumberUnix timestamp of earliest data point
endnumberUnix timestamp of latest data point
spannumberNumber of data points to return
periodstringDuration between points (e.g., "4h", "1d", "1W")
searchWidthstringTime range to search

getPercentageChange

Get percentage price change over a period.

const change = await client.prices.getPercentageChange(["coingecko:bitcoin"], {
  period: "24h",
});

getFirstPrices

Get the earliest recorded price for tokens.

const first = await client.prices.getFirstPrices([
  "ethereum:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
]);

getBlockAtTimestamp

Get the closest block to a given timestamp.

const block = await client.prices.getBlockAtTimestamp("ethereum", 1704067200);
// Returns: { height: number; timestamp: number }

Stablecoins

Stablecoin market cap and dominance data.

getStablecoins

Get all stablecoins with market cap.

const stables = await client.stablecoins.getStablecoins(true); // include prices
// Returns: StablecoinsResponse

getAllCharts

Get historical market cap for all stablecoins combined.

const charts = await client.stablecoins.getAllCharts();
// Returns: StablecoinChartDataPoint[]

getChartsByChain

Get historical market cap for stablecoins on a specific chain.

const ethCharts = await client.stablecoins.getChartsByChain("Ethereum");

getStablecoin

Get detailed stablecoin information.

const usdt = await client.stablecoins.getStablecoin("1"); // USDT
const usdc = await client.stablecoins.getStablecoin("2"); // USDC

getChains

Get current stablecoin market cap for all chains.

const chains = await client.stablecoins.getChains();
// Returns: StablecoinChainMcap[]

getPrices

Get historical prices for all stablecoins.

const prices = await client.stablecoins.getPrices();

getDominance 🔐

Get stablecoin dominance data for a chain.

const dominance = await proClient.stablecoins.getDominance("ethereum", 1);

Yields 🔐

Yield farming, lending, staking, and perpetual funding rates. All endpoints require Pro API key.

getEarn

Get all earn pools (pools with at least $10K supplied).

const { as_of, data } = await proClient.yields.getEarn();
// Returns: { as_of?: string; data: EarnPool[] }
const pool = data[0];
pool.protocol; // "Aave V3" (display name, not a slug)
pool.apy.current.total; // also apy.avg_7d / apy.avg_30d, each { base, reward, total }
pool.underlying_tokens; // [{ address, symbol, decimals }]

queryEarn

Filter and paginate earn pools server-side. chain and protocol are slugs (up to 20 values each); rows are sorted by TVL descending.

const { data, pagination } = await proClient.yields.queryEarn({
  chain: ["ethereum", "arbitrum"],
  protocol: "aave-v3",
  stablecoin: true, // also single_asset_exposure, impermanent_loss_risk
  min_tvl: 1_000_000,
  limit: 100, // 1-300, default 100
  page: 1,
});
// Returns: { data: EarnPool[]; pagination: { total; page; limit } }

getEarnHistory

Get daily TVL/APY history for an earn pool. range is "30d", "90d" or "max" (default).

const { data } = await proClient.yields.getEarnHistory("747c1d2a-c668-4682-b9f9-296708a3dd90", "30d");
// Returns: { data: EarnHistoryPoint[] } — { date, tvl_usd, apy: { avg_1d, avg_7d, avg_30d }, ... }

getBorrowMarkets

Get all borrow markets with supply APY, borrow cost, LTV, and liquidity.

const { data } = await proClient.yields.getBorrowMarkets();
// Returns: { as_of?: string; data: BorrowMarket[] }

getBorrowMarketHistory

Get daily borrow-side history for a market. range is "30d", "90d" or "max" (default).

const { data } = await proClient.yields.getBorrowMarketHistory("e880e828-ca59-4ec6-8d4f-27182a4dc23d", "90d");
// Returns: { data: BorrowMarketHistoryPoint[] }

getPerpFundingRates

Get perpetual futures funding rates, open interest and index price (Binance and OKX).

const perps = await proClient.yields.getPerpFundingRates();
// Returns: { status: string; data: PerpPool[] }

getLstRates

Get liquid staking token exchange rates.

const lstRates = await proClient.yields.getLstRates();
// Returns: LsdRate[]

Volumes

DEX, options, and derivatives trading volume data.

getDexOverview

Get overview of all DEX volume data.

const overview = await client.volumes.getDexOverview();

// With options
const overview = await client.volumes.getDexOverview({
  excludeTotalDataChart: true,
  dataType: "dailyVolume",
});

getDexOverviewByChain

Get DEX volume for a specific chain.

const ethVolume = await client.volumes.getDexOverviewByChain("Ethereum");

getDexSummary

Get summary for a specific DEX protocol.

const uniswap = await client.volumes.getDexSummary("uniswap");

getOptionsOverview

Get overview of options volume data.

const options = await client.volumes.getOptionsOverview();

getOptionsOverviewByChain

Get options volume for a specific chain.

const ethOptions = await client.volumes.getOptionsOverviewByChain("Ethereum");

getOptionsSummary

Get summary for a specific options protocol.

const derive = await client.volumes.getOptionsSummary("derive");

getDerivativesOverview 🔐

Get overview of derivatives volume data.

const derivatives = await proClient.volumes.getDerivativesOverview();

getDerivativesSummary 🔐

Get summary for a specific derivatives protocol.

const gmx = await proClient.volumes.getDerivativesSummary("gmx");

getDexMetrics 🔐

Get summary of DEX metrics with protocol list (no charts).

const metrics = await proClient.volumes.getDexMetrics();

// With data type
const metrics = await proClient.volumes.getDexMetrics({
  dataType: "dailyVolume",
});

getDexMetricsByProtocol 🔐

Get DEX metrics for a specific protocol.

const uniswap = await proClient.volumes.getDexMetricsByProtocol("uniswap");

getDerivativesMetrics 🔐

Get summary of derivatives metrics with protocol list (no charts).

const metrics = await proClient.volumes.getDerivativesMetrics();

getDerivativesMetricsByProtocol 🔐

Get derivatives metrics for a specific protocol.

const hyperliquid = await proClient.volumes.getDerivativesMetricsByProtocol(
  "hyperliquid"
);

getOptionsMetrics 🔐

Get summary of options metrics with protocol list (no charts).

const metrics = await proClient.volumes.getOptionsMetrics();

getOptionsMetricsByProtocol 🔐

Get options metrics for a specific protocol.

const hegic = await proClient.volumes.getOptionsMetricsByProtocol("hegic");

Fees

Protocol fees and revenue data.

Fee Data Types

import { FeeDataType } from "@defillama/api";

FeeDataType.DAILY_FEES; // "dailyFees"
FeeDataType.DAILY_REVENUE; // "dailyRevenue"
FeeDataType.DAILY_USER_FEES; // "dailyUserFees"
FeeDataType.DAILY_HOLDERS_REVENUE; // "dailyHoldersRevenue"
FeeDataType.DAILY_CREATOR_REVENUE; // "dailyCreatorRevenue"
FeeDataType.DAILY_SUPPLY_SIDE_REVENUE; // "dailySupplySideRevenue"
FeeDataType.DAILY_PROTOCOL_REVENUE; // "dailyProtocolRevenue"
FeeDataType.DAILY_BRIBES_REVENUE; // "dailyBribesRevenue"
FeeDataType.DAILY_TOKEN_TAXES; // "dailyTokenTaxes"
FeeDataType.DAILY_APP_FEES; // "dailyAppFees"
FeeDataType.DAILY_APP_REVENUE; // "dailyAppRevenue"

getOverview

Get fees overview across all protocols.

const fees = await client.fees.getOverview();

// With data type
const revenue = await client.fees.getOverview({
  dataType: FeeDataType.DAILY_REVENUE,
});

getOverviewByChain

Get fees overview for a specific chain.

const ethFees = await client.fees.getOverviewByChain("Ethereum");

getSummary

Get fees summary for a specific protocol.

const uniswapFees = await client.fees.getSummary("uniswap");

getChart 🔐

Get historical fees chart.

const chart = await proClient.fees.getChart();

// For specific chain
const ethChart = await proClient.fees.getChartByChain("Ethereum");

// For specific protocol
const protocolChart = await proClient.fees.getChartByProtocol("aave");

getChartByProtocolChainBreakdown 🔐

Get fees breakdown by chain within a protocol.

const breakdown = await proClient.fees.getChartByProtocolChainBreakdown("aave");

getChartByProtocolVersionBreakdown 🔐

Get fees breakdown by version within a protocol.

const breakdown = await proClient.fees.getChartByProtocolVersionBreakdown(
  "uniswap"
);

getChartByChainProtocolBreakdown 🔐

Get fees breakdown by protocol within a chain.

const breakdown = await proClient.fees.getChartByChainProtocolBreakdown(
  "Ethereum"
);

getChartChainBreakdown 🔐

Get fees breakdown by chain across all protocols.

const breakdown = await proClient.fees.getChartChainBreakdown();

getMetrics 🔐

Get fees metrics.

const metrics = await proClient.fees.getMetrics();
const chainMetrics = await proClient.fees.getMetricsByChain("Ethereum");
const protocolMetrics = await proClient.fees.getMetricsByProtocol("aave");

Emissions 🔐

Token unlock schedules and vesting data. All endpoints require Pro API key.

getAll

Get all tokens with unlock schedules.

const emissions = await proClient.emissions.getAll();
// Returns: EmissionToken[]

Each token includes:

  • Emission events and schedules
  • Circulating supply metrics
  • Next unlock event
  • Daily unlock rate
  • Market cap data

getByProtocol

Get detailed vesting schedule for a specific protocol.

const arbitrum = await proClient.emissions.getByProtocol("arbitrum");
// Returns: EmissionDetailResponse

Response includes:

  • documentedData - Emission timeline with category breakdown
  • metadata - Sources, events, notes
  • supplyMetrics - Max supply, adjusted supply
  • categories - Allocation categories and sections
  • unlockUsdChart - Historical unlock values in USD

Bridges 🔐

Cross-chain bridge volume and transaction data. All endpoints require Pro API key.

getAll

Get all bridges with volume data.

const bridges = await proClient.bridges.getAll();

// Include chain breakdown
const bridges = await proClient.bridges.getAll({ includeChains: true });

getById

Get detailed bridge information.

const bridge = await proClient.bridges.getById(1);
// Returns: BridgeDetail with volume breakdown, tx counts, chain breakdown

getVolumeByChain

Get bridge volume for a specific chain.

const volume = await proClient.bridges.getVolumeByChain("Ethereum");
// Returns: BridgeVolumeDataPoint[]

getDayStats

Get day statistics for bridges on a specific chain.

const stats = await proClient.bridges.getDayStats(1704067200, "Ethereum");
// Returns token and address statistics

getTransactions

Get bridge transactions.

const txs = await proClient.bridges.getTransactions(1, {
  limit: 100,
  startTimestamp: 1704067200,
  endTimestamp: 1704153600,
  sourceChain: "Ethereum",
  address: "0x...",
});

Ecosystem 🔐

Ecosystem-level data. All endpoints require Pro API key.

getCategories

Get TVL grouped by protocol category.

const categories = await proClient.ecosystem.getCategories();
// Returns historical chart, category mappings, market share percentages

getForks

Get protocol fork relationships and TVL.

const forks = await proClient.ecosystem.getForks();
// Returns forks list with parent protocol mappings

getOracles

Get oracle usage data across protocols.

const oracles = await proClient.ecosystem.getOracles();
// Returns oracle TVL, protocol counts, dominance metrics

getEntities

Get company/VC/fund treasury and holdings data.

const entities = await proClient.ecosystem.getEntities();
// Returns: Entity[]

getTreasuries

Get protocol treasury balances.

const treasuries = await proClient.ecosystem.getTreasuries();
// Returns: Treasury[]

getHacks

Get security incidents and exploits database.

const hacks = await proClient.ecosystem.getHacks();
// Returns: Hack[] with date, amount, technique, classification

getRaises

Get funding rounds database.

const raises = await proClient.ecosystem.getRaises();
// Returns: { raises: Raise[] }

ETFs 🔐

Bitcoin and Ethereum ETF data. All endpoints require Pro API key.

getOverview

Get Bitcoin ETF overview.

const btcEtfs = await proClient.etfs.getOverview();
// Returns: EtfOverviewItem[]

getOverviewEth

Get Ethereum ETF overview.

const ethEtfs = await proClient.etfs.getOverviewEth();

getHistory

Get Bitcoin ETF flow history.

const history = await proClient.etfs.getHistory();
// Returns: EtfHistoryItem[]

getHistoryEth

Get Ethereum ETF flow history.

const history = await proClient.etfs.getHistoryEth();

getFdvPerformance

Get FDV performance data.

const perf = await proClient.etfs.getFdvPerformance("30");
// period: "7" | "30" | "ytd" | "365"

DAT 🔐

Digital Asset Treasury data and institutional holdings. All endpoints require Pro API key.

getInstitutions

Get comprehensive DAT data for all institutions.

const data = await proClient.dat.getInstitutions();
// Returns metadata, holdings by asset, mNAV data

getInstitution

Get detailed DAT data for a specific institution.

const mstr = await proClient.dat.getInstitution("MSTR");
// Returns holdings, flows, mNAV, stats, OHLCV, transactions

Account 🔐

API account management. Requires Pro API key.

getUsage

Get API usage statistics.

const usage = await proClient.account.getUsage();
// Returns: { creditsLeft: number }

Error Handling

The SDK provides custom error classes for different scenarios:

import {
  DefiLlamaError,
  ApiKeyRequiredError,
  RateLimitError,
  NotFoundError,
  ApiError,
} from "@defillama/api";

try {
  const data = await client.yields.getEarn();
} catch (error) {
  if (error instanceof ApiKeyRequiredError) {
    console.log("Pro API key required for this endpoint");
  } else if (error instanceof RateLimitError) {
    console.log(`Rate limited. Retry after ${error.retryAfter} seconds`);
  } else if (error instanceof NotFoundError) {
    console.log("Resource not found");
  } else if (error instanceof ApiError) {
    console.log(`API error: ${error.statusCode} - ${error.message}`);
  }
}

Type Exports

All types are exported from the main package:

import type {
  // TVL
  Protocol,
  ProtocolDetails,
  Chain,
  TokenProtocolHolding,

  // Prices
  CoinPrice,
  CoinPricesResponse,
  ChartOptions,

  // Stablecoins
  Stablecoin,
  StablecoinDetails,

  // Yields
  EarnPool,
  EarnHistoryPoint,
  EarnQueryParams,
  BorrowMarket,
  BorrowMarketHistoryPoint,
  PerpPool,
  LsdRate,
  YieldPool, // deprecated (v1)
  BorrowPool, // deprecated (v1)

  // Volumes
  DexOverviewResponse,
  DexSummaryResponse,
  DexMetricsResponse,
  DexMetricsByProtocolResponse,
  DerivativesMetricsResponse,
  DerivativesMetricsByProtocolResponse,
  OptionsMetricsResponse,
  OptionsMetricsByProtocolResponse,

  // Fees
  FeesOverviewResponse,
  FeesSummaryResponse,

  // Emissions
  EmissionToken,
  EmissionDetailResponse,

  // Bridges
  BridgeSummary,
  BridgeDetail,
  BridgeTransaction,

  // Ecosystem
  Entity,
  Treasury,
  Hack,
  Raise,

  // ETFs
  EtfOverviewItem,
  EtfHistoryItem,

  // DAT
  DatInstitutionsResponse,
  DatInstitutionResponse,

  // Config
  DefiLlamaConfig,
} from "@defillama/api";

Constants

import { AdapterType, FeeDataType, VolumeDataType } from "@defillama/api";

// Adapter Types
AdapterType.DEXS; // "dexs"
AdapterType.FEES; // "fees"
AdapterType.AGGREGATORS; // "aggregators"
AdapterType.DERIVATIVES; // "derivatives"
AdapterType.AGGREGATOR_DERIVATIVES; // "aggregator-derivatives"
AdapterType.OPTIONS; // "options"
AdapterType.BRIDGE_AGGREGATORS; // "bridge-aggregators"
AdapterType.OPEN_INTEREST; // "open-interest"

// Volume Data Types
VolumeDataType.DAILY_VOLUME; // "dailyVolume"
VolumeDataType.DAILY_NOTIONAL_VOLUME; // "dailyNotionalVolume"
VolumeDataType.DAILY_PREMIUM_VOLUME; // "dailyPremiumVolume"
VolumeDataType.DAILY_BRIDGE_VOLUME; // "dailyBridgeVolume"
VolumeDataType.OPEN_INTEREST_AT_END; // "openInterestAtEnd"
VolumeDataType.SHORT_OPEN_INTEREST_AT_END; // "shortOpenInterestAtEnd"
VolumeDataType.LONG_OPEN_INTEREST_AT_END; // "longOpenInterestAtEnd"

Requirements

  • Node.js >= 18.0.0
  • TypeScript 5.x (for TypeScript users)

License

MIT

版本与发布记录

@defillama/api 共发布 5 个版本,首次发布于 2026/01/19;过去 12 个月发布了 5 个版本。

版本发布日期距今
0.1.5latest2026/11/047 天前
0.1.32026/02/109 个月前
0.1.22026/02/099 个月前
0.1.12026/02/069 个月前
0.1.02026/01/199 个月前

关于 @defillama/api 的常见问题

@defillama/api 是什么?

TypeScript SDK for DefiLlama API

如何安装 @defillama/api?

在项目目录运行 npm install @defillama/api,或使用 pnpm add / yarn add / bun add。

@defillama/api 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@defillama/api 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@defillama/api 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=18.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@defillama/api 可以商用吗?

@defillama/api 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@defillama/api 的下载量有多少?

根据 npm 官方下载统计,@defillama/api 在 2026/10/12 – 2026/11/10 这 30 天内被下载 3,569 次,日均约 119 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@defillama/api 还在维护吗?

最新版本 0.1.5 发布于 2026/11/04(7 天前);至今共发布 5 个版本,其中过去 12 个月发布了 5 个;首次发布于 2026/01/19。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。