Prices

Convert between metals, currencies and units

Converts an amount between a metal, a currency and a mass unit: 10 g of gold in euros (from=XAU&to=EUR&amount=10&unit=g), how much silver 1,000 rupees buys (from=INR&to=XAG&unit=g), euros to yen, or grams to troy ounces. Metal prices are live spot (or the close on date), currency rates are ECB reference rates. karat prices gold at nominal purity karat/24. A date counts as history: Free reaches 30 days back, paid plans their history depth.

get/v1/convert/

Request

  • Base URL: https://api.metalcharts.org
  • URL: https://api.metalcharts.org/v1/convert/
  • Auth: none declared

Query parameters

fromstring required

A metal symbol (XAU), a currency (EUR) or a unit (g).

tostring required

A metal symbol, a currency or a unit.

amountstring

Quantity of from. Default 1.

unitstring

For a metal: the unit its quantity is in (toz, g, kg, lb, mt, tola). Default: the metal's own unit.

karatstring

For gold to or from a currency: karat purity (karat/24).

datestring

YYYY-MM-DD: convert at that day's closing price and ECB rate instead of live. Counts as history for plan limits.

Response

The converted amount and the rate used.

successboolean required
resultnumber required
ratenumber required

Changes

No recorded changes to this operation across all 1 revision of this API.