v2

latestOpenAPI 3.1.0Commercial API license2026-08-01592492.6 KB
convert

Convert between metals, currencies, and units

Convert an amount between metals, currencies, and units.

  • metal → currency: spot price in that currency via FX cross through USD
  • currency → metal: inverse of the above
  • metal → metal: ratio of USD spot prices
  • currency → currency: FX cross through USD (live raw_exchangerate_fx first, raw_frankfurter daily-ECB fallback)

Two-leg source skew: currency → currency conversions resolve EACH leg independently through the live-first/daily-fallback chain, so the two legs can come from different sources and ages (e.g. a live EUR rate crossed with a daily-ECB THB rate). The response timestamp reflects the to leg only — the from leg's timestamp is discarded — so it can understate (or overstate) the age of the other half of the cross. Both legs share the USD anchor, so cross drift is bounded by the staleness of the older leg — never compounded.

The unit param applies to the metal side only (oz / gram / kg). Historical conversion via date is not supported; use /v1/bars + /v1/prices/history for historical spot data.

get/v1/convert

Query parameters

fromstring required

Source symbol: XAU, XAG, USD, EUR, …

Source symbol: XAU, XAG, USD, EUR, …

tostring required

Target symbol: USD, EUR, XAU, …

Target symbol: USD, EUR, XAU, …

amountnumber

Amount to convert (default 1).

Amount to convert (default 1).

unitstring

Unit for the metal side: oz | gram | kg (default oz).

Unit for the metal side: oz | gram | kg (default oz).

Response

Successful Response

fromstring required

Source symbol (e.g. XAU, USD).

tostring required

Target symbol (e.g. USD, EUR).

amountstring required

Input amount.

ratestring required

Conversion rate (1 from-unit = rate to-units).

resultstring required

amount x rate.

unitstring required

Unit applied to the metal side (oz, gram, kg).

timestampstring required

UTC ISO-8601 timestamp of the source data. For currency-to-currency conversions the two FX legs resolve independently (live-first with daily fallback) and may differ in source/age; this reflects one leg only.