Metals Place API Services

Drawing from a diverse network of 10+ exchange rate data sources for precious metals, the Metals Place API is designed to provide real-time rate data for your most precious assets. The API is structured around multiple endpoints, each tailored to serve a distinct use case. Endpoint functionalities range from fetching the latest exchange rate data for an entire or specific subset of currencies, to converting amounts between currencies, sourcing time-series data for single or multiple currencies, and retrieving daily fluctuation data.
Our detailed documentation will guide you through the API structure, methods, possible errors, and provide illustrative code examples. However, if you still find any questions unanswered, don't hesitate to reach out to us. Our dedicated team is always ready to assist you.
Definition Description
API Key A unique key assigned to each API account used to authenticate with the API.
Symbol Refers to the three-letter currency code or metal code of a given currency.
Base The currency to which exchange rates are relative to. (If 1 USD = X EUR, USD is the base currency)
Target The currency an amount is converted to. (If 1 USD = X EUR, EUR is the target currency)
Base URL Refers to URL which all API request endpoints and URLs are based on.

API Key

Your API Key serves as your exclusive identifier used for authentication with the Metals Place API. This key is integrated into the API base URL's 'api_key' parameter to confirm your access.
Base URL:
                            
//Api For Testing
https://metalsplace.com/api/v1/latest
? access_key = API_KEY
                            
                        

1- All Symbols

The 'symbols' API endpoint allows you to retrieve a comprehensive list of all available symbols used in our database. This includes symbols for various metals, currencies, and stock exchanges. This data can be utilized to understand the specific identifiers for each asset, enabling seamless interaction with other API endpoints for more specific data retrieval and analysis.
Base URL:
                            
//URL
https://metalsplace.com/api/v1/symbols
?api_key=[API_KEY]
                            
                        
Request Parameters:
Parameter Description
API Key [Required] Your API Key.
Code Example:
                            
// get All Symbols

function getAllSymbols () {
    // Api Key
    let mainUrl = "https://metalsplace.com/api/v1/";
    let apiKey = [your_api_key];
    axios.get ( `${ mainUrl }symbols?api_key=${ apiKey }` )
        .then ( ( response ) => {
            // To Get Response
            console.log ( response.data )
        } )
        .catch ( ( error ) => {
            // To Catch Error
            console.log ( error.response )
        } );
}

getAllSymbols ()
                            
                        
                            
import android.content.Context;
import android.util.Log;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.StringRequest;
import com.android.volley.toolbox.Volley;

public class java {

    void LoadSymbols(Context context){
        // Making API Calls using Volley Library in Java

        String api_key=[your_api_key];
        String url="https://metalsplace.com/api/v1/symbols?api_key="+api_key;


        RequestQueue mRequestQueue = Volley.newRequestQueue(context);

        // String Request initialized
        StringRequest mStringRequest = new StringRequest(Request.Method.GET, url, new Response.Listener() {
            @Override
            public void onResponse(String response) {
                //on Success
                Log.i("TAG", "response :" + response);

            }
        }, new Response.ErrorListener() {
            @Override
            public void onErrorResponse(VolleyError error) {
                //on Error
                Log.i("TAG", "Error :" + error.toString());
            }
        });

        mRequestQueue.add(mStringRequest);
    }


}

                            
                        
                            
import UIKit
import Alamofire


class MetalsplaceVC: UIViewController {


    override func viewDidLoad() {
        super.viewDidLoad()

        let api_key = [your_api_key]

        let url = "https://metalsplace.com/api/v1/symbols?api_key="


        let parameters = ["api_key": api_key]

        AF.request(url, method: .get, parameters: parameters, encoding: URLEncoding.default, headers: nil).response { response in
            debugPrint(response)
        }

    }



}

                            
                        
                            
$url = 'https://metalsplace.com/api/v1/';
$api_key = [your_api_key];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url . 'symbols?api_key=' . $api_key);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch); // get json
$result = json_decode($result, true); // convert json response to array

                            
                        
                            
import android.content.Context
import android.util.Log
import com.android.volley.Request
import com.android.volley.toolbox.StringRequest
import com.android.volley.toolbox.Volley

class kotlin {

    var api_key = [your_api_key]

    fun LoadSymbols(context: Context?) {
        // Making API Calls using Volley Library in Kotlin
        val api_key = [your_api_key]
        val url =
            "https://metalsplace.com/api/v1/symbols?api_key=$api_key"
        val mRequestQueue = Volley.newRequestQueue(context)

        // String Request initialized
        val mStringRequest = StringRequest(
            Request.Method.GET, url,
            { response -> //on Sucess
                Log.i("TAG", "response :$response")
            }) { error -> //on Error
            Log.i("TAG", "Error :$error")
        }
        mRequestQueue.add(mStringRequest)
    }

}
                            
                        
Response Example:
                            
{
    "success": true,
    "code": 200,
    "request": {
        "endpoint": "symbols",
        "api_key": ""
    },
    "symbols": [
        {
            "code": "ADA",
            "name": "Cardano",
            "type_id": 1,
            "type": "currencies"
        },
        {
            "code": "ALL",
            "name": "Albanian Lek",
            "type_id": 1,
            "type": "currencies"
        },
        {
            "code": "AMD",
            "name": "Armenian Dram",
            "type_id": 1,
            "type": "currencies"
        },
        {
            "code": "ANG",
            "name": "Netherlands Antillean Gulden",
            "type_id": 1,
            "type": "currencies"
        },
        {
            "code": "AOA",
            "name": "Angolan Kwanza",
            "type_id": 1,
            "type": "currencies"
        },
        {
            "code": "ARS",
            "name": "Argentine Peso",
            "type_id": 1,
            "type": "currencies"
        },
    ]
}
                            
                        

2- Latest Prices

The 'Latest Prices' API endpoint offers you real-time access to the most current prices for a vast range of metals, currencies, and stock exchanges. The data is drawn from multiple reliable sources, ensuring its accuracy and timeliness. By using this API, you can stay updated with the latest market prices and make informed decisions swiftly and confidently.
Base URL:
                            
//URL
https://metalsplace.com/api/v1/latest
?api_key=[API_KEY]
&base=USD
 &currencies=EUR,JPY,INR
                            
                        
Request Parameters:
Parameter Description
API Key [Required] Your API Key. More details.
base [optional] Specify a base currency. Base Currency will default to USD if this parameter is not defined.
currencies [optional] Specify a comma-separated list of currency codes to limit API responses to specified currencies. If this parameter is not defined, the API will return all supported currencies.
Code Example:
                            

// get latest Price

function getLatestPrice () {
    // Api Key
    let mainUrl = "https://metalsplace.com/api/v1/";
    let apiKey = [your_api_key];
    axios.get ( `${ mainUrl }latest?api_key=${ apiKey }&base=EUR&symbols=USD,EUR,XAG-SURA` )
        .then ( ( response ) => {
            // To Get Response
            console.log ( response.data )
        } )
        .catch ( ( error ) => {
            // To Catch Error
            console.log ( error.response )
        } );
}
getLatestPrice ()
                            
                        
                            
import android.content.Context;
import android.util.Log;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.StringRequest;
import com.android.volley.toolbox.Volley;

public class java {


    void LoadLatest(Context context){
        // Making API Calls using Volley Library in Java

        String api_key=[your_api_key];
        String base="";
        String symbols="";
        String url="https://metalsplace.com/api/v1/latest?api_key="
                + api_key
                +"&"+base
                +"&"+symbols;


        RequestQueue mRequestQueue = Volley.newRequestQueue(context);

        // String Request initialized
        StringRequest mStringRequest = new StringRequest(Request.Method.GET, url, new Response.Listener() {
            @Override
            public void onResponse(String response) {
                //on Success
                Log.i("TAG", "response :" + response);

            }
        }, new Response.ErrorListener() {
            @Override
            public void onErrorResponse(VolleyError error) {
                //on Error
                Log.i("TAG", "Error :" + error.toString());
            }
        });

        mRequestQueue.add(mStringRequest);
    }




}

                            
                        
                            

import UIKit
import Alamofire


class MetalsplaceVC: UIViewController {


    override func viewDidLoad() {
        super.viewDidLoad()

        let api_key = [your_api_key]

        let url = "https://metalsplace.com/api/v1/latest?api_key=&base=EUR&symbols=USD,EUR,XAG-SURA"

        let parameters = ["api_key": api_key]

        AF.request(url, method: .get, parameters: parameters, encoding: URLEncoding.default, headers: nil).response { response in
            debugPrint(response)
        }

    }

}

                            
                        
                            
$url = 'https://metalsplace.com/api/v1/';
$api_key = [your_api_key];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url . 'latest?api_key=' . $api_key . '&base=EUR&symbols=USD,EUR,XAG-SURA');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch); // get json
$result = json_decode($result, true); // convert json response to array

                            
                        
                            
import android.content.Context
import android.util.Log
import com.android.volley.Request
import com.android.volley.toolbox.StringRequest
import com.android.volley.toolbox.Volley

class kotlin {

    var api_key = [your_api_key]

    fun LoadLatest(context: Context?) {
        // Making API Calls using Volley Library in Java
        val api_key = [your_api_key]
        val base = ""
        val symbols = ""
        val url =
            ("https://metalsplace.com/api/v1/latest?api_key="
                    + api_key
                    + "&" + base
                    + "&" + symbols)
        val mRequestQueue = Volley.newRequestQueue(context)

        // String Request initialized
        val mStringRequest = StringRequest(
            Request.Method.GET, url,
            { response -> //on Success
                Log.i("TAG", "response :$response")
            }) { error -> //on Error
            Log.i("TAG", "Error :$error")
        }
        mRequestQueue.add(mStringRequest)
    }


}
                            
                        
Response Example:
                            
{
    "success": true,
    "code": 200,
    "request": {
        "endpoint": "latest",
        "api_key": "",
        "base": "EUR",
        "symbols": "USD,EUR,XAG-SURA"
    },
    "date": "2023-06-25",
    "base": "EUR",
    "rates_timestamp": 1687696020,
    "rates": {
        "USD": 1.089665999999995,
        "EUR": 1,
        "XAG-SURA": 0.04406378557573852
    }
}
                            
                        

3- Historical Rates Endpoint

The 'Historical Rates Endpoint' API provides you with the capability to access and analyze the past data for various metals, currencies, and stock exchanges. By harnessing this endpoint, you can gain insights into past market trends, understand patterns, and make forecasts. It is a crucial tool for anyone seeking to understand market fluctuations over time and predict future trends based on historical data.
Base URL:
                            
//URL
https://metalsplace.com/api/v1/2021-03-24
?api_key=[API_KEY]
&base=USD
&currencies=EUR,JPY,INR
                            
                        
Request Parameters:
Parameter Description
API Key [Required] Your API Key. More details.
base [optional] Specify a base currency. Base Currency will default to USD if this parameter is not defined.
currencies [optional] Specify a comma-separated list of currency codes to limit API responses to specified currencies. If this parameter is not defined, the API will return all supported currencies.
Code Example:
                            

// get Historical Price

function getHistoricalPrice () {
    // Api Key
    let mainUrl = "https://metalsplace.com/api/v1/";
    let apiKey = [your_api_key];
    axios.get ( `${ mainUrl }2023-05-10?api_key=${ apiKey }&base=EUR&symbols=USD,EUR,XAG-SURA` )
        .then ( ( response ) => {
            // To Get Response
            console.log ( response.data )
        } )
        .catch ( ( error ) => {
            // To Catch Error
            console.log ( error.response )
        } );
}
getHistoricalPrice ()
                            
                        
                            

import android.content.Context;
import android.util.Log;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.StringRequest;
import com.android.volley.toolbox.Volley;

public class java {

        void LoadHistorical(Context context){
        // Making API Calls using Volley Library in Java

        String api_key=[your_api_key];
        String base="EUR";
        String symbols="USD,EUR,XAG-SURA";
        String url="https://metalsplace.com/api/v1/2023-05-10?api_key="
                + api_key
                +"&base="+base
                +"&symbols="+symbols;


        RequestQueue mRequestQueue = Volley.newRequestQueue(context);

        // String Request initialized
        StringRequest mStringRequest = new StringRequest(Request.Method.GET, url, new Response.Listener() {
            @Override
            public void onResponse(String response) {
                //on Success
                Log.i("TAG", "response :" + response);

            }
        }, new Response.ErrorListener() {
            @Override
            public void onErrorResponse(VolleyError error) {
                //on Error
                Log.i("TAG", "Error :" + error.toString());
            }
        });

        mRequestQueue.add(mStringRequest);
    }


}

                            
                        
                            
import UIKit
import Alamofire


class MetalsplaceVC: UIViewController {


    override func viewDidLoad() {
        super.viewDidLoad()

        let api_key = [your_api_key]

        let url = "https://metalsplace.com/api/v1/2023-05-10?api_key=&base=EUR&symbols=USD,EUR,XAG-SURA"

        let parameters = ["api_key": api_key]

        AF.request(url, method: .get, parameters: parameters, encoding: URLEncoding.default, headers: nil).response { response in
            debugPrint(response)
        }

    }

}
                            
                        
                            
$url = 'https://metalsplace.com/api/v1/';
$api_key = '';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url . '2023-05-10?api_key=' . $api_key . '&base=EUR&symbols=USD,EUR,XAG-SURA');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch); // get json
$result = json_decode($result, true); // convert json response to array

                            
                        
                            
import android.content.Context
import android.util.Log
import com.android.volley.Request
import com.android.volley.toolbox.StringRequest
import com.android.volley.toolbox.Volley

class kotlin {

    var api_key = [your_api_key]

    fun LoadHistorical(context: Context?) {
        // Making API Calls using Volley Library in Java
        val api_key = [your_api_key]
        val base = "EUR"
        val symbols = "USD,EUR,XAG-SURA"
        val url =
            ("https://metalsplace.com/api/v1/2023-05-10?api_key="
                    + api_key
                    + "&base=" + base
                    + "&symbols=" + symbols)
        val mRequestQueue = Volley.newRequestQueue(context)

        // String Request initialized
        val mStringRequest = StringRequest(
            Request.Method.GET, url,
            { response -> //on Success
                Log.i("TAG", "response :$response")
            }) { error -> //on Error
            Log.i("TAG", "Error :$error")
        }
        mRequestQueue.add(mStringRequest)
    }

}
                            
                        
Response Example:
                            
{
    "success": true,
    "code": 200,
    "request": {
        "endpoint": "historical",
        "date": "2023-05-10",
        "api_key": "",
        "base": "EUR",
        "symbols": "USD,EUR,XAG-SURA"
    },
    "date": "2023-05-10",
    "base": "EUR",
    "rates_timestamp": 1683708360,
    "rates": {
        "USD": 1.0955080000000053,
        "EUR": 0.9999999999999999,
        "XAG-SURA": 0.04065490752987695
    }
}
                            
                        

4- Currency Convert

The 'Currency Convert' API endpoint facilitates the seamless conversion of one currency to another based on the most current exchange rates. This feature provides an essential tool for users dealing with international transactions or those who need to track the value of various currencies in real-time. By employing this API, you can swiftly obtain accurate currency conversion data, making your cross-currency dealings more efficient and reliable.
Base URL:
                            
//URL
https://metalsplace.com/api/v1/convert
?api_key=[API_KEY]
&from=USD
&to=EUR
&amount=100
&date=2021-04-23
                            
                        
Request Parameters:
Parameter Description
API Key [Required] Your API Key
from [optional] The 'from' parameter indicates the currency you are converting from. In this case, the source currency is US Dollars (USD).
amount [optional] The 'amount' parameter denotes the quantity of the 'from' currency that you want to convert. Here, the amount is set to 100, meaning you want to convert 100 US Dollars to Euros.
to [optional] The 'to' parameter specifies the currency you are converting to. Here, you are converting to Euros (EUR).
date [optional] The 'date' parameter is used when you want to know the exchange rate for a specific past date. In this case, you are looking for the exchange rate that was in effect on April 23, 2021. If you want the current exchange rate, you can leave this parameter out.
Code Example:
                            


// convert Currency

function convertCurrency () {
    // Api Key
    let mainUrl = "https://metalsplace.com/api/v1/";
    let apiKey = [your_api_key];
    axios.get ( `${ mainUrl }convert?api_key=${ apiKey }&from=EUR&amount=1&to=USD&date=2023-05-10` )
        .then ( ( response ) => {
            // To Get Response
            console.log ( response.data )
        } )
        .catch ( ( error ) => {
            // To Catch Error
            console.log ( error.response )
        } );
}
convertCurrency ()
                            
                        
                            
import android.content.Context;
import android.util.Log;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.StringRequest;
import com.android.volley.toolbox.Volley;

public class java {


    void convert(Context context){
        // Making API Calls using Volley Library in Java

        String api_key=[your_api_key];
        String from="EUR";
        String amount="1";
        String to="USD";
        String date="2023-05-10";
        String url="https://metalsplace.com/api/v1/convert?api_key="
                + api_key
                +"&from="+from
                +"&amount="+amount
                +"&to="+to
                +"&date="+date;


        RequestQueue mRequestQueue = Volley.newRequestQueue(context);

        // String Request initialized
        StringRequest mStringRequest = new StringRequest(Request.Method.GET, url, new Response.Listener() {
            @Override
            public void onResponse(String response) {
                //on Success
                Log.i("TAG", "response :" + response);

            }
        }, new Response.ErrorListener() {
            @Override
            public void onErrorResponse(VolleyError error) {
                //on Error
                Log.i("TAG", "Error :" + error.toString());
            }
        });

        mRequestQueue.add(mStringRequest);
    }

}

                            
                        
                            

import UIKit
import Alamofire


class MetalsplaceVC: UIViewController {


    override func viewDidLoad() {
        super.viewDidLoad()

        let api_key = [your_api_key]

        let url = "https://metalsplace.com/api/v1/convert?api_key=[your_api_key]&from=EUR&amount=1&to=USD&date=2023-05-10"

        let parameters = ["api_key": api_key]

        AF.request(url, method: .get, parameters: parameters, encoding: URLEncoding.default, headers: nil).response { response in
            debugPrint(response)
        }

    }

}

                            
                        
                            
$url = 'https://metalsplace.com/api/v1/';
$api_key = [your_api_key];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url . 'convert?api_key=' . $api_key . '&from=EUR&amount=1&to=USD&date=2023-05-10');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch); // get json
$result = json_decode($result, true); // convert json response to array

                            
                        
                            

import android.content.Context
import android.util.Log
import com.android.volley.Request
import com.android.volley.toolbox.StringRequest
import com.android.volley.toolbox.Volley

class kotlin {

    var api_key = [your_api_key]

    fun convert(context: Context?) {
        // Making API Calls using Volley Library in Java
        val api_key = [your_api_key]
        val from = "EUR"
        val amount = "1"
        val to = "USD"
        val date = "2023-05-10"
        val url =
            ("https://metalsplace.com/api/v1/convert?api_key="
                    + api_key
                    + "&from=" + from
                    + "&amount=" + amount
                    + "&to=" + to
                    + "&date=" + date)
        val mRequestQueue = Volley.newRequestQueue(context)

        // String Request initialized
        val mStringRequest = StringRequest(
            Request.Method.GET, url,
            { response -> //on Success
                Log.i("TAG", "response :$response")
            }) { error -> //on Error
            Log.i("TAG", "Error :$error")
        }
        mRequestQueue.add(mStringRequest)
    }


}
                            
                        
Response Example:
                            
{
    "success": true,
    "code": 200,
    "request": {
        "endpoint": "convert",
        "api_key": "",
        "from": "EUR",
        "amount": "1",
        "to": "USD",
        "date": "2023-05-10"
    },
    "date": "2023-05-10",
    "base": "EUR",
    "rates_timestamp": 1683708360,
    "rate": 0.91281852802535,
    "result": 1.0955080000000053
}

                            
                        

5- Time History

The 'Time History' API endpoint enables you to dive into the historical timeline of various metals, currencies, and stock exchanges. This feature provides chronological data that aids in understanding the progression of market trends and dynamics over specified periods. Leveraging this API, you can analyze time-series data, trace price evolution, assess market volatility, and derive key insights to inform your strategic decisions.
Base URL:
                            
//URL
https://metalsplace.com/api/v1/timeframe
?api_key=[API_KEY]
&start_date=2021-04-22
&end_date=2021-04-23
&base=USD
&currencies=EUR,JPY,INR
                            
                        
Request Parameters:
Parameter Description
API Key [Required] Your API Key
symbols [optional] The 'symbols' parameter specifies the currencies (or other financial instruments) for which you are seeking historical data. In this case, the symbols include United States Dollar (USD), Egyptian Pound (EGP), United Arab Emirates Dirham (AED), and Euro (EUR).
start_date [optional] The 'start_date' parameter denotes the beginning of the timeframe for which you want to retrieve the historical data. Here, you're looking for data starting from May 1, 2023.
end_date [optional] he 'end_date' parameter specifies the end of the timeframe for the historical data. In this case, you're looking for data up until May 10, 2023.
base [optional] The 'base' parameter indicates the base currency against which the exchange rates of the other currencies (specified in 'symbols') will be calculated. Here, the base currency is set to the Egyptian Pound (EGP).
Code Example:
                            

// Get Time History

function GetTimeHistory () {
    // Main Url
    let mainUrl = "https://metalsplace.com/api/v1/";
    // Api Key
    let apiKey = [your_api_key];
    axios.get ( `${ mainUrl }time-history?api_key=${ apiKey }&symbols=USD,EGP,AED,EUR&start_date=2023-05-01&end_date=2023-05-10&base=EGP` )
        .then ( ( response ) => {
            // To Get Response
            console.log ( response.data )
        } )
        .catch ( ( error ) => {
            // To Catch Error
            console.log ( error.response )
        } );
}
GetTimeHistory ()
                            
                        
                            

import android.content.Context;
import android.util.Log;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.StringRequest;
import com.android.volley.toolbox.Volley;

public class java {

    void time_history(Context context){
        // Making API Calls using Volley Library in Java

        String api_key=[your_api_key];
        String symbols="USD,EGP,AED,EUR";
        String start_date="2023-05-01";
        String end_date="2023-05-10";
        String base="EGP";
        String url="https://metalsplace.com/api/v1/time-history?api_key="
                + api_key
                +"&symbols="+symbols
                +"&start_date="+start_date
                +"&end_date="+end_date
                +"&base="+base;


        RequestQueue mRequestQueue = Volley.newRequestQueue(context);

        // String Request initialized
        StringRequest mStringRequest = new StringRequest(Request.Method.GET, url, new Response.Listener() {
            @Override
            public void onResponse(String response) {
                //on Success
                Log.i("TAG", "response :" + response);

            }
        }, new Response.ErrorListener() {
            @Override
            public void onErrorResponse(VolleyError error) {
                //on Error
                Log.i("TAG", "Error :" + error.toString());
            }
        });

        mRequestQueue.add(mStringRequest);
    }

}

                            
                        
                            
import UIKit
import Alamofire


class MetalsplaceVC: UIViewController {


    override func viewDidLoad() {
        super.viewDidLoad()

        let api_key = [your_api_key]

        let url = "https://metalsplace.com/api/v1/time-history?api_key=[your_api_key]&symbols=USD,EGP,AED,EUR&start_date=2023-05-01&end_date=2023-05-10&base=EGP"

        let parameters = ["api_key": api_key]

        AF.request(url, method: .get, parameters: parameters, encoding: URLEncoding.default, headers: nil).response { response in
            debugPrint(response)
        }

    }

}
                            
                        
                            
$url = 'https://metalsplace.com/api/v1/';
$api_key = [your_api_key];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url . 'time-history?api_key=' . $api_key . '&symbols=USD,EGP,AED,EUR&start_date=2023-05-01&end_date=2023-05-10&base=EGP');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch); // get json
$result = json_decode($result, true); // convert json response to array

                            
                        
                            
import android.content.Context
import android.util.Log
import com.android.volley.Request
import com.android.volley.toolbox.StringRequest
import com.android.volley.toolbox.Volley

class kotlin {

    var api_key = [your_api_key]

    fun time_history(context: Context?) {
        // Making API Calls using Volley Library in Java
        val api_key = [your_api_key]
        val symbols = "USD,EGP,AED,EUR"
        val start_date = "2023-05-01"
        val end_date = "2023-05-10"
        val base = "EGP"
        val url =
            ("https://metalsplace.com/api/v1/time-history?api_key="
                    + api_key
                    + "&symbols=" + symbols
                    + "&start_date=" + start_date
                    + "&end_date=" + end_date
                    + "&base=" + base)
        val mRequestQueue = Volley.newRequestQueue(context)

        // String Request initialized
        val mStringRequest = StringRequest(
            Request.Method.GET, url,
            { response -> //on Success
                Log.i("TAG", "response :$response")
            }) { error -> //on Error
            Log.i("TAG", "Error :$error")
        }
        mRequestQueue.add(mStringRequest)
    }

}
                            
                        
Response Example:
                            
{
    "success": true,
    "code": 200,
    "request": {
        "endpoint": "time-history",
        "api_key": "",
        "symbols": "USD,EGP,AED,EUR",
        "start_date": "2023-05-01",
        "end_date": "2023-05-10",
        "base": "EGP"
    },
    "base": "EGP",
    "history": true,
    "rates": {
        "2023-05-03": {
            "USD": 0.03231096068563859,
            "EGP": 1,
            "AED": 0.11865554092587058,
            "EUR": 0.02922421176625185
        },
        "2023-05-06": {
            "USD": 0.032747160792505524,
            "EGP": 1,
            "AED": 0.12025963599178223,
            "EUR": 0.029492169075932922
        },
        "2023-05-07": {
            "USD": 0.03247488465489281,
            "EGP": 0.9916855039941347,
            "AED": 0.11925973772866175,
            "EUR": 0.0289672930714564
        },
        "2023-05-08": {
            "USD": 0.03232323734971383,
            "EGP": 1,
            "AED": 0.11869615313818847,
            "EUR": 0.029245499475871857
        },
        "2023-05-09": {
            "USD": 0.0323585848943654,
            "EGP": 0.9999126318207852,
            "AED": 0.11882207199115638,
            "EUR": 0.02951873499424405
        },
        "2023-05-10": {
            "USD": 0.03236303558801208,
            "EGP": 0.999966015785653,
            "AED": 0.11883830722602828,
            "EUR": 0.029538208129923024
        }
    }
}

                            
                        

5- Change Currency

The 'Change' API endpoint delivers the essential information on how prices for various metals, currencies, and stock exchanges have fluctuated within a specific timeframe. This feature provides valuable insights into market volatility and potential trends. Utilizing this API, you gain a clearer understanding of the magnitude and direction of price changes, empowering you to make well-informed trading and investment decisions.
Base URL:
                            
//URL
https://metalsplace.com/api/v1/timeframe
?api_key=[API_KEY]
&start_date=2021-04-22
&end_date=2021-04-23
&base=USD
&currencies=EUR,JPY,INR
                            
                        
Request Parameters:
Parameter Description
API Key [Required] Your API Key. More details.
symbols [optional] The 'symbols' parameter specifies the currencies for which you are seeking change data. In this case, the symbols include United States Dollar (USD), Egyptian Pound (EGP), United Arab Emirates Dirham (AED), Euro (EUR), and Kuwaiti Dinar (KWD).
start_date [optional] The 'start_date' parameter indicates the beginning of the timeframe for which you want to retrieve the fluctuation data. Here, you're seeking data from May 3, 2023.
end_date [optional] The 'end_date' parameter specifies the end of the timeframe for the change data. In this case, you're seeking data until May 10, 2023.
base [optional]The 'base' parameter defines the base currency against which the changes in the exchange rates of the other currencies (specified in 'symbols') will be calculated. Here, the base currency is set to Euro (EUR).
Code Example:
                            
// change Currency

function changeCurrency () {
    // Main Url
    let mainUrl = "https://metalsplace.com/api/v1/";
    // Api Key
    let apiKey = [your_api_key];
    axios.get ( `${ mainUrl }change?api_key=${ apiKey }&symbols=USD,EGP,AED,EUR,KWD&start_date=2023-05-03&end_date=2023-05-10&base=EUR` )
        .then ( ( response ) => {
            // To Get Response
            console.log ( response.data )
        } )
        .catch ( ( error ) => {
            // To Catch Error
            console.log ( error.response )
        } );
}
changeCurrency ()
                            
                        
                            
import android.content.Context;
import android.util.Log;]
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.StringRequest;
import com.android.volley.toolbox.Volley;

public class java {

    void change(Context context){
        // Making API Calls using Volley Library in Java

        String api_key=[your_api_key];
        String symbols="USD,EGP,AED,EUR,KWD";
        String start_date="2023-05-03";
        String end_date="2023-05-10";
        String base="EUR";
        String url="https://metalsplace.com/api/v1/change?api_key="
                + api_key
                +"&symbols="+symbols
                +"&start_date="+start_date
                +"&end_date="+end_date
                +"&base="+base;


        RequestQueue mRequestQueue = Volley.newRequestQueue(context);

        // String Request initialized
        StringRequest mStringRequest = new StringRequest(Request.Method.GET, url, new Response.Listener() {
            @Override
            public void onResponse(String response) {
                //on Success
                Log.i("TAG", "response :" + response);

            }
        }, new Response.ErrorListener() {
            @Override
            public void onErrorResponse(VolleyError error) {
                //on Error
                Log.i("TAG", "Error :" + error.toString());
            }
        });

        mRequestQueue.add(mStringRequest);
    }
}

                            
                        
                            

import UIKit
import Alamofire


class MetalsplaceVC: UIViewController {


    override func viewDidLoad() {
        super.viewDidLoad()

        let api_key = [your_api_key]

        let url = "https://metalsplace.com/api/v1/change?api_key=[your_api_key]&symbols=USD,EGP,AED,EUR,KWD&start_date=2023-05-03&end_date=2023-05-10&base=EUR"

        let parameters = ["api_key": api_key]

        AF.request(url, method: .get, parameters: parameters, encoding: URLEncoding.default, headers: nil).response { response in
            debugPrint(response)
        }

    }

}
                            
                        
                            
$url = 'https://metalsplace.com/api/v1/';
$api_key = [your_api_key];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url . 'change?api_key=' . $api_key . '&symbols=USD,EGP,AED,EUR,KWD&start_date=2023-05-03&end_date=2023-05-10&base=EUR');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch); // get json
$result = json_decode($result, true); // convert json response to array

                            
                        
                            
import android.content.Context
import android.util.Log
import com.android.volley.Request
import com.android.volley.toolbox.StringRequest
import com.android.volley.toolbox.Volley

class kotlin {

    var api_key = [your_api_key]

    fun change(context: Context?) {
        // Making API Calls using Volley Library in Java
        val api_key = [your_api_key]
        val symbols = "USD,EGP,AED,EUR,KWD"
        val start_date = "2023-05-03"
        val end_date = "2023-05-10"
        val base = "EUR"
        val url =
            ("https://metalsplace.com/api/v1/change?api_key="
                    + api_key
                    + "&symbols=" + symbols
                    + "&start_date=" + start_date
                    + "&end_date=" + end_date
                    + "&base=" + base)
        val mRequestQueue = Volley.newRequestQueue(context)

        // String Request initialized
        val mStringRequest = StringRequest(
            Request.Method.GET, url,
            { response -> //on Success
                Log.i("TAG", "response :$response")
            }) { error -> //on Error
            Log.i("TAG", "Error :$error")
        }
        mRequestQueue.add(mStringRequest)
    }

}
                            
                        
Response Example:
                            
{
    "success": true,
    "code": 200,
    "request": {
        "endpoint": "change",
        "api_key": "",
        "symbols": "USD,EGP,AED,EUR,KWD",
        "start_date": "2023-05-03",
        "end_date": "2023-05-10",
        "base": "EUR"
    },
    "base": "EUR",
    "change": true,
    "rates": {
        "USD": {
            "start_rate": 0.90446743600667,
            "end_rate": 0.91281852802535,
            "change": -0.008351092018680006,
            "change_pct": 0.9233159410969022
        },
        "EGP": {
            "start_rate": 0.02922421176625185,
            "end_rate": 0.029541578507881208,
            "change": -0.0003173667416293581,
            "change_pct": 1.085971947396896
        },
        "AED": {
            "start_rate": 0.24629453911899082,
            "end_rate": 0.24858632874746076,
            "change": -0.0022917896284699313,
            "change_pct": 0.9305076907786057
        },
        "EUR": {
            "start_rate": 0.9999999999999999,
            "end_rate": 0.9999999999999999,
            "change": 0,
            "change_pct": 0
        },
        "KWD": {
            "start_rate": 2.954019008983353,
            "end_rate": 2.977553097831924,
            "change": -0.02353408884857089,
            "change_pct": 0.7966803455564194
        }
    }
}

                            
                        

6- open high low close Query

The 'Open High Low Close' (OHLC) API endpoint provides crucial data points for financial assets including various metals, currencies, and stock exchanges. 'Open' refers to the opening price at the start of a trading period, 'High' and 'Low' represent the highest and lowest prices during the same period, while 'Close' indicates the final price when the trading period ends. By utilizing this API, you receive a comprehensive view of market activity within specific periods, allowing you to understand market trends and volatility for effective decision-making.
Base URL:
                            
//URL
https://metalsplace.com/api/v1/timeframe
?api_key=[API_KEY]
&start_date=2021-04-22
&end_date=2021-04-23
&base=USD
&currencies=EUR,JPY,INR
                            
                        
Request Parameters:
Parameter Description
API Key [Required] Your API Key. More details.
base [optional] The 'base' parameter defines the base currency. In this case, you're looking at the values relative to United States Dollar (USD).
amount [optional] The 'amount' parameter is used to specify the quantity of the 'base' currency that you want to analyze. Here, the amount is set to 1, meaning you want to get the OHLC prices for 1 US Dollar in Euros.
symbols [optional] The 'symbols' parameter specifies the currency (or other financial instrument) for which you are seeking OHLC data. Here, the symbol is Euro (EUR).
date [optional] The 'date' parameter indicates the specific date for which you want to retrieve the OHLC data. In this case, you're looking for data from May 9, 2023.
Code Example:
                            

// get open-high-low-close

function getOpenHighLowClose () {
    // Main Url
    let mainUrl = "https://metalsplace.com/api/v1/";
    // Api Key
    let apiKey = [your_api_key];
    axios.get ( `${ mainUrl }open-high-low-close?api_key=${ apiKey }&base=USD&amount=1&symbols=EUR&date=2023-05-09` )
        .then ( ( response ) => {
            // To Get Response
            console.log ( response.data )
        } )
        .catch ( ( error ) => {
            // To Catch Error
            console.log ( error.response )
        } );
}
getOpenHighLowClose ()
                            
                        
                            
import android.content.Context;
import android.util.Log;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.StringRequest;
import com.android.volley.toolbox.Volley;

public class java {

    void open_high_low_close(Context context){
        // Making API Calls using Volley Library in Java

        String api_key=[your_api_key];
        String base="USD";
        String amount="1";
        String symbols="EUR";
        String date="2023-05-09";
        String url="https://metalsplace.com/api/v1/open-high-low-close?api_key="
                + api_key
                +"&base="+base
                +"&amount="+amount
                +"&symbols="+symbols
                +"date"+date;


        RequestQueue mRequestQueue = Volley.newRequestQueue(context);

        // String Request initialized
        StringRequest mStringRequest = new StringRequest(Request.Method.GET, url, new Response.Listener() {
            @Override
            public void onResponse(String response) {
                //on Success
                Log.i("TAG", "response :" + response);

            }
        }, new Response.ErrorListener() {
            @Override
            public void onErrorResponse(VolleyError error) {
                //on Error
                Log.i("TAG", "Error :" + error.toString());
            }
        });

        mRequestQueue.add(mStringRequest);
    }

}

                            
                        
                            

import UIKit
import Alamofire


class MetalsplaceVC: UIViewController {


    override func viewDidLoad() {
        super.viewDidLoad()

        let api_key = [your_api_key]

        let url = "https://metalsplace.com/api/v1/open-high-low-close?api_key=[your_api_key]&base=USD&amount=1&symbols=EUR&date=2023-05-09"

        let parameters = ["api_key": api_key]

        AF.request(url, method: .get, parameters: parameters, encoding: URLEncoding.default, headers: nil).response { response in
            debugPrint(response)
        }

    }

}

                            
                        
                            
$url = 'https://metalsplace.com/api/v1/';
$api_key = [your_api_key];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url . 'open-high-low-close?api_key=' . $api_key . '&base=USD&amount=1&symbols=EUR&date=2023-05-09');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch); // get json
$result = json_decode($result, true); // convert json response to array

                            
                        
                            
import android.content.Context
import android.util.Log
import com.android.volley.Request
import com.android.volley.toolbox.StringRequest
import com.android.volley.toolbox.Volley

class kotlin {

    var api_key = [your_api_key]

    fun open_high_low_close(context: Context?) {
        // Making API Calls using Volley Library in Java
        val api_key = [your_api_key]
        val base = "USD"
        val amount = "1"
        val symbols = "EUR"
        val date = "2023-05-09"
        val url =
            ("https://metalsplace.com/api/v1/open-high-low-close?api_key="
                    + api_key
                    + "&base=" + base
                    + "&amount=" + amount
                    + "&symbols=" + symbols
                    + "date" + date)
        val mRequestQueue = Volley.newRequestQueue(context)

        // String Request initialized
        val mStringRequest = StringRequest(
            Request.Method.GET, url,
            { response -> //on Success
                Log.i("TAG", "response :$response")
            }) { error -> //on Error
            Log.i("TAG", "Error :$error")
        }
        mRequestQueue.add(mStringRequest)
    }


}
                            
                        
Response Example:
                            
{
    "success": true,
    "code": 200,
    "request": {
        "endpoint": "open-high-low-close",
        "api_key": "",
        "base": "USD",
        "amount": "1",
        "symbols": "EUR",
        "date": "2023-05-09"
    },
    "base": "USD",
    "history": true,
    "rates": {
        "open": 0.91223813064162,
        "high": 0.91263775126058,
        "low": 0.91206174293175,
        "close": 0.91263775126058
    }
}

                            
                        

Success Code

Response Code Status Unit
200 success Description

Missing Code

Response Code Status Unit
101 Missing Invalid/Missing/Wrong API KEY
102 Missing Invalid/Missing/Wrong API endpoint.
103 Missing Suspended API KEY
104 Missing Please verify your email to use API
105 Missing The current subscription plan was Expired
106 Missing The maximum allowed amount of monthly API requests has been reached

Invalid Code

Response Code Status Unit
201 Invalid An invalid base currency has been entered
202 Invalid One or more invalid symbols have been specified
203 Invalid An invalid date has been specified
204 Invalid An invalid amount has been specified
205 Invalid An invalid from has been specified
206 Invalid An invalid to has been specified
207 Invalid An invalid start_date has been specified
208 Invalid An invalid end_date has been specified

Error Code

Response Code Status Unit
500 error internal server error