# History subscription Message query V2

## Description

* Description: Query history subscription detail
* Path: <https://api.blockin.ai/v2/subscribe/history/wallet/data>
* Encoding: UTF-8
* Method: HTTPS POST

## Request Header

<table><thead><tr><th width="156">Paremeter</th><th width="91">Type</th><th width="117">Required</th><th>Description</th></tr></thead><tbody><tr><td>Content-Type</td><td>String</td><td>Y</td><td>application/json</td></tr><tr><td>AccessKey</td><td>String</td><td>Y</td><td>AccessKey</td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="179">Parameter</th><th width="123">Type</th><th width="98">Required</th><th>Description</th></tr></thead><tbody><tr><td>subscriber</td><td>String</td><td>N</td><td>Subscriber</td></tr><tr><td>address</td><td>String</td><td>N</td><td>Address</td></tr><tr><td>start_timestamp</td><td>Long</td><td>Y</td><td>The query start time stamp is 1699598727000. The data within a maximum of 3 days can be queried</td></tr><tr><td>end_timestamp</td><td>Long</td><td>N</td><td>Query the end timestamp</td></tr><tr><td>page</td><td>Integer</td><td>N</td><td>The default number of pages is 1</td></tr><tr><td>page_size</td><td>Integer</td><td>N</td><td>The default number of queries per page is 10. The maximum number is 50</td></tr></tbody></table>

## Response

<table><thead><tr><th width="138">Parameter</th><th width="98">Type</th><th width="107">Required</th><th>Description</th></tr></thead><tbody><tr><td>success</td><td>Boolean</td><td>Y</td><td>Success Boolean</td></tr><tr><td>data</td><td>Object</td><td>N</td><td>Response data</td></tr><tr><td>error_code</td><td>String</td><td>N</td><td>Error code</td></tr><tr><td>error_msg</td><td>String</td><td>N</td><td>Error message</td></tr></tbody></table>

## Data Content

<table><thead><tr><th width="159">Parameter</th><th width="110">Type</th><th width="114">Required</th><th>Description</th></tr></thead><tbody><tr><td>total</td><td>Long</td><td>Y</td><td>total number</td></tr><tr><td>total_pages</td><td>Long</td><td>Y</td><td>Total page number</td></tr><tr><td>page</td><td>Long</td><td>Y</td><td>Current page number</td></tr><tr><td>page_size</td><td>Long</td><td>Y</td><td>Current page size</td></tr><tr><td>records</td><td>List</td><td>Y</td><td>Record detail</td></tr></tbody></table>

## Record Content

<table><thead><tr><th width="159">Parameter</th><th width="110">Type</th><th width="114">Required</th><th>Description</th></tr></thead><tbody><tr><td>subscriber</td><td>String</td><td>N</td><td>Subscriber</td></tr><tr><td>type</td><td>String</td><td>Y</td><td>Type: USER , TOKEN</td></tr><tr><td>address</td><td>String</td><td>Y</td><td>Address you want to query</td></tr><tr><td>send_no</td><td>String</td><td>Y</td><td>Unique ID sent</td></tr><tr><td>sent_time</td><td>String</td><td>Y</td><td>Send time</td></tr><tr><td>alias_list</td><td>List</td><td>N</td><td>The list of alias</td></tr><tr><td>data</td><td>Object</td><td>N</td><td>History data</td></tr></tbody></table>

## Alias\_list Content

<table><thead><tr><th width="156">Paremeter</th><th width="91">Type</th><th width="117">Required</th><th>Description</th></tr></thead><tbody><tr><td>subscriber</td><td>String</td><td>N</td><td>Subscriber</td></tr><tr><td>alias</td><td>String</td><td>Y</td><td>The alias of the address</td></tr></tbody></table>

## Request and Response Sample

curl -H "Content-Type:application/json" -H "AccessKey:1bdb01c947c54919b64d1fc6794atest" -X POST "<https://api.blockin.ai/v2/subscribe/history/wallet/data>" -d'{Request json}'

```
//query several addresses
Request json
{
   "subscriber": "0xdd3db40e569a28244790a9f58b59efc4efbbe937",
   "start_timestamp":1699599738,
   "page":1,
   "page_size":10
  }

Return json
{
    "success": true,
    "data": {
        "total": 4,
        "page": 1,
        "records": [
            {
                "subscriber": "444172c4d51f4b60a5caf20d22440959w",
                "send_no": "82023111015021789401681636347121",
                "address": "0xf89d7b9c864f589bbf53a82105107622b35eaa40",
                "sent_time": "1699599738",
                 "alias_list": [
                 {
                    "subscriber": "444172c4d51f4b60a5caf20d22440959w",
                    "alias": "AAAA"
                 }],                
                "data": {
                    "abi_list": [
                        {
                            "function_id": "executeFFsYo",
                            "function_name": "ExecuteFFsYo",
                            "function_param": "address,bytes",
                            "method_id": "0x78e111f6"
                        },
                        {
                            "function_id": "executeFFsYo",
                            "function_name": "ExecuteFFsYo",
                            "function_param": null,
                            "method_id": "0x78e111f6"
                        }
                    ],
                    "cex_list": null,
                    "chain_list": [
                        {
                            "chain_id": "1",
                            "chain_name": "Ethereum",
                            "is_evm": null,
                            "logo_url": "https://www.blockin.ai/image/chain/ethereum.png",
                            "native_token": "ETH",
                            "scan_logo_url": "https://www.blockin.ai/image/scan/ethereum.png",
                            "scan_tx_url": "https://www.etherscan.io/tx/"
                        }
                    ],
                    "collection_list": null,
                    "nft_item_list": null,
                    "protocol_list": [],
                    "token_list": [
                        {
                            "chain_name": "Ethereum",
                            "decimal": 18,
                            "logo_url": "https://www.blockin.ai/image/ethereum/token/eth.png",
                            "name": "ETH",
                            "symbol": "ETH",
                            "token_address": "ETH"
                        },
                        {
                            "chain_name": "Ethereum",
                            "decimal": 6,
                            "logo_url": "https://www.blockin.ai/image/ethereum/token/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.png",
                            "name": "USD Coin",
                            "symbol": "USDC",
                            "token_address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
                        },
                        {
                            "chain_name": "Ethereum",
                            "decimal": 18,
                            "logo_url": "https://www.blockin.ai/image/ethereum/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png",
                            "name": "Wrapped Ether",
                            "symbol": "WETH",
                            "token_address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
                        }
                    ],
                    "transaction_details": [
                        {
                            "amount": 2.067968E-12,
                            "block_height": 18973744,
                            "block_restructure": 0,
                            "block_time": 1704855803,
                            "cex_id": null,
                            "chain_name": "Ethereum",
                            "contract_address": "0x5050e08626c499411b5d0e0b5af0e83d3fd82edf",
                            "explain_action": "Swap",
                            "from_address": "0xbf2d5d8ebf05947245b3d7f38b2776a6a49710dd",
                            "function_name": "ExecuteFFsYo",
                            "gas_price": 31661069308,
                            "gas_used": 122825,
                            "internal_txns": null,
                            "is_scam": false,
                            "method_id": "0x78e111f6",
                            "nonce": 81681,
                            "price": 2346.4142790824703,
                            "protocol_name": null,
                            "receipt_status": 1,
                            "to_address": "0x5050e08626c499411b5d0e0b5af0e83d3fd82edf",
                            "token_address": "ETH",
                            "transaction_fee": 0.003888770837755100,
                            "transaction_index": 0,
                            "transaction_type": 2,
                            "transfer_logs": [
                                {
                                    "amount": 131.422744543485791934,
                                    "direction": 0,
                                    "from_address": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
                                    "price": 2346.4142790824703,
                                    "to_address": "0x5050e08626c499411b5d0e0b5af0e83d3fd82edf",
                                    "token_address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                                    "type": "token",
                                    "usd_value": 308372.2043930428717968852618925346,
                                    "value": "131422744543485791934"
                                },
                                {
                                    "amount": 308811.190231000000000000,
                                    "direction": 1,
                                    "from_address": "0x5050e08626c499411b5d0e0b5af0e83d3fd82edf",
                                    "price": 0.9996584931474636,
                                    "to_address": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
                                    "token_address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
                                    "type": "token",
                                    "usd_value": 308705.7290933961917147480916,
                                    "value": "308811190231"
                                }
                            ],
                            "tx": "0xd4f36beb512d8ec9c0f3a0ee81dce4849578620ed19184c72bcb29d48ce45e35",
                            "usd_value": 4.852309643885618E-9,
                            "value": 2067968
                        }
                    ]
                }
            }
        ],
        "total_pages": 4,
        "page_size": 1
    },
    "error_code": null,
    "error_msg": null
}



```


---

# 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.blockin.ai/reference/api-reference/subscription/history-subscription-message-query-v2.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.
