# getLatestTxsOfAddress

## Description

The `getLatestTxsOfAddress` function is an asynchronous function used to retrieve the latest transactions of a list of addresses on the blockchain explorer.&#x20;

It retrieves the latest transactions of each address and returns a parsed result containing information such as transaction direction (sent or received), amount, wallet address, external address, USD amount, and transaction type.

## Parameters

| Parameter   | Data Type | Description                                                    |
| ----------- | --------- | -------------------------------------------------------------- |
| `addresses` | string\[] | An array of addresses to retrieve the latest transactions for. |

## Response

| Field    | Data Type | Description                                                                                                                                                           |
| -------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `code`   | number    | The response code indicating the success or failure of the operation.                                                                                                 |
| `result` | object\[] | An array of parsed transaction logs containing information such as transaction direction, amount, wallet address, external address, USD amount, and transaction type. |

## Example Request and Response

### Prerequisites&#x20;

Before making requests with Volary SDK, you must have it installed.

You can install Volary SDK using either **`npm`** or **`yarn`**. Use the following commands to install Volary SDK:

```sh
npm install @nest25/explorer-lib
OR
yarn add @nest25/explorer-lib
```

### Request

Here is an example of how to make a `getLatestTxsOfAddress` request using the Volary SDK:

{% code overflow="wrap" %}

```javascript
const {Explorer} = require("@nest25/explorer-lib")
const explorer = new Explorer('', 'testnet');


async function main (){
    const response = await explorer.getLatestTxsOfAddress(["0x13e5c9bA2Cf25a627340498168b47EAB6f685A6A"]);
    console.log("latest txs of a address", response);
}

main()
```

{% endcode %}

### Response

{% code overflow="wrap" %}

```sh
 { code: 1, result: [] }
```

{% endcode %}

## Use Cases

* **Retrieving latest transactions:** By invoking this function with the appropriate parameters, you can retrieve the latest transactions of a list of addresses on the blockchain explorer.
* **Address validation:** The function validates the addresses in the input array to ensure they are valid.
* **Sending HTTP requests:** The function sends HTTP requests to the blockchain explorer's API to fetch the latest transactions of each address.


---

# 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.volary.io/sdks-guide/blockchain-sdks/explorer-sdk/getlatesttxsofaddress.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.
