Precious Metals Data for Prediction Markets

Add live and historical gold, silver, platinum, and palladium prices to market dashboards, research tools, alerts, and contract-design workflows through a straightforward JSON API.

Connect the outcome market to the underlying metal

Prediction-market APIs provide contracts, probabilities, and order books. MetalpriceAPI provides the underlying metals data that helps users understand those markets. Combine the two sources in your own application without treating a spot price and a contract probability as the same thing.

Underlying prices

Retrieve current and historical metal prices in USD or more than 150 other currencies.

Market probabilities

Read odds, contracts, and liquidity from the prediction-market venue you integrate.

Your application

Calculate distance to a strike, build alerts, visualize context, and run historical analysis.

Useful workflows for prediction-market teams

Design realistic thresholds

Use historical ranges and OHLC observations to evaluate strike spacing, price buckets, and expiration windows before publishing a market.

Show distance to an outcome

Display the current metal price, the contract threshold, the absolute gap, and the percentage move required to reach it.

Create price alerts

Notify users when gold or silver moves within a chosen percentage of a market threshold or crosses a monitored level.

Backtest market behavior

Join historical metal observations with archived probability data to study reactions, divergence, and behavior near expiration.

Localize market context

Express precious-metal values in the currencies your audience uses while preserving the contract’s formal resolution denomination.

Support operational review

Use stored observations for monitoring and provisional checks while resolving every contract according to its published rules.

Monitor a gold-price threshold

This example retrieves the current XAU rate, converts it to USD per troy ounce, and calculates how far the price is from an application-defined threshold.

  • Keep the API key on your server
  • Validate success before using the response
  • Store timestamps with calculated signals
const threshold = 4100;

const url = new URL("https://api.metalpriceapi.com/v1/latest");
url.search = new URLSearchParams({
  api_key: process.env.METALPRICEAPI_KEY,
  base: "USD",
  currencies: "XAU"
});

const response = await fetch(url);
const data = await response.json();

if (!data.success) {
  throw new Error(data.error?.info || "Price request failed");
}

const goldUsd = 1 / data.rates.XAU;
const distance = threshold - goldUsd;
const moveRequired = (distance / goldUsd) * 100;

console.log({ goldUsd, threshold, distance, moveRequired });

Choose the right data for each job

JobMetalpriceAPI dataUse it for
Live contextLatest ratesPrice displays, distance-to-threshold calculations, and alerts
Single past observationHistorical dateOutcome research and reproducible comparisons
Daily seriesTimeframeCharts, range analysis, and model inputs
Intraday analysisHourly dataReaction studies and monitoring around market events
Daily range analysisOHLCThreshold design and high/low comparisons

Review endpoint availability and plan limits in the API documentation.

Add metals data to your prediction-market workflow

Create a free API key and test a live price, historical date, or threshold-monitoring workflow.

Get a free API key Read the documentation