Treasury Id
Treasury's current retail gold quote in rupiah — what the app buys at and sells
2 endpoints420 calls2/2 passing
Gold Price
GET
/v1/finance:treasury-id/gold-pricepassing · 0.5s15m cache
Parameters
| Name | Type | In | Description |
|---|---|---|---|
| x | string | query | Unused — the current price takes no parameters. |
Example response
{"project":"finance:treasury-id", "data": {"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 },"timestamp":"2026-08-21T02:23:58Z"}
Errors
- 401Missing or invalid x-api-key
- 404Not found or private
- 429Rate limit or monthly quota reached
Gold History
Treasury's retail gold price series in rupiah. The API decides its own
GET
/v1/finance:treasury-id/gold-historypassing · 0.3s1h cache
Parameters
| Name | Type | In | Description |
|---|---|---|---|
| period | enum | query | Window ending now. Default 1m. Ignored when startDate is given. One of 1d, 1w, 1m, 3m, 6m, 1y, 5y. |
| startDate | string | query | Explicit window start, YYYY-MM-DD. Overrides period. |
| endDate | string | query | Explicit window end, YYYY-MM-DD. Defaults to now. |
| type | enum | query | Upstream series mode. Default daily. One of daily, last_price. |
| order | enum | query | Oldest first (asc) or newest first (desc). Default asc. One of asc, desc. |
| page | number | query | Page of points. Default 1. |
| limit | number | query | Points per page. Default 500, max 2000. |
Example response
{"project":"finance:treasury-id", "data": {"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 },"timestamp":"2026-08-21T02:23:58Z"}
Errors
- 401Missing or invalid x-api-key
- 404Not found or private
- 429Rate limit or monthly quota reached
Try it
Live request with your key
const data = await client.run( "finance:treasury-id", "gold-price", {});
Treasury Id
Treasury's current retail gold quote in rupiah — what the app buys at and sells
2 endpoints420 calls2/2 passing
GET
/v1/…treasury-id/gold-pricepassing · 0.5s15m cache
Try it
Parameters
x
string · query · optional
Unused — the current price takes no parameters.
Example response
{"project":"finance:treasury-id", "data": {"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 },"timestamp":"2026-08-21T02:23:58Z"}
Errors
- 401Missing or invalid x-api-key
- 404Not found or private
- 429Rate limit or monthly quota reached
Code
const data = await client.run( "finance:treasury-id", "gold-price", {});