# Shanghai Gold Exchange Prices: Gold Benchmark & SGE Quotes (`sinodata/shanghai-gold-prices`) Actor

Official Shanghai Gold Exchange (SGE) data, no login: the Shanghai Gold and Silver benchmark prices (AM and PM fixings since 2016 and 2019) and daily quotes for every SGE contract (Au99.99, Au(T+D), Ag(T+D), Pt and more) with open, high, low, close, volume and open interest.

- **URL**: https://apify.com/sinodata/shanghai-gold-prices.md
- **Developed by:** [SinoData](https://apify.com/sinodata) (community)
- **Categories:** Business, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.45 / 1,000 price records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Shanghai Gold Exchange Prices: Gold Benchmark & SGE Quotes

Get **official Shanghai Gold Exchange (上海黄金交易所, SGE) prices** as clean JSON, straight from sge.com.cn. China is the world's largest gold consumer, and the SGE is where its physical gold is priced. No login, no Chinese needed.

- **Shanghai Gold Benchmark Price (上海金基准价)**: the yuan gold fixing, AM and PM, every trading day **since April 2016**, in CNY per gram
- **Shanghai Silver Benchmark Price (上海银基准价)**: AM and PM, every trading day **since October 2019**, in CNY per kg
- **Daily quotes for every SGE contract**: Au99.99, Au99.95, Au100g, Au(T+D), mAu(T+D), iAu99.99 (international board), Ag(T+D), Ag99.99, Pt99.95 and more, with open, high, low, close, change, weighted average price, volume, turnover, open interest and the deferred-delivery direction
- **Latest day or any date range**, with optional contract filters

### Use cases

- **Gold traders and analysts**: track the Shanghai premium by comparing the Shanghai Gold benchmark with London or COMEX prices.
- **Jewellery, refining and manufacturing**: CNY gold and silver costs for pricing and hedging.
- **Research and dashboards**: Chinese gold demand signals from volumes, open interest and the Au(T+D) delivery direction.
- **Scheduled feeds**: run daily after 15:30 China time with **Only new days** on and get just the new fixings and quotes.

### Example input

Latest day for everything:

```json
{}
```

Au(T+D) and Au99.99 quotes plus the gold benchmark since 2025:

```json
{
  "series": ["goldBenchmark", "dailyQuotes"],
  "contracts": ["Au(T+D)", "Au99.99"],
  "dateFrom": "2025-01-01"
}
```

### Output

A benchmark fixing:

```json
{
  "type": "benchmark",
  "metal": "gold",
  "benchmark": "Shanghai Gold Benchmark Price (上海金基准价)",
  "date": "2026-10-09",
  "am": 900.79,
  "pm": 905.68,
  "unit": "CNY/gram"
}
```

A daily quote:

```json
{
  "type": "dailyQuote",
  "date": "2026-10-09",
  "contract": "Au(T+D)",
  "open": 891.6,
  "high": 908.44,
  "low": 887.17,
  "close": 904.2,
  "change": 12.21,
  "changePct": 1.37,
  "weightedAverage": 897.95,
  "volumeKg": 31268,
  "turnoverCny": 28077211480,
  "openInterestLots": 247252,
  "deliveryDirectionCn": "多支付给空",
  "deliveryDirection": "longs pay shorts",
  "deliveryLots": 14934,
  "unit": "CNY/gram"
}
```

- Gold and platinum are quoted in CNY per gram, silver in CNY per kg; `volumeKg` is in kilograms and counted on both sides, as the exchange publishes it.
- A trading day includes the previous evening's night session (20:00 to 02:30) and the day session (9:00 to 15:30).
- `deliveryDirection` shows who pays the deferred-delivery fee on T+D contracts, a widely watched sign of physical demand.
- Contracts that did not trade on a day are left out.

### Pricing

**$0.0005 per record.** The latest day for everything (about 15 records) costs under $0.01; ten years of daily gold benchmark fixings (about 2,500 records) about $1.25.

### Notes and limits

- Long quote histories are fetched one month at a time, about 1 to 2 minutes per year of all contracts.
- Official figures as published. The benchmark names belong to the Shanghai Gold Exchange; this Actor only collects the publicly displayed values and does not license the benchmarks for use in financial products.
- Only public data is collected.

### Related

- [China CNY Fixing, Shibor & LPR Rates](https://apify.com/sinodata/china-cny-rates): convert CNY prices with the official fixing.
- [China Fuel Prices by Province](https://apify.com/sinodata/china-fuel-prices) and [China Shipping & Freight Indexes](https://apify.com/sinodata/china-shipping-indexes).

### Feedback

Need USD per ounce conversion or another SGE series? Open an issue on the Issues tab.

# Actor input Schema

## `series` (type: `array`):

The Shanghai Gold benchmark (CNY per gram), the Shanghai Silver benchmark (CNY per kg) and/or daily quotes for SGE contracts.

## `contracts` (type: `array`):

Daily quotes only for these contracts, e.g. Au99.99, Au(T+D), mAu(T+D), Ag(T+D), Pt99.95. Leave empty for all.

## `dateFrom` (type: `string`):

Get every day since this date (YYYY-MM-DD). Leave empty for the latest day only.

## `dateTo` (type: `string`):

End of the history range (YYYY-MM-DD). Leave empty for up to today.

## `skipUnchanged` (type: `boolean`):

For scheduled runs: skip (and don't pay for) days you already saved in a previous run.

## `proxyConfiguration` (type: `object`):

Not needed for normal use.

## Actor input object example

```json
{
  "series": [
    "goldBenchmark",
    "silverBenchmark",
    "dailyQuotes"
  ],
  "skipUnchanged": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("sinodata/shanghai-gold-prices").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("sinodata/shanghai-gold-prices").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call sinodata/shanghai-gold-prices --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,sinodata/shanghai-gold-prices"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/ipZcF4w7qfzQNxXVV/builds/F3LYefHfNomhJFngL/openapi.json
