# txinfo

## txinfo

<mark style="color:green;">`POST`</mark> `http://dev.whitehat.co.kr/agent/v1/txinfo`

API that can search the whole list of transaction or with a given search condition

#### Headers

| Name              | Type   | Description                                  |
| ----------------- | ------ | -------------------------------------------- |
| X-AGENT-API-TOKEN | string | required \[token for searching the Agent API |

#### Request Body

| Name     | Type   | Description                                    |
| -------- | ------ | ---------------------------------------------- |
| blockNum | string | block number on the blockchain                 |
| from     | string | from account                                   |
| to       | string | to account                                     |
| txId     | string | transaction Id on the blockchain               |
| limit    | string | number of items to get at a time (default: 10) |
| page     | string | current page number (default: 1)               |

{% tabs %}
{% tab title="200 code: response success /fail
message: response message in accordance with success/fail
data.totalCount: total number of searched list of transaction
data.list: searched list of transaction  " %}

```
{
  "code": 200,
  "message": "Success",
  "data": {
    "totalCount": 3,
    "list": [
      {
        "_id": "135975925C2BA04032347B2CB5B3EF132DF92DAD87181039A32B6FEB541995A2F4F483D7",
        "blockNum": "1359759",
        "from": "agent1",
        "to": "eosio.ram",
        "quantity": 15,
        "memo": "buy ram",
        "txId": "25C2BA04032347B2CB5B3EF132DF92DAD87181039A32B6FEB541995A2F4F483D",
        "txStatus": "executed",
        "blockTime": "2020-06-19T03:48:54.000Z",
        "actionOrdinal": 7
      },
      {
        "_id": "135975925C2BA04032347B2CB5B3EF132DF92DAD87181039A32B6FEB541995A2F4F483D9",
        "blockNum": "1359759",
        "from": "agent1",
        "to": "eosio.ramfee",
        "quantity": 1,
        "memo": "ram fee",
        "txId": "25C2BA04032347B2CB5B3EF132DF92DAD87181039A32B6FEB541995A2F4F483D",
        "txStatus": "executed",
        "blockTime": "2020-06-19T03:48:54.000Z",
        "actionOrdinal": 9
      },
      {
        "_id": "135975925C2BA04032347B2CB5B3EF132DF92DAD87181039A32B6FEB541995A2F4F483D12",
        "blockNum": "1359759",
        "from": "agent1",
        "to": "eosio.stake",
        "quantity": 2,
        "memo": "stake bandwidth",
        "txId": "25C2BA04032347B2CB5B3EF132DF92DAD87181039A32B6FEB541995A2F4F483D",
        "txStatus": "executed",
        "blockTime": "2020-06-19T03:48:54.000Z",
        "actionOrdinal": 12
      }
    ]
  }
}
```

{% endtab %}
{% endtabs %}

#### Request Parameter example (JSON)

```javascript
{
  "query": {
     "blockNum": "1359759"
  },
  "limit": 10,
  "page": 1
}
```
