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

NameTypeRequiredDescription
_apiKeystringyesMetals-API key
basestringnoBase currency (default “USD”). E.g., “EUR”, “GBP”
symbolsstringnoComma-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

FieldTypeDescription
basestringBase currency code (e.g., USD, EUR)
datestringDate of the latest prices in YYYY-MM-DD format
timestampnumberUnix timestamp of when prices were captured
ratesobjectMetal 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.

Regenerated from source · build September 22, 2026