---
title: "Convert between metals, currencies and units"
method: GET
path: "/v1/convert/"
tags: ["Prices"]
---

# Convert between metals, currencies and units

`GET /v1/convert/`

## Request

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

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.

## Query parameters

- `from` string, required: A metal symbol (XAU), a currency (EUR) or a unit (g).
- `to` string, required: A metal symbol, a currency or a unit.
- `amount` string: Quantity of `from`. Default 1.
- `unit` string: For a metal: the unit its quantity is in (toz, g, kg, lb, mt, tola). Default: the metal's own unit.
- `karat` string: For gold to or from a currency: karat purity (karat/24).
- `date` string: YYYY-MM-DD: convert at that day's closing price and ECB rate instead of live. Counts as history for plan limits.

## Response `200`

The converted amount and the rate used.

- object
  - `success` boolean, required
  - `result` number, required
  - `rate` number, required

## Other responses

- `400`: Invalid from, to, amount, unit, karat or date.
- `403`: The date is further back than the plan's history allows.
- `404`: No price or rate on or before the date.

---

[API](https://skmtc.dev/metalcharts/apis/metalcharts-api.md) · [All operations](https://skmtc.dev/metalcharts/apis/metalcharts-api/llms.txt) · [OpenAPI document](https://skmtc.dev/metalcharts/apis/metalcharts-api/revisions/53d6a0af0479?raw)
