# VLRYToUSD

## Description

The `VLRYToUSD` function is a synchronous function that converts an amount from VLRY to USD based on a predefined exchange rate. The function takes a VLRY amount as input and calculates the equivalent amount in USD using the exchange rate.

## Parameters

| Parameter    | Data Type | Description                                |
| ------------ | --------- | ------------------------------------------ |
| `VLRYAmount` | number    | The amount in VLRY to be converted to USD. |

## Response

| Field    | Data Type | Description                                                                     |
| -------- | --------- | ------------------------------------------------------------------------------- |
| `code`   | Number    | A numeric value indicating the execution status (1 for success, 0 for error).   |
| `error`  | any       | The error object containing details about the encountered error, if applicable. |
| `result` | Object    | An object containing the converted amount in USD and the exchange rate.         |

## Example Request and Response

### Prerequisites

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:

<br>

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

### Request

Here is an example of how to make a `VLRYToUSD` request using the Volary SDK:<br>

```javascript
const { Nft } = require('@nest25/evm-chains-lib');

const nft = new Nft('testnet');

async function main() {
    const response = nft.VLRYToUSD(1);
    console.log("response", response);
}

main();

```

```sh
```

### Response

```sh
{ code: 1, result: { usdAmount: 0.15, vlryRate: 0.15 } }
```

### Use Cases

* **The `VLRYToUSD` function can be used to convert an amount from VLRY to USD**. For example, if you have an amount in VLRY and you want to know the equivalent value in USD, you can use this function. It calculates the conversion based on the predefined exchange rate and returns the converted amount along with the exchange rate.

&#x20;
