> For the complete documentation index, see [llms.txt](https://beosinofficials-organization.gitbook.io/beosin-api-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://beosinofficials-organization.gitbook.io/beosin-api-documentation/api-endpoints/counterparty-transaction-query-v5.md).

# Counterparty Transaction Query V5

### Description

Query transactions between two addresses

### Basic Info

> * Request Method: POST
> * API URL: <https://api.beosin.com/api/v5/kyt/counterparty/tx>
> * Content-Type: application/json
> * Authentication: SIGN
> * Response Time: <30s
> * Return Data  Limit: <10000 items

### **Header** Request Parameter

<table><thead><tr><th width="150">Parameter</th><th width="193">Required Field (Y/N)</th><th width="157">Parameter Type</th><th width="250">Description</th></tr></thead><tbody><tr><td><a href="/beosin-api-documentation/getting-started/verification.md">APPID</a></td><td>Y</td><td>String</td><td>Unique authentication APPID assigned by KYT system</td></tr><tr><td><a href="/beosin-api-documentation/getting-started/verification.md">APP-SECRET</a></td><td>Y</td><td>String</td><td>Unique authentication APP-SECRET assigned by KYT system</td></tr></tbody></table>

### Query Parameter

| Parameter           | Required(Y/N) | Data Type     | Description                                                     |
| ------------------- | ------------- | ------------- | --------------------------------------------------------------- |
| from                | Y             | Object        | Sender address information                                      |
| from.chainId        | Y             | String        | Blockchain ID                                                   |
| from.address        | Y             | String        | Sender address hash                                             |
| from.tokenAddresses | Y             | List\<String> | List of token contract addresses                                |
| to                  | Y             | Object        | Receiver address information                                    |
| to.chainId          | Y             | String        | Blockchain ID                                                   |
| to.address          | Y             | String        | Receiver address hash                                           |
| to.tokenAddresses   | Y             | List\<String> | List of token contract addresses                                |
| page                | N             | Integer       | Page number, default: 1                                         |
| size                | N             | Integer       | Records per page, default: 10, maximum: 10000                   |
| sort                | N             | Object        | Sort fields and rules, default sort by time in descending order |
| sort.rule           | Y             | String        | asc、desc                                                        |
| sort.column         | Y             | String        | time、amount                                                     |

### Return Parameter

| Parameter                 | Data Type  | Description                         |
| ------------------------- | ---------- | ----------------------------------- |
| id                        | Number     | Return id                           |
| code                      | Integer    | Status code                         |
| msg                       | String     | Response message                    |
| data                      | Object     | Response data body                  |
| data.list                 | List       | Record list                         |
| data.list\[].hash         | String     | Transaction hash                    |
| data.list\[].time         | Integer    | Transaction timestamp               |
| data.list\[].quantity     | BigDecimal | Transaction quantity                |
| data.list\[].amount       | BigDecimal | Transaction amount                  |
| data.list\[].tokenAddress | String     | Token contract address              |
| data.list\[].tokenName    | String     | Token name                          |
| data.total                | Long       | Total number of records             |
| data.size                 | Integer    | Items per page                      |
| data.page                 | Integer    | Current page number                 |
| data.prev                 | Boolean    | Flag for previous page availability |
| data.next                 | Boolean    | Flag for next page availability     |
| data.pages                | Integer    | Total page count                    |

### Request Example

```
POST https://api.beosin.com/api/v5/kyt/counterparty/tx
{
    "from": {
        "address": "0xf2051f951fc97528e4b8eba5de056fa4ab9ac098",
        "chainId": "1",
        "tokenAddresses": [
            ""
        ]
    },
    "to": {
        "address": "0x48c2cc7e4a45202753befa8911cf2253a5d165b3",
        "chainId": "1",
        "tokenAddresses": [
            ""
        ]
    },
    "page": 1,
    "size": 10,
    "sort": {
        "rule": "desc",
        "column": "time"
    }
}

```

### Response Example

```json
{
    "id": 2071864046755426304,
    "code": 200,
    "msg": "success",
    "data": {
        "page": 1,
        "size": 10,
        "total": 2,
        "list": [
            {
                "hash": "0xccdc574ae41d1084548a5837b200ce11b63c6b98def7fd85cf2caf4dc2a3450b",
                "time": 1779915275,
                "quantity": 0.1067007041,
                "amount": 215.105251,
                "tokenAddress": "",
                "tokenName": "ETH"
            },
            {
                "hash": "0xad889542a82cd350a7fdce1cc91ef488dba7794930097d5c90204d2d828cec49",
                "time": 1779539903,
                "quantity": 0.1188029688,
                "amount": 239.503035,
                "tokenAddress": "",
                "tokenName": "ETH"
            }
        ],
        "next": false,
        "prev": false,
        "pages": 1
    }
}

```
