收益 API
用于实时和历史收益率的加密收益 API。
一个类型化 API,提供跨 CeFi 和 DeFi 提供商的实时和历史借贷、质押、借款及稳定币收益数据——每个利率都附带新鲜度、来源和可信度信息,还包括免费层级和用于 AI 代理的 MCP 工具。
- 593
- 覆盖的资产
- 57
- 追踪的服务商
- 43,240
- 监测的利率
- 30,456
- 24小时内的更新次数
- 2m
- 中位数刷新频率
- 3s
- 最新供应商
具体字段,而非模糊声明。
每个响应都有类型和文档说明。这里是您可以查询的内容以及每个利率的具体信息。
数据类型
- 资产
- 提供者
- 借贷利率
- 质押奖励
- 借款利率
- 稳定币收益
每个利率信号
- 利率新鲜度
- 提供者 / 来源元数据
- 信心与验证状态
分类
- CeFi · DeFi · 流动质押
- 固定与灵活
- 基准利率与最高利率
// GET /api/v1/rates/USDC?category=lending { "data": { "symbol": "USDC", "rates": [ { "provider": "aave-v3", "symbol": "USDC", "category": "lending", "rate": 3.52686151, "metadata": { "mode": "aave_liquidity_rate", "method": "getReserveData", "source": "onchain_rate", "chainId": 1, "contract": "0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2" }, "lastUpdated": "2026-09-12T12:45:32.810Z", "coinId": "usd-coin", "providerSymbol": "USDC", "unitType": "percentage", "unitSymbol": "%", "ageSeconds": 20, "stale": false }, { "provider": "aqru", "symbol": "USDC", "category": "lending", "rate": 6, "metadata": null, "lastUpdated": "2026-09-12T12:45:28.814Z", "coinId": "usd-coin", "providerSymbol": "USDC", "unitType": "percentage", "unitSymbol": "%", "ageSeconds": 24, "stale": false }, { "provider": "nexo", "symbol": "USDC", "category": "lending", "rate": 10.5, "metadata": { "source": "nexo_earn_api", "duration": 90, "baseRate": 6.5, "flexRate": 6.5, "baseSymbol": "USDC", "cryptoName": "USD Coin", "hasFloorApy": false, "durationType": "fixed", "rewardsClaim": "automatic", "warmUpPeriod": { "type": "range", "numbers": [ 1, 1 ], "periods": [ "day", "day" ] }, "rewardsPayout": "automatic", "rewardFrequency": { "text": "daily", "type": "text" }, "minPurchaseAmount": "500.064413", "undelegationPeriod": { "text": "immediate", "type": "text" }, "flexProviderSymbol": "USDC-FLEX" }, "lastUpdated": "2026-09-12T12:40:58.132Z", "coinId": "usd-coin", "providerSymbol": "USDC-90D", "unitType": "percentage", "unitSymbol": "%", "ageSeconds": 295, "stale": false } ], "count": 15 } }
API返回的内容
真实响应,实时获取。
每个提供商对单个资产的费率,与 GET /api/v1/rates/:symbol 返回的完全相同。选择一行以查看实时 JSON 响应。
| 提供商 | 类别 | 费率 | 已更新 |
|---|---|---|---|
nexo BTC-180D | lending | 6.2 | Sep 12, 12:40 UTC |
justlend BTC | lending | 0.00477098 | Sep 12, 12:40 UTC |
spark BTC | lending | 0.00001325 | Sep 12, 12:40 UTC |
kamino WBTC | lending | 0.02364009 | Sep 12, 12:40 UTC |
youhodler BTC | lending | 7 | Sep 12, 12:40 UTC |
aave-v3 BTC | lending | 0.0037998 | Sep 12, 12:40 UTC |
aqru BTC | lending | 2.5 | Sep 12, 12:40 UTC |
nebeus BTC | lending | 12 | Sep 12, 12:40 UTC |
okx BTC | lending | 1.825 | Sep 12, 12:40 UTC |
gemini BTC | lending | 0.01 | Sep 12, 12:40 UTC |
bitfinex BTC | lending | 0.001 | Sep 12, 12:40 UTC |
euler-v2 WBTC | lending | 0.03749924 | Sep 12, 12:40 UTC |
{
"data": {
"symbol": "BTC",
"rates": [
{
"provider": "nexo",
"symbol": "BTC",
"category": "lending",
"rate": 6.2,
"metadata": {
"source": "nexo_earn_api",
"duration": 180,
"baseRate": 2.7,
"flexRate": 2.7,
"baseSymbol": "BTC",
"cryptoName": "Bitcoin",
"hasFloorApy": false,
"durationType": "fixed",
"rewardsClaim": "automatic",
"warmUpPeriod": {
"type": "range",
"numbers": [
1,
1
],
"periods": [
"day",
"day"
]
},
"rewardsPayout": "automatic",
"rewardFrequency": {
"text": "daily",
"type": "text"
},
"minPurchaseAmount": "0.001",
"undelegationPeriod": {
"text": "immediate",
"type": "text"
},
"flexProviderSymbol": "BTC-FLEX"
},
"lastUpdated": "2026-09-12T12:40:58.132Z",
"coinId": "bitcoin",
"providerSymbol": "BTC-180D"
}
],
"count": 12
}
}一个 API 涵盖所有费率类别。每个端点返回相同的规范化 JSON 模式,因此借贷、质押和按资产请求共享一个集成。
加密货币借贷费率 API
跨 CeFi 和 DeFi 的每项资产和提供商的实时借贷 APY,包含基础费率与最高费率、新鲜度和每个费率的数据源信号。
GET /api/v1/rates/{symbol}?category=lending比较实时借贷费率为推出收益功能的团队而制作。
跳过维护提供商集成 — 从一个类型化的 API 中提取经过验证的收益数据。
Yield API 是 Bitcompare 收益智能层的一个接口,由所有覆盖资产和提供商的历史利率数据支持。
复制粘贴集成食谱。
针对文档化REST端点的实用代码片段 — 最佳稳定币收益、质押奖励和借贷与借款利差。每个响应都带有新鲜度、来源和可信度,让您知道每个利率的新鲜程度。
各提供商最佳稳定币收益
获取所有覆盖提供商的实时USDC借贷利率,然后按APY排序,以找到最佳稳定币收益。
// Best stablecoin yield: fetch USDC lending rates, sort by rate const res = await fetch( "https://api.bitcompare.net/api/v1/rates/USDC?category=lending", { headers: { Authorization: `Bearer ${process.env.BITCOMPARE_API_KEY}` } } ) const { data } = await res.json() const best = data.rates.sort((a, b) => Number(b.rate) - Number(a.rate))[0]
{
"data": {
"symbol": "USDC",
"rates": [
{
"provider": "aave-v3",
"symbol": "USDC",
"category": "lending",
"rate": 3.52686151,
"metadata": {
"mode": "aave_liquidity_rate",
"method": "getReserveData",
"source": "onchain_rate",
"chainId": 1,
"contract": "0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2"
},
"lastUpdated": "2026-09-12T12:45:32.810Z",
"coinId": "usd-coin",
"providerSymbol": "USDC",
"unitType": "percentage",
"unitSymbol": "%",
"ageSeconds": 20,
"stale": false
},
{
"provider": "aqru",
"symbol": "USDC",
"category": "lending",
"rate": 6,
"metadata": null,
"lastUpdated": "2026-09-12T12:45:28.814Z",
"coinId": "usd-coin",
"providerSymbol": "USDC",
"unitType": "percentage",
"unitSymbol": "%",
"ageSeconds": 24,
"stale": false
}
],
"count": 15
}
}跟踪资产的质押奖励
查询ETH在各验证者和平台上的实时质押奖励,以监控您应用中的奖励利率。
# Track staking rewards for ETH curl -s "https://api.bitcompare.net/api/v1/rates/ETH?category=staking" \ -H "Authorization: Bearer $BITCOMPARE_API_KEY"
{
"data": {
"symbol": "ETH",
"rates": [
{
"provider": "binance-staked-eth",
"symbol": "ETH",
"category": "staking",
"rate": 2.2502774,
"metadata": {
"mode": "erc4626_price_delta",
"method": "exchangeRate",
"source": "onchain_rate",
"chainId": 1,
"contract": "0xa2E3356610840701BDf5611a53974510Ae27E2e1",
"elapsedSeconds": 605099
},
"lastUpdated": "2026-09-12T12:45:32.217Z",
"coinId": "ethereum",
"providerSymbol": "ETH",
"unitType": "percentage",
"unitSymbol": "%",
"ageSeconds": 21,
"stale": false
},
{
"provider": "stakin",
"symbol": "ETH",
"category": "staking",
"rate": 2.57,
"metadata": null,
"lastUpdated": "2026-09-12T12:40:59.818Z",
"coinId": "ethereum",
"providerSymbol": "ETH",
"unitType": "percentage",
"unitSymbol": "%",
"ageSeconds": 293,
"stale": false
}
],
"count": 10
}
}比较借贷利率
并排获取BTC的借贷利率,以揭示同一资产的收益与借款之间的差距。
// Compare BTC lending vs borrowing rates (one call per category) const [lending, borrowing] = await Promise.all( ["lending", "borrowing"].map((category) => fetch( `https://api.bitcompare.net/api/v1/rates/BTC?category=${category}`, { headers: { Authorization: `Bearer ${process.env.BITCOMPARE_API_KEY}` } } ).then((r) => r.json()) ) ) const spread = Number(borrowing.data.rates[0].rate) - Number(lending.data.rates[0].rate)
{
"data": {
"symbol": "BTC",
"rates": [
{
"provider": "nexo",
"symbol": "BTC",
"category": "lending",
"rate": 6.2,
"metadata": {
"source": "nexo_earn_api",
"duration": 180,
"baseRate": 2.7,
"flexRate": 2.7,
"baseSymbol": "BTC",
"cryptoName": "Bitcoin",
"hasFloorApy": false,
"durationType": "fixed",
"rewardsClaim": "automatic",
"warmUpPeriod": {
"type": "range",
"numbers": [
1,
1
],
"periods": [
"day",
"day"
]
},
"rewardsPayout": "automatic",
"rewardFrequency": {
"text": "daily",
"type": "text"
},
"minPurchaseAmount": "0.001",
"undelegationPeriod": {
"text": "immediate",
"type": "text"
},
"flexProviderSymbol": "BTC-FLEX"
},
"lastUpdated": "2026-09-12T12:40:58.132Z",
"coinId": "bitcoin",
"providerSymbol": "BTC-180D",
"unitType": "percentage",
"unitSymbol": "%",
"ageSeconds": 201,
"stale": false
},
{
"provider": "justlend",
"symbol": "BTC",
"category": "lending",
"rate": 0.00477098,
"metadata": null,
"lastUpdated": "2026-09-12T12:40:55.433Z",
"coinId": "bitcoin",
"providerSymbol": "BTC",
"unitType": "percentage",
"unitSymbol": "%",
"ageSeconds": 204,
"stale": false
}
],
"count": 12
}
}完整参数和架构请查看docs.bitcompare.net。
了解每个利率的新鲜度和可信度。
每个利率都带有新鲜度、来源和信心——让您可以信任您所发布的内容。
利率刷新频率
利率持续刷新,通常每5分钟一次,每个利率都带有新鲜度信号。
什么是“已验证”
已验证的利率是根据提供者自身的来源确认的,而不是估算的。
来源是如何捕获的
每个利率记录其来源类型——提供者API、合作伙伴数据源或人工审核。
信心信号的含义
信心标签标识利率的可靠性,以便您可以过滤低信心数据。
利率为何不同
利率因地区、资产、等级、锁定期、余额和提供者条款而异——在可用的情况下公开。
赞助与自然
赞助位置与自然利率数据明确分开,并且从不改变它。
集成所需的一切。
文档、架构和适合开发者及 AI 代理的界面。
常见问题
常见问题
- 是否有加密货币借贷费率 API?
- 是的。收益 API 为 590+ 项资产跨 55+ 个 CeFi 和 DeFi 提供商返回实时和历史借贷费率 — 例如 GET /api/v1/rates/USDC?category=lending — 具有每个费率的新鲜度和数据源信号。相同的数据支撑借贷费率比较页面。
- 是否有质押奖励 API?
- 是的。质押奖励费率从同一端点提供,使用 category=staking,覆盖验证者、交易所和流动质押提供商,规范化为与借贷和借出费率相同的 JSON 模式。
- 我能获取特定资产的加密货币利率吗?
- 可以。请求不带类别筛选的资产——例如 GET /api/v1/rates/ETH——会在一次调用中返回该资产的所有利率类别,包括借贷、质押和借款,并排显示,这正是大多数应用和 AI 代理在查看单个币种时所需的格式。
- API 是否涵盖 CeFi 和 DeFi?
- 可以。每个利率都被分类为 CeFi 或 DeFi,以及固定或浮动,因此你可以在一个响应中跨两者进行筛选或比较,无需整合来自不同来源的数据。
- AI 代理可以使用 Yield API 吗?
- 可以。REST API 具有公开的 OpenAPI 规范和免费层级,相同的数据层也以 MCP 工具的形式公开给代理——可通过托管的 MCP 端点或 @bitcompare/mcp-server npm 包进行连接。