Gold Price Today

API Integration Guide

Free API to get real-time gold price data.

Endpoints

GET /api/prices

Get current prices for all gold types

GET /api/prices?type={code}

Get price for a specific gold type

GET /api/prices?type={code}&days={n}

Get price history for n days

Parameters

Parameter Type Description
type string Gold type code (XAUUSD, SJL1L10, SJ9999...)
days integer Number of history days (1-30)
action string "current" for current prices, "summary" for summary

Sample Response

{
  "success": true,
  "current_time": 1732456789,
  "data": [
    {
      "type_code": "SJL1L10",
      "buy": 85500000,
      "sell": 88000000,
      "change_buy": 100000,
      "change_sell": 100000,
      "update_time": 1732456789
    }
  ]
}

Supported Gold Types

XAUUSD
World Gold (XAU/USD)
SJL1L10
SJC 9999
SJ9999
SJC Ring
DOHNL
DOJI Hanoi
DOHCML
DOJI HCM
DOJINHTV
DOJI Jewelry
BTSJC
Bao Tin SJC
BT9999NTT
Bao Tin 9999
PQHNVM
PNJ Hanoi
PQHN24NTT
PNJ 24K
VNGSJC
VN Gold SJC
VIETTINMSJC
Viettin SJC

Notes

  • API is completely free, no API key required
  • Data is updated every 5 minutes
  • Domestic gold prices are in VND/tael
  • World gold (XAUUSD) is in USD/oz
  • CORS enabled, can be called from browser

Usage Examples

JavaScript (fetch)

fetch('/api/prices')
  .then(res => res.json())
  .then(data => console.log(data));

cURL

curl "https://giavang.now/api/prices?type=SJL1L10"

PHP

$data = json_decode(file_get_contents('https://giavang.now/api/prices'));
Back to homepage
Filter Gold Types

Price Chart

Buy
Sell