# Sge — Zapi reference > Every instrument's open, close, high, low and change for one trading day. **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/sge - 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 --- ## Sge **Category:** finance · **Slug:** `sge` **Detail page:** https://zpi.web.id/api/finance/sge Every instrument's open, close, high, low and change for one trading day. **Tags:** finance, sge ### Daily Quotes Every instrument's open, close, high, low and change for one trading day. - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/finance:sge/daily-quotes` - **Cache TTL:** 1800s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `date` | string | query | no | Trading day, YYYY-MM-DD. Default the most recent day with a published session | **cURL:** ```bash curl "https://api.zpi.web.id/v1/finance:sge/daily-quotes?date=2026-08-19" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/finance:sge/daily-quotes?date=2026-08-19", { 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:sge/daily-quotes?date=2026-08-19", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "date": "2026-08-19", "count": 17, "items": [ { "low": 15400, "high": 15400, "open": 15400, "close": 15400, "change": -600, "contract": "Ag99.99", "changePercent": -3.896 }, { "low": 939, "high": 955, "open": 952.2, "close": 944.94, "change": -10.06, "contract": "Au(T+D)", "changePercent": -1.057 }, { "low": 0, "high": 0, "open": 0, "close": 1096.7, "change": 0, "contract": "Au(T+N1)", "changePercent": null }, { "low": 0, "high": 0, "open": 0, "close": 1050, "change": 0, "contract": "Au(T+N2)", "changePercent": null }, { "low": 942, "high": 950, "open": 950, "close": 945.14, "change": -9.8, "contract": "Au100g", "changePercent": -1.032 }, { "low": 0, "high": 0, "open": 0, "close": 370.5, "change": 0, "contract": "Au99.5", "changePercent": null }, { "low": 943, "high": 943, "open": 943, "close": 943, "change": -11, "contract": "Au99.95", "changePercent": -1.166 }, { "low": 939.5, "high": 959.99, "open": 952, "close": 945.22, "change": -9.94, "contract": "Au99.99", "changePercent": -1.044 } ], "dataset": "daily-quotes", "provider": "sge" } ``` --- ### Benchmark Average SHAU period averages — the mean morning and afternoon fixing over a calendar - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/finance:sge/benchmark-average` - **Cache TTL:** 86400s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `period` | enum(month|year) | query | no | Averaging period. Default month | | `start` | string | query | no | Earliest period. YYYY-MM for month, YYYY for year. Default the start of the series | | `end` | string | query | no | Latest period. YYYY-MM for month, YYYY for year. Default the end of the series | **cURL:** ```bash curl "https://api.zpi.web.id/v1/finance:sge/benchmark-average?period=month&start=2016-04&end=2019-12" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/finance:sge/benchmark-average?period=month&start=2016-04&end=2019-12", { 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:sge/benchmark-average?period=month&start=2016-04&end=2019-12", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "end": "2026-08", "count": 45, "items": [ { "period": "201604", "morning": 259.73, "afternoon": 259.94 }, { "period": "201605", "morning": 264.8, "afternoon": 264.66 }, { "period": "201606", "morning": 270.36, "afternoon": 270.93 }, { "period": "201607", "morning": 287.88, "afternoon": 287.84 }, { "period": "201608", "morning": 287.09, "afternoon": 287.21 }, { "period": "201609", "morning": 285.49, "afternoon": 285.58 }, { "period": "201610", "morning": 275.13, "afternoon": 275.29 }, { "period": "201611", "morning": 275.3, "afternoon": 275.56 } ], "start": "2016-04", "period": "month", "dataset": "benchmark-average", "provider": "sge", "benchmark": "SHAU" } ``` --- ### Benchmark Price SHAU — the Shanghai gold benchmark, morning and afternoon fixing per day, - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/finance:sge/benchmark-price` - **Cache TTL:** 3600s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `from` | string | query | no | Earliest date to keep, YYYY-MM-DD | | `to` | string | query | no | Latest date to keep, YYYY-MM-DD | | `order` | enum(desc|asc) | query | no | desc is newest first. Default desc | | `page` | number | query | no | Page number, 1-based. Default 1 | | `limit` | number | query | no | Rows per page. Default 50, max 500 | **cURL:** ```bash curl "https://api.zpi.web.id/v1/finance:sge/benchmark-price?from=2026-01-01&to=2026-08-20&order=desc&page=1&limit=50" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/finance:sge/benchmark-price?from=2026-01-01&to=2026-08-20&order=desc&page=1&limit=50", { 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:sge/benchmark-price?from=2026-01-01&to=2026-08-20&order=desc&page=1&limit=50", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "to": null, "from": "2026-01-01", "page": 1, "count": 50, "items": [ { "date": "2026-08-20", "morning": 970.5, "afternoon": 969.96 }, { "date": "2026-08-19", "morning": 945.27, "afternoon": 943.32 }, { "date": "2026-08-18", "morning": 953.79, "afternoon": 953.88 }, { "date": "2026-08-17", "morning": 951.8, "afternoon": 952.98 }, { "date": "2026-08-14", "morning": 936.17, "afternoon": 940.03 }, { "date": "2026-08-13", "morning": 956.44, "afternoon": 950.18 }, { "date": "2026-08-12", "morning": 955.49, "afternoon": 955.85 }, { "date": "2026-08-11", "morning": 961.33, "afternoon": 946.95 } ], "order": "desc", "total": 153, "dataset": "benchmark-price", "hasMore": true, "nextPage": 2, "provider": "sge", "benchmark": "SHAU" } ``` --- ### History Daily open/close/low/high for one instrument, back to the start of the series. - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/finance:sge/history` - **Cache TTL:** 3600s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `instid` | enum(Au99.99|Au99.95|Au100g|Pt99.95|Ag(T+D)|Au(T+D)|mAu(T+D)|Au(T+N1)|Au(T+N2)|Ag99.99|iAu99.99|Au99.5|iAu100g|iAu99.5|PGC30g|NYAuTN06|NYAuTN12) | query | no | Instrument code. Default Au99.99 | | `from` | string | query | no | Earliest date to keep, YYYY-MM-DD | | `to` | string | query | no | Latest date to keep, YYYY-MM-DD | | `order` | enum(desc|asc) | query | no | desc is newest first. Default desc | | `page` | number | query | no | Page number, 1-based. Default 1 | | `limit` | number | query | no | Rows per page. Default 50, max 500 | **cURL:** ```bash curl "https://api.zpi.web.id/v1/finance:sge/history?instid=Au99.99&from=2026-01-01&to=2026-08-20&order=desc&page=1&limit=50" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/finance:sge/history?instid=Au99.99&from=2026-01-01&to=2026-08-20&order=desc&page=1&limit=50", { 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:sge/history?instid=Au99.99&from=2026-01-01&to=2026-08-20&order=desc&page=1&limit=50", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "to": null, "from": null, "page": 1, "count": 50, "items": [ { "low": 945, "date": "2026-08-20", "high": 972.9, "open": 945, "close": 968.14 }, { "low": 939.5, "date": "2026-08-19", "high": 959.99, "open": 952, "close": 945.22 }, { "low": 948.5, "date": "2026-08-18", "high": 961, "open": 953, "close": 955.16 }, { "low": 946, "date": "2026-08-17", "high": 956, "open": 946, "close": 952.44 }, { "low": 933.01, "date": "2026-08-14", "high": 955, "open": 955, "close": 940.72 }, { "low": 947.2, "date": "2026-08-13", "high": 963, "open": 955, "close": 949.24 }, { "low": 950, "date": "2026-08-12", "high": 958, "open": 952.5, "close": 955.75 }, { "low": 938, "date": "2026-08-11", "high": 965, "open": 940, "close": 946.7 } ], "order": "desc", "total": 2347, "instid": "Au99.99", "dataset": "history", "hasMore": true, "nextPage": 2, "provider": "sge" } ``` --- ### Lease Rates The Shanghai gold lease / lending reference rate curve — O/N out to 3Y, one - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/finance:sge/lease-rates` - **Cache TTL:** 3600s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `from` | string | query | no | Earliest publication date, YYYY-MM-DD. Default 90 days ago | | `to` | string | query | no | Latest publication date, YYYY-MM-DD. Default today | | `tenor` | enum(O/N|1M|3M|6M|9M|1Y|3Y) | query | no | Keep a single tenor. Omit for the whole curve | | `order` | enum(desc|asc) | query | no | desc is newest first. Default desc | | `page` | number | query | no | Page number, 1-based. Default 1 | | `limit` | number | query | no | Quotes per page. Default 50, max 500 | **cURL:** ```bash curl "https://api.zpi.web.id/v1/finance:sge/lease-rates?from=2026-06-01&to=2026-08-20&tenor=1M&order=desc&page=1&limit=50" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/finance:sge/lease-rates?from=2026-06-01&to=2026-08-20&tenor=1M&order=desc&page=1&limit=50", { 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:sge/lease-rates?from=2026-06-01&to=2026-08-20&tenor=1M&order=desc&page=1&limit=50", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "to": "2026-08-21", "from": "2026-06-01", "page": 1, "count": 50, "items": [ { "date": "2026-08-20", "rate": 0.4876, "tenor": "6M", "variety": "1" }, { "date": "2026-08-20", "rate": 0.4407, "tenor": "O/N", "variety": "1" }, { "date": "2026-08-20", "rate": 0.5226, "tenor": "3Y", "variety": "1" }, { "date": "2026-08-20", "rate": 0.4786, "tenor": "3M", "variety": "1" }, { "date": "2026-08-20", "rate": 0.4708, "tenor": "1M", "variety": "1" }, { "date": "2026-08-20", "rate": 0.4933, "tenor": "9M", "variety": "1" }, { "date": "2026-08-20", "rate": 0.4999, "tenor": "1Y", "variety": "1" }, { "date": "2026-08-19", "rate": 0.475, "tenor": "9M", "variety": "1" } ], "order": "desc", "tenor": null, "total": 406, "dataset": "lease-rates", "hasMore": true, "nextPage": 2, "provider": "sge" } ``` --- _Generated: 2026-08-21T07:39:05.326Z_