# UBS Gold — Zapi reference > Indonesian retail gold from UBS — buy and buyback price per bar denomination, with daily history. **Base URL:** `https://api.zpi.web.id` **Auth:** Send `x-api-key: YOUR_KEY` header on every request. Get a free key at https://zpi.web.id/dashboard/keys. **Response envelope:** `{ content, message, errors }` **Rate limit:** 60 req/min on free tier. **Related:** - Detail page: https://zpi.web.id/api/finance/ubs - Endpoint catalog: https://zpi.web.id/category/finance - Concise index: https://zpi.web.id/llms.txt - Full reference: https://zpi.web.id/llms-full.txt --- ## UBS Gold **Category:** finance · **Slug:** `ubs` **Detail page:** https://zpi.web.id/api/finance/ubs Indonesian retail gold from UBS — buy and buyback price per bar denomination, with daily history. **Tags:** gold, indonesia, idr, buyback, commodity ### Price board Buy and buyback price for every bar denomination on today's board. - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/finance:ubs/price` - **Cache TTL:** 1800s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `denomination` | number | query | no | Keep only this bar weight in grams. Omit for the whole board. | **cURL:** ```bash curl "https://api.zpi.web.id/v1/finance:ubs/price?denomination=1" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/finance:ubs/price?denomination=1", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/finance:ubs/price?denomination=1", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "asOf": "2026-08-29", "count": 13, "items": [ { "spread": 100800, "buyPrice": 215800, "weightGram": 0.05, "weightText": "0.05 Gram", "buybackPrice": 115000, "buyPricePerGram": 4316000, "buybackPricePerGram": 2300000 }, { "spread": 113600, "buyPrice": 344600, "weightGram": 0.1, "weightText": "0.1 Gram", "buybackPrice": 231000, "buyPricePerGram": 3446000, "buybackPricePerGram": 2310000 }, { "spread": 207900, "buyPrice": 784900, "weightGram": 0.25, "weightText": "0.25 Gram", "buybackPrice": 577000, "buyPricePerGram": 3139600, "buybackPricePerGram": 2308000 }, { "spread": 261700, "buyPrice": 1416700, "weightGram": 0.5, "weightText": "0.5 Gram", "buybackPrice": 1155000, "buyPricePerGram": 2833400, "buybackPricePerGram": 2310000 }, { "spread": 201500, "buyPrice": 2512500, "weightGram": 1, "weightText": "1 Gram", "buybackPrice": 2311000, "buyPricePerGram": 2512500, "buybackPricePerGram": 2311000 }, { "spread": 339100, "buyPrice": 4962100, "weightGram": 2, "weightText": "2 Gram", "buybackPrice": 4623000, "buyPricePerGram": 2481050, "buybackPricePerGram": 2311500 }, { "spread": 491700, "buyPrice": 7425700, "weightGram": 3, "weightText": "3 Gram", "buybackPrice": 6934000, "buyPricePerGram": 2475233, "buybackPricePerGram": 2311333 }, { "spread": 618700, "buyPrice": 9864700, "weightGram": 4, "weightText": "4 Gram", "buybackPrice": 9246000, "buyPricePerGram": 2466175, "buybackPricePerGram": 2311500 } ], "metal": "gold", "total": 13, "dataset": "price", "currency": "IDR", "provider": "ubs", "denomination": null, "productionYear": 2026, "denominationsAvailable": [ 0.05, 0.1, 0.25, 0.5, 1, 2, 3, 4 ] } ``` --- ### Buyback Buyback price per denomination — UBS quotes a different rate for each bar size. - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/finance:ubs/buyback` - **Cache TTL:** 1800s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `denomination` | number | query | no | Keep only this bar weight in grams. Omit for the whole board. | **cURL:** ```bash curl "https://api.zpi.web.id/v1/finance:ubs/buyback?denomination=1" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/finance:ubs/buyback?denomination=1", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/finance:ubs/buyback?denomination=1", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "asOf": "2026-08-29", "count": 13, "items": [ { "weightGram": 0.05, "weightText": "0.05 Gram", "buybackPrice": 115000, "buybackPricePerGram": 2300000 }, { "weightGram": 0.1, "weightText": "0.1 Gram", "buybackPrice": 231000, "buybackPricePerGram": 2310000 }, { "weightGram": 0.25, "weightText": "0.25 Gram", "buybackPrice": 577000, "buybackPricePerGram": 2308000 }, { "weightGram": 0.5, "weightText": "0.5 Gram", "buybackPrice": 1155000, "buybackPricePerGram": 2310000 }, { "weightGram": 1, "weightText": "1 Gram", "buybackPrice": 2311000, "buybackPricePerGram": 2311000 }, { "weightGram": 2, "weightText": "2 Gram", "buybackPrice": 4623000, "buybackPricePerGram": 2311500 }, { "weightGram": 3, "weightText": "3 Gram", "buybackPrice": 6934000, "buybackPricePerGram": 2311333 }, { "weightGram": 4, "weightText": "4 Gram", "buybackPrice": 9246000, "buybackPricePerGram": 2311500 } ], "metal": "gold", "total": 13, "dataset": "buyback", "currency": "IDR", "provider": "ubs", "denomination": null, "productionYear": 2026, "denominationsAvailable": [ 0.05, 0.1, 0.25, 0.5, 1, 2, 3, 4 ], "appliesToAllDenominations": false } ``` --- ### History Daily 1 g buyback series back to 2023, filterable by date window. - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/finance:ubs/history` - **Cache TTL:** 3600s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `days` | number | query | no | How many of the most recent published days to pull. Default 30. Ignored when from or to is given. | | `from` | string | query | no | Earliest date to include, YYYY-MM-DD. | | `to` | string | query | no | Latest date to include, YYYY-MM-DD. | | `order` | enum(asc|desc) | query | no | Oldest first (asc) or newest first (desc). Default desc. | | `page` | number | query | no | Page of days. Default 1. | | `limit` | number | query | no | Days per page. Default 100, max 1000. | **cURL:** ```bash curl "https://api.zpi.web.id/v1/finance:ubs/history?days=30&from=2026-01-01&to=2026-08-29&order=desc&page=1&limit=100" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/finance:ubs/history?days=30&from=2026-01-01&to=2026-08-29&order=desc&page=1&limit=100", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/finance:ubs/history?days=30&from=2026-01-01&to=2026-08-29&order=desc&page=1&limit=100", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "to": "2026-08-29", "days": null, "from": "2026-08-01", "page": 1, "count": 10, "items": [ { "low": 2289000, "date": "2026-08-04", "high": 2289000, "open": 2289000, "close": 2278000 }, { "low": 2338000, "date": "2026-08-05", "high": 2338000, "open": 2338000, "close": 2327000 }, { "low": 2404000, "date": "2026-08-06", "high": 2404000, "open": 2404000, "close": 2393000 }, { "low": 2390000, "date": "2026-08-07", "high": 2390000, "open": 2390000, "close": 2379000 }, { "low": 2391000, "date": "2026-08-08", "high": 2391000, "open": 2391000, "close": 2380000 }, { "low": 2418000, "date": "2026-08-11", "high": 2418000, "open": 2418000, "close": 2406000 }, { "low": 2381000, "date": "2026-08-12", "high": 2381000, "open": 2381000, "close": 2370000 }, { "low": 2371000, "date": "2026-08-14", "high": 2371000, "open": 2371000, "close": 2360000 } ], "metal": "gold", "order": "asc", "total": 21, "covered": 498, "dataset": "history", "hasMore": true, "currency": "IDR", "nextPage": 2, "provider": "ubs", "unitGram": 1, "latestDate": "2026-08-29", "earliestDate": "2023-11-20" } ``` --- ### Summary Today's 1 g buy and buyback, with the change against the previous published day. - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/finance:ubs/summary` - **Cache TTL:** 1800s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `x` | string | query | no | Unused — the summary takes no parameters. | **cURL:** ```bash curl "https://api.zpi.web.id/v1/finance:ubs/summary?x=" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/finance:ubs/summary?x=", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/finance:ubs/summary?x=", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "asOf": "2026-08-29", "metal": "gold", "spread": 201500, "dataset": "summary", "buyPrice": 2512500, "currency": "IDR", "provider": "ubs", "unitGram": 1, "changeAbs": -28000, "buybackPrice": 2311000, "previousDate": "2026-08-28", "changePercent": -1.2, "denominationCount": 13, "previousBuybackPrice": 2339000 } ``` --- _Generated: 2026-08-29T12:22:29.920Z_