# 地址活動

查詢地址的鏈上活動：交易、交易對手、歷史餘額、總覽。這幾支為 **POST**，body 為 JSON， 每次成功扣 **5 credit**，回應包在 `{ data, meta }` 信封。

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

## 交易列表

```bash
curl -X POST https://api.atlantis.example/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": {
    "blockchain": "tron",
    "address": "TMuA6YqfCeX8EhbfYEg5y7S4DqzSJireY9",
    "transactions": [
      { "tx_hash": "8B5E...", "symbol": "usdt", "txn_type": "token", "direction": "To",
        "amount": "2", "timestamp": 1764517689000, "block_number": 78657680, "fee": 0 }
    ],
    "has_more": true
  },
  "meta": { "request_id": "..." }
}
```

## 交易對手排行

```bash
curl -X POST https://api.atlantis.example/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.atlantis.example/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.atlantis.example/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.atlantis.example/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.atlantis.example/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      |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.blockchainsecurity.asia/documentation/zi-liao-api/address-activity.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
