Get Historical
get_historicalGet metal prices for a specific historical date. Returns spot prices per troy ounce for that day. Useful for tracking price changes or computing returns.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"date": "2024-01-15",
"_apiKey": "your-metals-api-key"
},
"name": "get_historical"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | No | Base currency (default "USD") | |
| date | Yes | Date in YYYY-MM-DD format (e.g., "2024-01-15") | |
| _apiKey | Yes | Metals-API key | |
| symbols | No | Comma-separated metal symbols (e.g., "XAU,XAG") |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | Yes | Base currency code (e.g., USD, EUR) | |
| date | Yes | Historical date in YYYY-MM-DD format | |
| rates | Yes | Metal spot prices per troy ounce, keyed by symbol (e.g., XAU, XAG) | |
| timestamp | Yes | Unix timestamp of when prices were captured |