Metals.APISED

This API endpoint allows you to retrieve the latest rates for various metals based on a specified base currency.

Query Parameter

Description
symbols
Comma seperate values from supported symbols list.
base
desired currency for pricing information

Example Request

  • javaScript
  • Node.js
  • PHP
  • Axios
  • fetch
import axios from 'axios';

const options = {
    method: 'GET',
    url: 'https://metals-apised.p.rapidapi.com/v1/latest',
    params: {
        symbols: 'XAU,XAG,XPD,XPT,XCU,NI,ZNC,ALU,LEAD',
        base: 'USD'
    },
    headers: {
        'X-RapidAPI-Key': '<YourApiKey>',
        'X-RapidAPI-Host': 'metals-apised.p.rapidapi.com'
    }
};

try {
    const response = await axios.request(options);
    console.log(response.data);
} catch (error) {
    console.error(error);
}

Example Response

{
    "success": true,
    "validationMessage": [],
    "baseCurrency": "KWD",
    "rates": {
        "XAU": 629.22432,
        "XAG": 7.08219,
        "XPD": 303.66615,
        "XPT": 284.07441,
        "XCU": 0.08004,
        "NI": 0.15566,
        "ZNC": 0.02392,
        "ALU": 0.02119
    }
}

Market Data

This endpoint retrieves market data for various metals based on the provided symbols and base currency.

Query Parameter

Description
symbols
Comma seperate values from supported symbols list.
base
desired currency for pricing information

Example Request

  • javaScript
  • Node.js
  • PHP
  • Axios
  • fetch
import axios from 'axios';

const options = {
    method: 'GET',
    url: 'https://metals-apised.p.rapidapi.com/v1/market-data',
    params: {
        symbols: 'XAU,XAG,XPD,XPT,XCU,NI,ZNC,ALU,LEAD',
        base: 'USD'
    },
    headers: {
        'X-RapidAPI-Key': '<YourApiKey>',
        'X-RapidAPI-Host': 'metals-apised.p.rapidapi.com'
    }
};

try {
    const response = await axios.request(options);
    console.log(response.data);
} catch (error) {
    console.error(error);
}

Example Response

{
    "success": true,
    "validationMessage": [],
    "baseCurrency": "EUR",
    "rates": {
        "XAU": {
            "open": 1853.05,
            "high": 1876.07895,
            "low": 1853.02259,
            "prev": 1852.8947,
            "current": 1872.32453
        },
        "XAG": {
            "open": 20.78589,
            "high": 21.07775,
            "low": 20.78589,
            "prev": 20.78589,
            "current": 21.06131
        },
        "XPD": {
            "open": 904.75939,
            "high": 912.74325,
            "low": 896.58918,
            "prev": 904.75939,
  

Carat / Karat

This HTTP GET request retrieves information about the carat rates for a specific base currency

Query Parameter

Description
base
desired currency for pricing information

Example Request

  • javaScript
  • Node.js
  • PHP
  • Axios
  • fetch
import axios from 'axios';

const options = {
    method: 'GET',
    url: 'https://metals-apised.p.rapidapi.com/v1/carat',
    params: {
        base: 'USD'
    },
    headers: {
        'X-RapidAPI-Key': '<YourApiKey>',
        'X-RapidAPI-Host': 'metals-apised.p.rapidapi.com'
    }
};

try {
    const response = await axios.request(options);
    console.log(response.data);
} catch (error) {
    console.error(error);
}

Example Response

{
    "success": true,
    "validationMessage": [],
    "baseCurrency": "KWD",
    "rates": {
        "XAU": {
            "1K": 26.23599,
            "2K": 52.47199,
            "3K": 78.70798,
            "4K": 104.94397,
            "5K": 131.17997,
            "6K": 157.41596,
            "7K": 183.65195,
            "8K": 209.88795,
            "9K": 236.12394,
            "10K": 262.35993,
            "11K": 288.59593,
            "12K": 314.83192,
            "13K": 341.06792,
            "14K": 367.30391,
            "15K": 393.5399,
            "16K": 419.7759,
            "17K": 446.
This endpoint makes an HTTP GET request to retrieve a list of supported metal and currency symbols

Query Parameter

Description

Example Request

  • javaScript
  • Node.js
  • PHP
  • Axios
  • fetch
import axios from 'axios';

const options = {
    method: 'GET',
    url: 'https://metals-apised.p.rapidapi.com/v1/supported',
    headers: {
        'X-RapidAPI-Key': '<YourApiKey>',
        'X-RapidAPI-Host': 'metals-apised.p.rapidapi.com'
    }
};

try {
    const response = await axios.request(options);
    console.log(response.data);
} catch (error) {
    console.error(error);
}

Example Response

{
    "success": true,
    "validationMessage": [],
    "supportedMetalSymbols": [
        {
            "metal_code": "XAU",
            "metal_name": "Gold",
            "metal_weight_measurement": "Troy Ounce"
        },
        {
            "metal_code": "XAG",
            "metal_name": "Silver",
            "metal_weight_measurement": "Ounce"
        },
        {
            "metal_code": "XPT",
            "metal_name": "Platinum",
            "metal_weight_measurement": "Ounce"
        },
        {
            "metal_code": "XPD",
            "metal_name": "Palladium",
            "met