> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chipipay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# getUsdAmount

> Converts a currency amount to its USD equivalent using current exchange rates.

## Usage

```typescript theme={null}
const usdAmount = await sdk.getUsdAmount(100, "MXN", bearerToken);
```

## Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `currencyAmount` | `number` | Yes | The amount in the source currency |
| `currency` | `Currency` | Yes | The source currency code (e.g. `"MXN"`) |
| `bearerToken` | `string` | No | JWT token. Falls back to `apiSecretKey` if not provided |

## Return Value

Returns a `Promise<number>` — the equivalent amount in USD.

## Example

```typescript theme={null}
const usdAmount = await sdk.getUsdAmount(500, "MXN", bearerToken);
console.log(`500 MXN = $${usdAmount} USD`);
```

> [!NOTE]
>
> Exchange rates are fetched in real-time. Results may vary between calls.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.