---
title: "Shanghai gold price API: yuan per gram, spot and futures · goldprice.dev"
description: "Shanghai gold over a REST API and MCP: the Shanghai exchange price and Shanghai gold futures by month, in yuan per gram with no dollar conversion. Free plan included."
canonical: "https://goldprice.dev/shanghai-gold-price-api"
---

# Shanghai gold price API

Gold on the Shanghai market, in yuan per gram

26 Nov 2026 · 2 min read

Two calls return gold as Shanghai trades it: the exchange price of physical gold and the futures months, both in yuan per gram with no dollar conversion. Every plan includes them: Free is 15 minutes late, Basic, Plus, and Pro are live.

## What the API returns

The Shanghai exchange price is the price of physical gold traded in Shanghai. Shanghai gold futures trade by delivery month on the Shanghai Futures Exchange. Both are in yuan per gram.

| Call | What it returns |
| --- | --- |
| `/v1/prices?symbol=XAU-CNY-SGE` | The Shanghai exchange price in yuan per gram |
| `/v1/futures/XAU?exchange=SHFE` | Shanghai gold futures, the most traded month |

## Get the Shanghai exchange price

This request returns the Shanghai exchange price, with the time it was computed and whether it is stale.

```bash
curl "https://api.goldprice.dev/v1/prices?symbol=XAU-CNY-SGE" \
  -H "Authorization: Bearer $GOLDPRICE_API_KEY"
```

```javascript
const res = await fetch("https://api.goldprice.dev/v1/prices?symbol=XAU-CNY-SGE", {
  headers: { Authorization: `Bearer ${process.env.GOLDPRICE_API_KEY}` },
})
const data = await res.json()
if (!res.ok) throw new Error(data.error)
```

```python
import os, requests

res = requests.get(
    "https://api.goldprice.dev/v1/prices?symbol=XAU-CNY-SGE",
    headers={"Authorization": f"Bearer {os.environ['GOLDPRICE_API_KEY']}"},
    timeout=10,
)
res.raise_for_status()
data = res.json()
```

## Get Shanghai gold futures

Add `exchange=SHFE` to the gold futures call. The answer has the same fields as the New York futures, with `currency` CNY and `unit` gram.

```bash
curl "https://api.goldprice.dev/v1/futures/XAU?exchange=SHFE" \
  -H "Authorization: Bearer $GOLDPRICE_API_KEY"
```

| Field | Meaning |
| --- | --- |
| `symbol` | Metal code: XAU, XAG, HG, XPT or XPD |
| `exchange` | The exchange: COMEX, NYMEX, or SHFE for Shanghai gold |
| `contract_month` | The delivery month of the contract, as YYYY-MM |
| `most_traded` | True when this is the month with the most trading |
| `price` | The middle of the best bid and best ask |
| `bid`, `ask` | Best bid and best ask; null when the market shows none |
| `day_high`, `day_low` | Highest and lowest price of the trading day; null when there is none yet |
| `currency` | Currency of the price: USD, or CNY on SHFE |
| `unit` | `troy_ounce` for gold, silver, platinum and palladium, `pound` for copper, `gram` on SHFE |
| `timestamp` | When we received the price (UTC) |
| `delayed` | True when our live feed is down: the price comes from a backup that runs late, or cannot be confirmed while the market trades |
| `state`, `message`, `next_open` | Only while the market is closed: `closed`, with `message` and `next_open` (UTC) |

## What people build with it

- A gold shop screen in China that shows the local market price
- A tracker of the gap between Shanghai and the world price
- A savings app that values gold in yuan per gram
- An agent that answers what gold trades at in Shanghai right now

## Plans

Shanghai gold follows the spot rule on every plan. The full list is on [pricing](https://goldprice.dev/pricing).

| Plan | Free | Basic | Plus | Pro |
| --- | --- | --- | --- | --- |
| Futures prices | 15 minutes late | Live | Live | Live |
| Requests a month | 5,000 | 100,000 | 300,000 | 1,000,000 |

## Next

Every futures parameter and error is in the [futures reference](https://goldprice.dev/docs/futures). The [Shanghai gold price page](https://goldprice.dev/prices/xau-cny-sge) shows the latest price.

## Questions

### Is the Shanghai gold price converted from dollars?

No. Both prices come from the Shanghai market in yuan per gram. The dollar gold price in yuan is a different number, on the [gold price in CNY page](/gold/cny).

### When does Shanghai gold trade?

On Beijing weekdays, in a day session and a night session that runs past midnight. Outside them the answer is the last price, with state set to closed and next_open.

### Why is Shanghai gold higher than the dollar price in yuan?

Gold in China often trades above the world price converted to yuan, because of local demand and import rules. The gap moves day by day.

### Is Shanghai gold on the free plan?

Yes. Free includes it 15 minutes late, with 5,000 requests a month. Basic, Plus, and Pro get live prices. See [pricing](/pricing).

## Keep reading

- [Futures API reference](https://goldprice.dev/docs/futures)
- [Shanghai Gold Price Today (SGE)](https://goldprice.dev/prices/xau-cny-sge)
- [Pricing](https://goldprice.dev/pricing)

Source: https://goldprice.dev/shanghai-gold-price-api
