Latest Rates Endpoint

Depending on your subscription plan, the API's latest endpoint will return real-time exchange rate data updated every 60 minutes, every 10 minutes, or every 60 seconds.

API Request:

https://metals-api.com/api/latest
? access_key = API_KEY
& base = USD
& symbols = GBP,JPY,EUR

Run example in Postman


Request Parameters:

Parameter Description
access_key [required] Your API Key.
base [optional] Enter the three-letter currency code or metal code of your preferred base currency. Default USD.
symbols [required] Enter a list of comma-separated currency codes or metal codes to limit output codes. (The number of symbols per API request depends on the acquired plan).

API Response:

{
"success": true,
"timestamp": 1519296206,
"base": "USD",
"date": "2018-09-10",
"rates": {
"GBP": 0.72007,
"JPY": 107.346001,
"EUR": 0.813399,
}
}      

Response Objects:

Response Object Description
success Returns true or false depending on whether or not your API request has succeeded.
timestamp Returns the exact date and time (UNIX time stamp) the given rates were collected.
base Returns the three-letter currency code or metal code of the base currency used for this request.
rates Returns exchange rate data for the currencies you have requested.

Example request in Postman:

https://metals-api.com/api/latest?access_key=YOUR_API_KEY&symbols=XAU

Example request in Postman with multiple symbols (The number of symbols per API request depends on the acquired plan):

https://metals-api.com/api/latest?access_key=YOUR_API_KEY&symbols=XAU,XAG,ALU,XCU

Specify Symbols

To reduce bandwidth you can limit the number of output currencies to a specific set of your choice on most API endpoints. To do so, simply append the Metals-API API's symbols  parameter to your API request and set it to one or more comma-separated currency codes or metal codes.

Example:

https://metals-api.com/api/latest
? access_key = API_KEY
& symbols = USD,CAD,JPY

The API's response for the request above will be limited to the currencies USD, CAD and JPY.

Changing base currency

Provided changing base currency is supported on your subscription plan, you can change the currency to which your output currency rates are relative to by appending the base  parameter to your API request URL and setting it to the three-letter code of your preferred base currency.

Example:

https://metals-api.com/api/latest
? access_key = API_KEY
& base = USD

Please note: The default base currency is USD. You can use any currency as base currency. If you need additional base currencies please contact us

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.