> For the complete documentation index, see [llms.txt](https://docs.blockchainsecurity.asia/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.blockchainsecurity.asia/documentation/on-chain-data/address-activity.md).

# 地址活動查詢

查詢單一地址的鏈上活動，包括交易列表、交易對手、歷史餘額與地址總覽。相關端點皆使用 POST，request body 為 JSON；成功回應扣除 5 credits，結果以 { data, meta } 信封回傳。

{% hint style="info" %}
帶 `symbols`（如 `["trx","usdt"]`）或 `contracts`（合約清單）指定要看的幣；省略則由平台依登錄處理。`start_time` / `end_time` 為 unix 秒。
{% endhint %}

## 交易列表

```bash
curl -X POST https://api.blockchainsecurity.asia/v1/transactions \
  -H "X-API-Key: ak_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "blockchain": "tron",
    "address": "TMuA6YqfCeX8EhbfYEg5y7S4DqzSJireY9",
    "symbols": ["trx","usdt"],
    "direction": "All",
    "limit": 20,
    "page": 0
  }'
```

```json
{
  "data": {
    "chain": "tron",
    "address": "TMuA6YqfCeX8EhbfYEg5y7S4DqzSJireY9",
    "transactions": [
      { "tx_hash": "8b5e...", "txn_type": "token", "amount": 2.0, "value": "2",
        "timestamp": 1764517689, "fee": 0,
        "from": { "address": "TEPS...", "chain": "tron" },
        "to": { "address": "TMuA...", "chain": "tron" } }
    ],
    "page": 0,
    "limit": 20,
    "is_next_page": true
  },
  "meta": { "request_id": "..." }
}
```

## 交易對手排行

```bash
curl -X POST https://api.blockchainsecurity.asia/v1/counterparty \
  -H "X-API-Key: ak_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "blockchain": "tron",
    "address": "TMuA6YqfCeX8EhbfYEg5y7S4DqzSJireY9",
    "sort": "total_amount",
    "order": "desc",
    "limit": 50,
    "page": 1
  }'
```

```json
{
  "data": {
    "datas": [
      { "address": "TAUN6Fwr...", "total_count": 158, "sent_count": 20, "received_count": 138,
        "total_amount": 38038188656.7, "first_activity": 1533891705, "last_activity": 1630148922 }
    ],
    "pagination": { "limit": 50, "page": 1, "has_more": true }
  },
  "meta": { "request_id": "..." }
}
```

## 兩地址之間的交易明細

```bash
curl -X POST https://api.blockchainsecurity.asia/v1/counterparty/transfer-between \
  -H "X-API-Key: ak_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "blockchain": "tron",
    "target": "TMuA6YqfCeX8EhbfYEg5y7S4DqzSJireY9",
    "counterparty": "TAUN6FwrnwwmaEqYcckffC7wYmbaS6cBiX"
  }'
```

## 兩地址聚合統計

```bash
curl -X POST https://api.blockchainsecurity.asia/v1/counterparty/overview \
  -H "X-API-Key: ak_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "blockchain": "tron",
    "target": "TMuA6YqfCeX8EhbfYEg5y7S4DqzSJireY9",
    "counterparty": "TAUN6FwrnwwmaEqYcckffC7wYmbaS6cBiX"
  }'
```

## 歷史餘額（每日）

回每日餘額變化與 `final_balance`。以單一資產為主（帶一個 `symbols`）。

```bash
curl -X POST https://api.blockchainsecurity.asia/v1/balance-history \
  -H "X-API-Key: ak_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "blockchain": "tron",
    "address": "TMuA6YqfCeX8EhbfYEg5y7S4DqzSJireY9",
    "symbols": ["trx"]
  }'
```

```json
{
  "data": {
    "blockchain": "tron",
    "address": "TMuA6YqfCeX8EhbfYEg5y7S4DqzSJireY9",
    "data_points": [
      { "index": "0", "balance": "28811576.136503", "received": "28811577.1", "sent": "1.0", "date": "20180810", "timestamp": 1533859200 }
    ],
    "final_balance": "35.216514",
    "symbol": "trx"
  },
  "meta": { "request_id": "..." }
}
```

## 地址總覽

```bash
curl -X POST https://api.blockchainsecurity.asia/v1/wallet-overview \
  -H "X-API-Key: ak_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "blockchain": "tron",
    "address": "TMuA6YqfCeX8EhbfYEg5y7S4DqzSJireY9"
  }'
```

## 端點與計費

| Method | 路徑                                  | 說明      | Credit |
| ------ | ----------------------------------- | ------- | ------ |
| `POST` | `/v1/transactions`                  | 交易列表    | 5      |
| `POST` | `/v1/counterparty`                  | 交易對手排行  | 5      |
| `POST` | `/v1/counterparty/transfer-between` | 兩地址交易明細 | 5      |
| `POST` | `/v1/counterparty/overview`         | 兩地址聚合統計 | 5      |
| `POST` | `/v1/balance-history`               | 歷史餘額    | 5      |
| `POST` | `/v1/wallet-overview`               | 地址總覽    | 5      |
