Usage
Parameters
Return Value
Returns aPromise<number> — the equivalent amount in USD.
Example
Exchange rates are fetched in real-time. Results may vary between calls.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Converts a currency amount to its USD equivalent using current exchange rates.
const usdAmount = await sdk.getUsdAmount(100, "MXN", bearerToken);
| 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 |
Promise<number> — the equivalent amount in USD.
const usdAmount = await sdk.getUsdAmount(500, "MXN", bearerToken);
console.log(`500 MXN = $${usdAmount} USD`);
Was this page helpful?
