# ListAssetHistory

<mark style="color:green;">`POST`</mark> /api/list-asset-history

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `token`            |

#### Request Body

| Name            | Type   | Required | Description                                                                                                      |
| --------------- | ------ | -------- | ---------------------------------------------------------------------------------------------------------------- |
| wallet\_id      | string | true     | The end user's wallet id                                                                                         |
| occurred\_after | int64  | false    | Occurred after this Unix timestamp                                                                               |
| asset\_id       | string | false    | asset id(hex form) for TAP assets, (for btc assets the asset\_id is btc). If empty, all assets shall be returned |

#### Response Body

| Name     | Type   | Description                                             |
| -------- | ------ | ------------------------------------------------------- |
| op\_type | string | 0 out; 1 in                                             |
| pending  | bool   | false; true (indicating if the tx is included in block) |

#### Request Demo

```json
{
  "wallet_id": "10e21d53-82d3-43d6-99bc-03ea6945d902",
  "occurred_after":0
}
```

**Response Demo**

{% tabs %}
{% tab title="200" %}

```json
{
    "code": 0,
    "data": {
        "tx_histories": [
            {
                "timestamp": 1721854538,
                "tx_id": "b4e0d6a6fcb251378fd356504bede98ef769d7450e83b8be8333e98bc59014b8",
                "asset_id": "4ea437a417d3fe8bd735dacd3ad36bd6758dabcb7080f7528299d5a30e44e328",
                "amount": 100,
                "op_type": "0"
            },
            {
                "timestamp": 1721825649,
                "tx_id": "ca6197ee1302c0d483856e14337ece9373b3ec148adc6ec4f8aaf2c550a3b90f",
                "asset_id": "4ea437a417d3fe8bd735dacd3ad36bd6758dabcb7080f7528299d5a30e44e328",
                "amount": 700,
                "op_type": "1"
            },
            {
                "timestamp": 1721825438,
                "tx_id": "c95e629444449451582089c64e835316410dc9cd5539e2f44092a600b48c6f8a",
                "asset_id": "4ea437a417d3fe8bd735dacd3ad36bd6758dabcb7080f7528299d5a30e44e328",
                "amount": 800,
                "op_type": "1"
            },
            {
                "timestamp": 1721824876,
                "tx_id": "370fac49786be313f6bbe78aa7744c24bda911d3e6a71db8538afbcea5d9a9d2",
                "asset_id": "4ea437a417d3fe8bd735dacd3ad36bd6758dabcb7080f7528299d5a30e44e328",
                "amount": 3000,
                "op_type": "1"
            }
        ]
    },
    "message": "",
    "traceid": "98539813-a3f4-4846-a716-862c19ecf1fa"
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid request"
}
```

{% endtab %}
{% endtabs %}


---

# 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://doc.bittap.org/developer-guides/api-reference/listassethistory.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.
