Forex.APISED

Available Currencies

This HTTP GET request retrieves a list of available currencies. Use the 'search' query parameter to filter the results or leave it blank to return all supported currencies

Query Parameter

Description
search
Search avaliable currencies that are supported using codes or names

Example Request

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

const options = {
    method: 'GET',
    url: 'https://forex-apised1.p.rapidapi.com/available',
    params: {
        search: 'united'
    },
    headers: {
        'X-RapidAPI-Key': '<YourApiKey>',
        'X-RapidAPI-Host': 'forex-apised1.p.rapidapi.com'
    }
};

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

Example Response

{
    "success": true,
    "errors": [],
    "search": "united",
    "currencies": [
        {
            "currency_code": "USD",
            "currency_name": "United States Dollar"
        },
        {
            "currency_code": "AED",
            "currency_name": "United Arab Emirates Dirham"
        },
        {
            "currency_code": "GBP",
            "currency_name": "United Kingdom Pound"
        }
    ]
}
This endpoint makes an HTTP GET request to convert an amount from one currency to another using the forex API. The request URL includes parameters for the source currency (from), target currency (to), and the amount to be converted.

Query Parameter

Description
from
From currency input [currencies][required]
to
To currency input [currencies][required]
amount
Amount to convert input[required]

Example Request

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

const options = {
    method: 'GET',
    url: 'https://forex-apised1.p.rapidapi.com/convert',
    params: {
        from: 'USD',
        to: 'GBP',
        amount: '1337'
    },
    headers: {
        'X-RapidAPI-Key': '<YourApiKey>',
        'X-RapidAPI-Host': 'forex-apised1.p.rapidapi.com'
    }
};

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

Example Response

{
    "success": true,
    "errors": [],
    "base_currency_code": "USD",
    "base_currency_name": "United States Dollar",
    "to": "GBP",
    "amount": 1337,
    "rates": {
        "GBP": {
            "currency_name": "United Kingdom Pound",
            "currency_code": "GBP",
            "rate": 0.7880842,
            "converted_amount": 1053.6685754
        }
    }
}

Multi Convert

This endpoint performs an HTTP GET request to retrieve the converted amounts for the specified currencies based on a given amount in a base currency. The request should include the base currency code ("from"), target currency codes ("to"), and the amount to be converted.

Query Parameter

Description
from
From currency input [currencies][required]
to
To currency input [multi-choice-currencies][required]
amount
Amount to convert input[required]

Example Request

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

const options = {
    method: 'GET',
    url: 'https://forex-apised1.p.rapidapi.com/multi-convert',
    params: {
        from: 'EUR',
        to: 'GBP,USD,EUR',
        amount: '1337'
    },
    headers: {
        'X-RapidAPI-Key': '<YourApiKey>',
        'X-RapidAPI-Host': 'forex-apised1.p.rapidapi.com'
    }
};

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

Example Response

{
    "success": true,
    "errors": [],
    "base_currency_code": "EUR",
    "base_currency_name": "Euro Member Countries",
    "to": "GBP,USD,EUR",
    "amount": 1337,
    "rates": {
        "GBP": {
            "currency_name": "United Kingdom Pound",
            "currency_code": "GBP",
            "rate": 0.859603184991274,
            "converted_amount": 1149.2894583333334
        },
        "USD": {
            "currency_name": "United States Dollar",
            "currency_code": "USD",
            "rate": 1.0907504363001745,
            "converted_amount": 1458.3333333333335
        },

Live Rates

This endpoint retrieves the live forex rates for the specified base currency and target currency codes. Amounts in base_currency can be multiplied by the rates in the response to achieve the converted amounts values

Query Parameter

Description
base_currency_code
From currency input [currencies][required]
currency_codes
To currency input [multi-choice-currencies][required]

Example Request

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

const options = {
    method: 'GET',
    url: 'https://forex-apised1.p.rapidapi.com/live-rates',
    params: {
        base_currency_code: 'USD',
        currency_codes: 'GBP,USD,EUR,KWD'
    },
    headers: {
        'X-RapidAPI-Key': '<YourApiKey>',
        'X-RapidAPI-Host': 'forex-apised1.p.rapidapi.com'
    }
};

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

Example Response

{
    "success": true,
    "errors": [],
    "base_currency_code": "USD",
    "base_currency_name": "United States Dollar",
    "currency_codes": "GBP,USD,EUR,KWD",
    "rates": {
        "GBP": {
            "currency_name": "United Kingdom Pound",
            "currency_code": "GBP",
            "rate": 0.7880842
        },
        "USD": {
            "currency_name": "United States Dollar",
            "currency_code": "USD",
            "rate": 1
        },
        "EUR": {
            "currency_name": "Euro Member Countries",
            "currency_code": "EUR",
            "rate": 0.9168

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

Commodities.APISED

This endpoint makes an HTTP GET request to retrieve the latest commodity rates for various symbols in the specified currency. The request includes the symbols of the commodities and the base currency. The response contains the success status, any errors, the base currency, and the rates for each commodity symbol in the 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://commodities-apised.p.rapidapi.com/v1/latest',
    params: {
        symbols: 'COCOA,COFFEE,CORN,COTTON,GASOLINE,LUMBER,NATURALGAS,OATS,OIL,ORANGEJUICE,SOYBEAN,SUGAR,WHEAT',
        base: 'USD'
    },
    headers: {
        'X-RapidAPI-Key': '<YourApiKey>',
        'X-RapidAPI-Host': 'commodities-apised.p.rapidapi.com'
    }
};

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

Example Response

{
    "success": true,
    "errors": [],
    "base_currency": "USD",
    "rates": {
        "COCOA": 5404,
        "COFFEE": 189.38,
        "CORN": 433.07,
        "COTTON": 87.72,
        "GASOLINE": 2.2253,
        "LUMBER": 542.79,
        "NATURALGAS": 2.026,
        "OATS": 3.7129,
        "OIL": 73.96,
        "ORANGEJUICE": 3.78668,
        "SOYBEAN": 1182.25,
        "SUGAR": 23.98,
        "WHEAT": 592.12
    }
}

Market Data

This endpoint makes an HTTP GET request to retrieve market data for various commodities. The request includes a list of symbols and the base currency. The response contains the success status, any errors, the base currency, and the market data for each symbol including open, high, low, previous, and current values.

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://commodities-apised.p.rapidapi.com/v1/market-data',
    params: {
        symbols: 'COCOA,COFFEE,CORN,COTTON,GASOLINE,LUMBER,NATURALGAS,OATS,OIL,ORANGEJUICE,SOYBEAN,SUGAR,WHEAT',
        base: 'USD'
    },
    headers: {
        'X-RapidAPI-Key': '<YourApiKey>',
        'X-RapidAPI-Host': 'commodities-apised.p.rapidapi.com'
    }
};

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

Example Response

{
    "success": true,
    "errors": [],
    "base_currency": "USD",
    "rates": {
        "COCOA": {
            "open": 5187,
            "high": 5416,
            "low": 5184,
            "prev": 5228,
            "current": 5401
        },
        "COFFEE": {
            "open": 188.93,
            "high": 191.48,
            "low": 188.53,
            "prev": 187.78,
            "current": 189.43
        },
        "CORN": {
            "open": 437.56,
            "high": 437.81,
            "low": 433.07,
            "prev": 438.56,
            "current": 433.07
        },
        "COTT
This endpoint retrieves the list of supported commodities and currencies

Query Parameter

Description

Example Request

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

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

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

Example Response

{
    "success": true,
    "supported_commodities": [
        {
            "commodity_code": "COCOA",
            "commodity_name": "Cocoa",
            "commodity_weight_measurement": "Metric Ton (mt)"
        },
        {
            "commodity_code": "COFFEE",
            "commodity_name": "Coffee",
            "commodity_weight_measurement": "Pound (lb)"
        },
        {
            "commodity_code": "CORN",
            "commodity_name": "Corn",
            "commodity_weight_measurement": "Bushel (BU)"
        },
        {
            "commodity_code": "COTTON",
            "commodity