---
title: WGO 链上接口
description: BTC、ETH 链上基础指标日线接口说明。
---

# 链上接口

```http
GET /api/wgo/v1/assets/{asset}/onchain
```

接口返回 BTC 或 ETH 的网络活动、供应量、费用和交易所资金流等日线指标。

| 参数 | 类型 | 默认值 | 约束 |
| --- | --- | --- | --- |
| `asset` | 路径字符串 | — | `BTC` 或 `ETH` |
| `start` | 查询日期 | 不传 | 包含边界，格式 `YYYY-MM-DD` |
| `end` | 查询日期 | 不传 | 包含边界，格式 `YYYY-MM-DD` |
| `limit` | 查询整数 | `365` | 1–5000 |

数据按 `metric_date` 倒序排列。

```bash
curl --fail --silent --show-error \
  -H "Authorization: Bearer ${MOBIUSQUANT_TOKEN}" \
  "https://api.mobiusquant.ai/api/wgo/v1/assets/BTC/onchain?limit=30"
```

## 响应示例

```json
{
  "asset": "BTC",
  "count": 1,
  "data": [
    {
      "asset": "BTC",
      "metric_date": "2026-08-22",
      "active_address_count": 634723,
      "address_with_balance_count": 56745653,
      "block_count": 148,
      "transaction_count": 709046,
      "transfer_count": 1037706,
      "fees_native": "3.0372742",
      "exchange_inflow_native": "19439.57718069",
      "exchange_outflow_native": "16684.13543387",
      "exchange_netflow_native": "2755.44174682",
      "exchange_supply_native": "2714042.92514466",
      "circulating_supply_native": "20073782.38473258",
      "issuance_native": "462.5",
      "hash_rate": "937551968.6517191285701026202708717412007967968",
      "source_eod_completed_at": "2026-08-23T02:57:28+00:00",
      "has_flash_data": true,
      "synced_at": "2026-08-23T14:45:10.215968+00:00"
    }
  ]
}
```

以上数值用于展示响应结构。

## 字段分组

| 分组 | 字段 |
| --- | --- |
| 网络活动 | `active_address_count`、`address_with_balance_count`、`block_count`、`transaction_count`、`transfer_count` |
| 原生资产经济活动 | `fees_native`、`issuance_native`、`circulating_supply_native` |
| 交易所余额流动 | `exchange_inflow_native`、`exchange_outflow_native`、`exchange_netflow_native`、`exchange_supply_native` |
| 网络安全 | 适用于该网络时返回 `hash_rate` |
| 数据状态 | `source_eod_completed_at`、`has_flash_data`、`synced_at` |

以 `_native` 结尾的字段使用 BTC 或 ETH 原生单位，不是美元。某个网络或日期不具备的
指标返回 `null`。

::: warning 临时观测值
`has_flash_data=true` 表示至少一个来源指标仍是临时值。存储时应允许同一日期的后续版本覆盖。
:::
