Getting Started with MetalAPI
Learn how to make your first API request and integrate MetalAPI into your application.
5 min read
Last updated: 2025-06-13
Introduction
MetalAPI provides real-time and historical data for precious metals and foreign exchange rates. This guide will help you get started with your first API request.
Getting Your API Key
To use MetalAPI, you need an API key. Sign up for a free account to get your API key from the dashboard.
Making Your First Request
Here's how to make your first API request to get the latest metal prices:
curl -X GET "https://metalapi.com/api/v1/latest?api_key=YOUR_API_KEY"
Understanding the Response
The API returns data in JSON format. Here's an example response:
{
"success": true,
"timestamp": 1749752411,
"base": "USD",
"rates": {
"XAU": 1856.90,
"XAG": 27.75,
"XPT": 1045.50,
"XPD": 1125.00
}
}