← Back to API Ninjas
GET/v1/metalsprice

Get the current spot and futures price of a metal

Returns the current spot price of a metal with its futures price and contract. Spot prices on this listing refresh about once a minute. One metal per request via `metal`.

API Ninjas·$0.001 per call

Example code

// Using @orth/sdk - The simplest way to call APIs // Install: npm install @orth/sdk import Orthogonal from "@orth/sdk"; const orthogonal = new Orthogonal({ apiKey: process.env.ORTHOGONAL_API_KEY, }); const output = await orthogonal.run({ api: "api-ninjas", path: "/v1/metalsprice" }); console.log(output);

Query parameters

metal
string

The metal to return. Defaults to gold. xau, xag, xpt, xpd, and aluminium are also accepted as aliases. (Allowed: gold, silver, platinum, palladium, copper, aluminum) (Default: gold)

currency
string

ISO 4217 currency code to convert prices into (e.g., EUR, GBP, INR). Defaults to USD.

unit
string

Target weight unit. Defaults to the metal's native unit (troy_ounce for precious metals, lb for copper, metric_ton for aluminum). (Allowed: troy_ounce, g, kg, oz, lb, metric_ton, short_ton, hundredweight)

    Orthogonal - Giving AI agents the tools they need.