zapi.
APIsPricingDocsMCP
APIsPricingDocsMCPSign in
zapi.
APIsPricingDocsMCP
APIsPricingDocsMCPSign in
On this page
  • Playground
  • Code examples
  • Full reference
  • Related APIs
Finance/Treasury Id
Logo Treasury Id

Treasury Id

Treasury's current retail gold quote in rupiah — what the app buys at and sells

Endpoints
2
Requests
405
Updated
5 hours ago
For LLMs
llms.txt
Endpoint healthnot yet measured
  • gold-pricenot measured
  • gold-historynot measured
no measurements yetdaily 01:00 WIB

Playground

2 endpoints
GET/v1/finance:treasury-id/gold-price15m cache1 paramchecking key…
Parameters
xstring

Unused — the current price takes no parameters.

·
Response
EXAMPLE
{
  "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
}

Code examples

Gold Price
zpi-sdkrecommended
// 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);
Full SDK reference →
request.sh
curl -X GET "https://api.zpi.web.id/v1/finance:treasury-id/gold-price?x=" \
  -H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"

Full reference

2 endpoints · plain text
GETGold Price/v1/finance:treasury-id/gold-priceTreasury's current retail gold quote in rupiah — what the app buys at and sells

Parameters

xstringoptional
Unused — the current price takes no parameters.

Request

curl -X GET "https://api.zpi.web.id/v1/finance:treasury-id/gold-price?x=" \
  -H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"

Example response

{
  "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
}
GETGold History/v1/finance:treasury-id/gold-historyTreasury's retail gold price series in rupiah. The API decides its own

Parameters

periodenumoptional
Window ending now. Default 1m. Ignored when startDate is given. Values: 1d, 1w, 1m, 3m, 6m, 1y, 5y.
startDatestringoptional
Explicit window start, YYYY-MM-DD. Overrides period.
endDatestringoptional
Explicit window end, YYYY-MM-DD. Defaults to now.
typeenumoptional
Upstream series mode. Default daily. Values: daily, last_price.
orderenumoptional
Oldest first (asc) or newest first (desc). Default asc. Values: asc, desc.
pagenumberoptional
Page of points. Default 1.
limitnumberoptional
Points per page. Default 500, max 2000.

Request

curl -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"

Example response

{
  "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
}

Related APIs

More in finance

Pluang

finance/pluang

Data pasar Pluang lintas aset: order book, running trade, tradebook dan ringkasan broker per saham IDX, plus saham Amerika, emas, kripto, sinyal analis dan berita.

27.9K calls·1d cache

Binance Vision

finance/binance-vision

Binance's public bulk archive: klines, 5-minute open-interest and long/short metrics, funding, book depth and liquidations, back to 2017.

7.9K calls·1d cache

TradingView

finance/tradingview

Screener, charts, technical indicators, fundamentals, news and the macro calendar across 16 markets — Indonesian equities, US equities, crypto, forex and futures.

57K calls·1d cache

Stockbit

finance/stockbit

Data saham IDX dari Stockbit: harga, chart intraday, profil emiten, diskusi komunitas, dan kamus investasi.

17.8K calls·1d cache

Mempool Space

finance/mempool-space

Recommended fee tiers in sat/vB, as mempool.space's own estimator sees them.

1.1K calls·2m cache

Etherscan

finance/etherscan

Current gas price tiers and base fee, from Etherscan's V2 multichain API.

683 calls·30s cache
Browse APIsPricingDocsMCP serverGet an API key
zapi.One key, one response shape.
TermsPrivacyCookiesAUPRefunds© 2026