# Convert an amount (/api/foreign-exchange/convert-amount)

`GET https://api.comecero.com/api/v1/fx/amount`

Converts an amount from one currency to another at today's rate, with the same rules your shop uses for prices (your markup and rounding in Settings, Pricing). Pass a `cart_id` or `invoice_id` to use the rate saved on that cart or invoice instead of today's. Secret and trusted tokens may call this. No permission is needed. Limited tokens are refused (`403`): use `GET /fx/product` in the browser.

## Parameters

- `amount` (query, required): The amount to convert, in `from_currency`. Must be more than 0.
- `from_currency` (query, required): The ISO 4217 code of the currency of `amount`.
- `to_currency` (query, required): The ISO 4217 code of the currency to convert to.
- `cart_id` (query): Use the exchange rate saved on this cart.
- `invoice_id` (query): Use the exchange rate saved on this invoice.
- `formatted` (query): When `true`, the object also has a `formatted` child with amounts and dates as display text in the shopper's language and currency (for example `$19.99` or `November 7, 2026`). The default is `false`. See [Localized formatting](https://docs.comecero.com/docs/basic-concepts/localized-formatting).
- `show` (query): Comma-separated fields to return; all others are left out. Use dot notation for child fields (`customer.email`). You cannot send `show` and `hide` together (`400`). See [Customizing output](https://docs.comecero.com/docs/basic-concepts/customizing-output).
- `hide` (query): Comma-separated fields to leave out of the response. Use dot notation for child fields (`customer.email`). You cannot send `show` and `hide` together (`400`). See [Customizing output](https://docs.comecero.com/docs/basic-concepts/customizing-output).

Responses: 200, 400, 401, 403, 404, 500.

Full schemas: operation `convert_amount` in /openapi.json.