Treasury's current retail gold quote in rupiah — what the app buys at and sells
gold-pricenot measuredgold-historynot measured/v1/finance:treasury-id/gold-price15m cache1 paramchecking key…// npm i zpi-sdk
import { ZpiClient } from "zpi-sdk";
const client = new ZpiClient({ apiKey: "zpi_xxxxxxxxxxxxxxxxxxxxxxxx" });
const data = await client.run("finance:treasury-id", "gold-price", {});
console.log(data);curl -X GET "https://api.zpi.web.id/v1/finance:treasury-id/gold-price?x=" \
-H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"/v1/finance:treasury-id/gold-priceTreasury's current retail gold quote in rupiah — what the app buys at and sellsxstringoptionalcurl -X GET "https://api.zpi.web.id/v1/finance:treasury-id/gold-price?x=" \
-H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"{
"asOf": "2026-08-21T09:23:00",
"metal": "gold",
"spread": 87611,
"dataset": "gold-price",
"asOfText": "21/08/26 - 09:23",
"buyPrice": 2655779,
"currency": "IDR",
"movement": "profit",
"provider": "treasury-id",
"unitGram": 1,
"changeAbs": 30090,
"sellPrice": 2568168,
"changePercent": 1.15
}/v1/finance:treasury-id/gold-historyTreasury's retail gold price series in rupiah. The API decides its ownperiodenumoptionalstartDatestringoptionalendDatestringoptionaltypeenumoptionalorderenumoptionalpagenumberoptionallimitnumberoptionalcurl -X GET "https://api.zpi.web.id/v1/finance:treasury-id/gold-history?period=1m&startDate=2026-01-01&endDate=2026-08-20&type=daily&order=asc&page=1&limit=500" \
-H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"{
"page": 1,
"type": "daily",
"count": 31,
"items": [
{
"time": "2026-07-22T00:00:00",
"spread": 81942,
"buyPrice": 2484171,
"timeText": "22/07/26 - 00:00",
"sellPrice": 2402229
},
{
"time": "2026-07-23T00:00:00",
"spread": 81524,
"buyPrice": 2474085,
"timeText": "23/07/26 - 00:00",
"sellPrice": 2392561
},
{
"time": "2026-07-24T00:00:00",
"spread": 80332,
"buyPrice": 2438342,
"timeText": "24/07/26 - 00:00",
"sellPrice": 2358010
},
{
"time": "2026-07-25T00:00:00",
"spread": 80193,
"buyPrice": 2432033,
"timeText": "25/07/26 - 00:00",
"sellPrice": 2351840
},
{
"time": "2026-07-26T00:00:00",
"spread": 82067,
"buyPrice": 2421212,
"timeText": "26/07/26 - 00:00",
"sellPrice": 2339145
},
{
"time": "2026-07-27T00:00:00",
"spread": 81272,
"buyPrice": 2464130,
"timeText": "27/07/26 - 00:00",
"sellPrice": 2382858
},
{
"time": "2026-07-28T00:00:00",
"spread": 81159,
"buyPrice": 2460448,
"timeText": "28/07/26 - 00:00",
"sellPrice": 2379289
},
{
"time": "2026-07-29T00:00:00",
"spread": 80385,
"buyPrice": 2437428,
"timeText": "29/07/26 - 00:00",
"sellPrice": 2357043
}
],
"metal": "gold",
"order": "asc",
"total": 31,
"period": "1m",
"dataset": "gold-history",
"endDate": "2026-08-21",
"hasMore": false,
"currency": "IDR",
"movement": "profit",
"nextPage": null,
"provider": "treasury-id",
"unitGram": 1,
"changeAbs": 171608,
"startDate": "2026-07-22",
"changePercent": 6.91
}