Skip to content
AllTick
API Selection

Gold Market Data: Symbols & Pricing

Distinguish spot gold (XAU/USD), gold futures, and domestic gram-denominated contracts, and verify symbol conventions and units before coding.

Updated:
Maintained by:AllTick Technical Team
Audience:Developers displaying or computing gold and precious metal prices in applications

Core Takeaway · 30-Second Brief

"Gold price" can refer to international spot gold (such as XAU/USD quoted in USD per troy ounce), exchange-traded gold futures with expiration months, or domestic contracts quoted in local currency per gram. Before integrating, verify which instrument the symbol represents, its currency and weight unit, and whether quotes represent trades or bid/ask levels.

01

Common Gold Pricing Conventions

Instrument TypeTypical SymbolsPricing Unit
International Spot GoldXAUUSD, GOLDUSD per Troy Ounce
Exchange Gold FuturesExchange contract codesPer contract spec with expiry month
Domestic Gold ContractsLocal exchange tickersLocal currency (e.g. CNY) per Gram

02

Five Steps to Verify Gold Symbols

1Search the provider’s symbol directory for gold instruments and record each description.
2Confirm whether the ticker represents spot bullion, a futures contract, or a CFD.
3Verify the quote currency and weight unit (troy ounce vs gram).
4Fetch a live quote and sanity-check the price magnitude against a public benchmark.
5Document the exact pricing spec in your internal symbol mapping table.

03

Unit Conversion Reference

Converting USD per troy ounce to CNY per gram (display estimation)python
TROY_OUNCE_GRAMS = 31.1034768
def usd_oz_to_cny_gram(usd_per_oz: float, usd_cny: float) -> float:
return round(usd_per_oz * usd_cny / TROY_OUNCE_GRAMS, 2)
print(usd_oz_to_cny_gram(2400.0, 7.10)) # 547.85

04

Gold Feeds in AllTick

AllTick categorizes gold, silver, and crude oil under precious metals and commodities, served via the quote-b-api endpoints. Representative symbols include GOLD, Silver, and USOIL (with XAU/USD shown in market examples). Always confirm exact ticker codes in the official product list before going live.

Sources & Verification · 2026-10-13

Relevant endpoint, field, and exchange rules were checked against the primary specifications linked below.

Python examples passed ast.parse on Python 3.14.0. This checks syntax only; dependencies, runtime compatibility, and network responses were not tested.

Authenticated AllTick requests and production end-to-end tests were not run for this review. Record your token plan, library versions, market session, ret/trace, and observed results when reproducing these checks.

Reproduce before deployment

  • Resolve the exact code and quotation currency instead of assuming GOLD and XAUUSD are interchangeable. Preserve the original unit before converting troy ounces to grams.
  • For currency conversion, capture both instrument and FX timestamps and reject stale or mismatched inputs. Compare exact Decimal and rounded display values.