Attributed metadata history
Up to 100 retained publisher events per page for a0379ba971a9580ee910bfd9781fe4e66040b542e591f0737b2825621f176764. Withdrawals and unavailable references remain attributed to their publishers.
intelligence_src_6dc544294b7f21f98a
observed · 2026-11-27 05:54:02 UTC
Gold prices are quoted globally in US dollars per troy ounce, but shoppers in Saudi Arabia think in riyals per gram, split by karat (24K, 22K, 21K, 18K). If you are building a finance widget, a price bot or just a personal dashboard, converting between the two is a small but surprisingly error-prone task. Here is a clean way to do it. The constants you need 1 troy ounce = 31.1034768 grams. Not the 28.35 g avoirdupois ounce — this is the most common bug. USD/SAR = 3.75. The Saudi riyal has been pegged to the dollar at this rate for decades, so you can usually hard-code it (but keep it configurable). Purity by karat is simply karat / 24. So 21K is 0.875 pure, 18K is 0.75 pure. The helper const GRAMS_PER_TROY_OZ = 31.1034768; const USD_TO_SAR = 3.75; function goldPricePerGramSAR(spotUsdPerOz, karat = 24, { usdToSar = USD_TO_SAR } = {}) { if (!Number.isFinite(spotUsdPerOz) || spotUsdPerOz <= 0) { throw new Error("spot price must be a positive number"); } if (karat <= 0 || karat > 24) throw new Error("karat must be between 1 and 24"); const pureGramSar = (spotUsdPerOz / GRAMS_PER_TROY_OZ) * usdToSar; return pureGramSar * (karat /
Fingerprint: 664259b88f8e511cc44314bd0fc6c0ef3ac129c793847c9233a36910c333768c
intelligence_src_6dc544294b7f21f98a
observed · 2026-10-12 11:01:03 UTC
available
Fingerprint: 2faf9469031bd0e00603457ab86d15e2040aea06ef98482184945872c5cb389f