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

# FX

> Currency exchange rates and the ISO 4217 currency catalog.

The `fx` namespace serves currency exchange: latest rates, pair conversions, enriched pairs, and history, plus the ISO 4217 currency catalog. Use it to resolve prices into a traveler's currency and to keep an FX rate set for pricing.

FX requires the `data:fx:read` scope.

```ts theme={null}
import { createVoyantDataClient } from "@voyant-travel/data-sdk";

const client = createVoyantDataClient({ apiKey: process.env.VOYANT_API_KEY! });
```

## Rates and conversions

```ts theme={null}
// Latest rates for a base currency
const latest = await client.fx.latest("USD");

// Convert an amount between two currencies
const converted = await client.fx.pair("EUR", "USD", 100);

// Enriched pair detail
const enriched = await client.fx.enriched("EUR", "USD");

// Historical rate for a specific day
const historical = await client.fx.history({
  base: "EUR",
  year: 2026,
  month: 1,
  day: 15,
  amount: 100,
});
```

## Catalog and quota

```ts theme={null}
const codes = await client.fx.codes();   // supported currency codes
const quota = await client.fx.quota();    // your remaining FX quota
```

## Types

Key types: `FxLatestResponse`, `FxPairResponse`, `FxEnrichedResponse`, `FxHistoryResponse`, `FxCodesResponse`, `FxQuotaResponse`, `CurrencyEntry`.

<Tip>
  Keep money in integer minor units paired with a currency, as the rest of the platform does, and use FX only to present or convert. See [Data model](/docs/concepts/how-it-is-built).
</Tip>
