Feature Guide · Commodities API

Gold & Commodity Price API: Real-Time Gold, Oil and Metals Prices

Stream live gold (XAU/USD), silver, crude oil, natural gas, copper and grain prices over WebSocket, or query quotes and historical candles via REST. One commodities API for spot precious metals and global futures markets.

  • Live gold and silver spot prices (XAU/USD, XAG/USD) with real-time WebSocket push
  • Energy, metals and agriculture futures from CME, ICE, SHFE and more
  • Quotes, tick data, depth and OHLCV history in one schema
  • Free API key - no credit card to start
import json
import websocket  # pip install websocket-client

TOKEN = "YOUR_API_TOKEN"

def on_open(ws):
    ws.send(json.dumps({
        "ac": "subscribe",
        "params": "XAUUSD$GB,XAGUSD$GB",
        "types": "quote,tick"
    }))

def on_message(ws, message):
    print(json.loads(message))

ws = websocket.WebSocketApp(
    "wss://api.itick.org/forex",
    header={"token": TOKEN},
    on_open=on_open,
    on_message=on_message,
)
ws.run_forever(ping_interval=20)
XAU / XAGSpot precious metals
3Commodity sectors
msStreaming latency
FreePlan to get started

A commodity price API built for developers

Accurate gold, oil and metals data for trading apps, pricing engines and dashboards.

Real-time gold price API

Live XAU/USD and XAG/USD quotes pushed over WebSocket as the market moves - ideal for jewelry pricing, bullion apps and FX platforms.

Crude oil & energy

WTI and Brent crude, natural gas and other energy futures with real-time quotes and historical bars.

Industrial metals

Copper, aluminium and other base metals from major global futures exchanges.

Agricultural commodities

Soybeans, corn, wheat and more for food, logistics and commodity research use cases.

Commodity price history

Minute to monthly OHLCV candles for backtesting and long-term price analysis.

REST + WebSocket

Poll quotes via REST or subscribe once and receive every update - the same API as stocks and forex.

Commodities covered

Popular instruments available through the iTick commodities API.

SectorExamplesDataEndpoint
Precious metals (spot)Gold XAU/USD, Silver XAG/USDQuote, tick, OHLCV/forex/*
EnergyWTI crude oil, Brent crude, natural gasQuote, tick, depth, OHLCV/future/*
Metals futuresGold, silver, copper, aluminium futuresQuote, tick, depth, OHLCV/future/*
AgricultureSoybeans, corn, wheat, sugarQuote, tick, depth, OHLCV/future/*
Commodity indicesGlobal commodity benchmark indicesQuote, OHLCV/indices/*

Symbol codes and regions for each contract are listed in the symbol list endpoint of the docs.

Get a live gold price in a few lines

Subscribe to XAU/USD and XAG/USD over WebSocket, or request a REST quote on demand.

  1. Create a free account and copy your token
  2. Subscribe to XAUUSD$GB on the forex WebSocket
  3. Use the future endpoints for oil, metals and grain contracts
import json
import websocket  # pip install websocket-client

TOKEN = "YOUR_API_TOKEN"

def on_open(ws):
    ws.send(json.dumps({
        "ac": "subscribe",
        "params": "XAUUSD$GB,XAGUSD$GB",
        "types": "quote,tick"
    }))

def on_message(ws, message):
    print(json.loads(message))

ws = websocket.WebSocketApp(
    "wss://api.itick.org/forex",
    header={"token": TOKEN},
    on_open=on_open,
    on_message=on_message,
)
ws.run_forever(ping_interval=20)

Common commodity data use cases

Bullion & jewelry pricing

Update gold and silver prices on your site in real time.

Trading platforms

Offer gold, oil and metals alongside FX and CFDs.

Risk & procurement

Track raw-material costs and hedge exposure.

Market dashboards

Show live commodity tickers and charts to your users.

Gold & commodity API FAQ

Is there a free gold price API?

Yes. Sign up for a free iTick API key to query real-time gold (XAU/USD) and silver (XAG/USD) prices for personal and evaluation use. Paid plans add higher limits and commercial rights.

Does the gold price API support WebSocket streaming?

Yes. Connect to the forex WebSocket and subscribe to XAUUSD to receive live quote and tick updates without polling.

Which commodities does the API cover?

Spot gold and silver, plus energy (crude oil, natural gas), industrial metals (copper, aluminium) and agricultural futures (soybeans, corn, wheat) from major exchanges such as CME, ICE and SHFE.

Can I get historical commodity prices?

Yes. The kline endpoint returns OHLCV history from 1-minute to monthly bars for gold, oil and other commodities.

What format is the data returned in?

All REST responses are JSON and WebSocket messages are JSON objects with a type field (quote, tick or depth), identical to the stock and forex APIs.

Add live gold and commodity prices to your app

Free API key, real-time WebSocket streaming and years of commodity price history.