get_latest
Pack: metals-api · Endpoint: https://gateway.pipeworx.io/metals-api/mcp
No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/get_latest for the schema, then POST the same URL with its arguments for the data.
Get the latest precious and base metal spot prices (gold, silver, platinum, palladium, copper, etc.). Prices are per troy ounce. Optionally specify base currency and metal symbols.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
_apiKey | string | yes | Metals-API key |
base | string | no | Base currency (default “USD”). E.g., “EUR”, “GBP” |
symbols | string | no | Comma-separated metal symbols to filter (e.g., “XAU,XAG,XPT”). XAU=gold, XAG=silver, XPT=platinum, XPD=palladium, XCU=copper |
Example call
Arguments
{
"_apiKey": "your-metals-api-key"
}
curl
curl -X POST https://gateway.pipeworx.io/metals-api/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_latest","arguments":{"_apiKey":"your-metals-api-key"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('get_latest', {
"_apiKey": "your-metals-api-key"
});
More examples
{
"_apiKey": "your-metals-api-key",
"base": "EUR",
"symbols": "XAU,XAG,XPT"
}
Response shape
Always returns: base, date, timestamp, rates
| Field | Type | Description |
|---|---|---|
base | string | Base currency code (e.g., USD, EUR) |
date | string | Date of the latest prices in YYYY-MM-DD format |
timestamp | number | Unix timestamp of when prices were captured |
rates | object | Metal spot prices per troy ounce, keyed by symbol (e.g., XAU, XAG) |
Full JSON Schema
{
"type": "object",
"properties": {
"base": {
"type": "string",
"description": "Base currency code (e.g., USD, EUR)"
},
"date": {
"type": "string",
"description": "Date of the latest prices in YYYY-MM-DD format"
},
"timestamp": {
"type": "number",
"description": "Unix timestamp of when prices were captured"
},
"rates": {
"type": "object",
"description": "Metal spot prices per troy ounce, keyed by symbol (e.g., XAU, XAG)",
"additionalProperties": {
"type": "number"
}
}
},
"required": [
"base",
"date",
"timestamp",
"rates"
]
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"metals-api": {
"url": "https://gateway.pipeworx.io/metals-api/mcp"
}
}
}
See Getting Started for client-specific install steps.