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.
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 Type | Typical Symbols | Pricing Unit |
|---|---|---|
| International Spot Gold | XAUUSD, GOLD | USD per Troy Ounce |
| Exchange Gold Futures | Exchange contract codes | Per contract spec with expiry month |
| Domestic Gold Contracts | Local exchange tickers | Local currency (e.g. CNY) per Gram |
02
Five Steps to Verify Gold Symbols
03
Unit Conversion Reference
TROY_OUNCE_GRAMS = 31.1034768def 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.8504
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.
Primary specifications
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.