---
title: "商品 API：金屬、能源與實體價格 | Narwhal API"
description: "大宗商品 API，提供現貨金屬、原油以及棕櫚油等實物價格，附原始單位和價格歷史。使用免費 API 金鑰，透過 REST 或 MCP 呼叫。"
url: "https://narwhalapi.com/zh-tw/api/commodities"
---

所有 API

# 大宗商品 API

包含原始單位與序列定義的現貨金屬與實物大宗商品價格。

[取得免費 API 金鑰](https://narwhalapi.com/zh-tw/signup)
[閱讀文件 →](https://narwhalapi.com/zh-tw/docs/api/commodities.md)

## 首次請求

### 查找印尼的棕櫚油價格

```
curl --request GET \
  --url "https://api.narwhalapi.com/v1/commodities/palmoil/physical?product=ffb&country=IDN" \
  --header "Authorization: Bearer $NARWHAL_API_KEY"
```

回應範例

```
{
  "series": [
    {
      "series_id": "id-ri-oil-palm-ffb-smallholder-purchase-agreement",
      "product": "ffb",
      "observation_type": "age_schedule",
      "period_type": "effective",
      "country": "IDN",
      "area": "ID-RI",
      "producer_arrangement": "purchase_agreement",
      "price_type": "official_purchase_schedule",
      "currency": "IDR",
      "unit": "kilogram",
      "unit_key": "kilogram",
      "coverage_start": "2026-08-19",
      "coverage_end": "2026-09-01",
      "frequency": "weekly"
    }
  ],
  "next_cursor": null
}
```

## 端點

### 現貨金屬價格 API

GET 取得現貨價格`/v1/commodities/spot/{commodity}/{currency}`

取得現貨價格或基於期貨的參考價格。

#### 參數

- `commodity` 必填 XAU、XAG、XPT、XPD、WTI（WTI 原油）、BRENT（布蘭特原油）或 XCU（銅）。
- `currency` 必填 報價貨幣，用大寫字母。黃金支援 31 種貨幣，其他商品僅以美元報價。

#### 報價

- `symbol` 字串 商品與報價貨幣，如 XAU-USD。
- `currency` 字串 報價貨幣。
- `unit` 字串 貴金屬用 troy_ounce，WTI 和 BRENT 用 barrel，XCU 用 pound。
- `price` 字串 一個正數參考價格，以十進位字串表示。
- `timestamp` 日期時間 報價時間，UTC。
- `stale` 布林值 報價是否已過時。休市不會使報價過時。

---

[完整參考文件 →](https://narwhalapi.com/zh-tw/docs/api/commodities/spot.md)

GET 取得價格 K 線`/v1/commodities/spot/{commodity}/{currency}/bars`

黃金、白銀、鉑、鈀、銅、WTI 與 BRENT 的開盤、最高、最低與收盤 K 線。

#### 參數

- `commodity` 必填 XAU、XAG、XPT、XPD、WTI（WTI 原油）、BRENT（布蘭特原油）或 XCU（銅）。
- `currency` 必填 報價貨幣，用大寫字母。黃金支援 31 種貨幣，其他商品僅以美元報價。
- `interval` 選填 1m、5m、15m、1h、4h 或 1d。預設為 1d。
- `start` 必填 第一根 K 線，以位於間隔邊界的 UTC 時間表示。包含此時間。
- `end` 必填 最後一根 K 線，以位於間隔邊界的 UTC 時間表示。不包含此時間。
- `limit` 選填 每頁的 K 線數。預設為 100，上限為 500。
- `cursor` 選填 以相同的查詢條件重複使用前一頁的 next_cursor。

#### 回應欄位

- `bars` 陣列 已收盤的 K 線，由舊至新排列，每根都含時間戳記，以及以十進位字串表示的開盤、最高、最低與收盤價。非 USD 貨幣計價的黃金僅提供收盤價。
- `next_cursor` 字串 下一頁的游標。沒有剩餘 K 線時為 Null。

---

[完整參考文件 →](https://narwhalapi.com/zh-tw/docs/api/commodities/spot.md)

### 實物大宗商品價格 API

GET 探索 棕櫚油 實體商品序列`/v1/commodities/palmoil/physical`

按產品和國家查找已收錄的棕櫚油現貨序列。

#### 參數

- `product` 選填 依實體商品篩選。
- `country` 選填 按國家篩選，例如 IDN。
- `area` 選填 使用探索介面回傳的地區：適用時為 ISO 3166-2，或 Narwhal 定義的 nwl-* ID，例如 nwl-mys-north。
- `price_type` 選填 official_purchase_schedule、government_reference 或 market_average。該值必須與產品相容。
- `currency` 選填 依原始貨幣篩選，例如 IDR、USD 或 MYR。此操作不會換算價格。
- `producer_type` 選填 適用於印尼 FFB 收購價目表；不得與 product=cpo 一起使用。
- `producer_arrangement` 選填 purchase_agreement 或 supported_scheme。適用於印尼 FFB 價目表；不得與 product=cpo 一起使用。
- `limit` 選填 每頁的序列數量上限。預設為 100。
- `cursor` 選填 使用回傳的 next_cursor 繼續請求，並保持所有原始篩選條件和 limit 不變。

#### 回應欄位

- `series` 陣列 依穩定的 series_id 排序的完整已核准序列。
- `series[].series_id` 字串 歷史資料操作使用的穩定識別碼。
- `series[].product / series[].country` 字串 產品與地理範圍。
- `series[].area` 字串 全國序列省略 area。地區識別碼可能使用 nwl-* 命名空間。
- `series[].observation_type / series[].period_type` 列舉值 scalar 或 age_schedule；effective 或 observation。這些值定義回應的不同形式與日期語意。
- `series[].price_type / series[].currency / series[].unit` 字串 來源定義的價格類型、貨幣與原始單位。
- `series[].unit_key` 字串 unit_key 是以一種標準寫法表示的單位,例如 troy_ounce、barrel 或 tonne;unit 則保留來源的原始寫法。當價格以美分報價時,price_scale 為 0.01:將價格乘以該值即可得到以貨幣計的金額。
- `series[].producer_arrangement` 字串 僅在來源明確說明安排類型的印尼 FFB 樹齡價目表序列中包含。其他情況省略。
- `series[].frequency / series[].coverage_start / series[].coverage_end` 字串和日期 發布頻率及已接受的歷史資料起訖範圍，並不保證期間內的資料毫無缺漏。
- `next_cursor` 字串或 null 續頁權杖，若無更多序列則為 null。

---

[完整參考文件 →](https://narwhalapi.com/zh-tw/docs/api/commodities/palmoil-physical-series.md)

GET 取得最新 棕櫚油 實體商品價格`/v1/commodities/palmoil/physical/{series_id}`

取得最新一筆已收錄的棕櫚油觀測值。

#### 參數

- `series_id` 必填 使用探索介面回傳的 ID。
- `price_month` 選填 僅適用於 MPOB CPO。選擇一個報價月份；預設為各報告自身所屬的月份。

#### 回應欄位

- `series_id` 字串 穩定的實體商品序列識別碼。
- `currency / unit` 字串 貨幣與原始單位：印尼 FFB 價目表使用 kilogram，CPO 使用 metric_ton，馬來西亞 FFB 參考價使用 one_percent_oer。
- `unit_key` 字串 unit_key 是以一種標準寫法表示的單位,例如 troy_ounce、barrel 或 tonne;unit 則保留來源的原始寫法。當價格以美分報價時,price_scale 為 0.01:將價格乘以該值即可得到以貨幣計的金額。
- `period_start / period_end` 日期 有效價格的日期範圍包含起訖日。MPOB 則以報告日為起日、次日為迄日，且不含迄日。
- `revision` 整數 價格或完整價目表的修訂版本。
- `price or prices` 十進位字串或完整陣列 以十進位字串表示的正數價格，或包含 tree_age_min_years、tree_age_max_years 和 price 的完整 prices 陣列。樹齡上下限均包含在內。馬來西亞 FFB 仍使用 one_percent_oer。
- `price_month` YYYY-MM MPOB CPO 報價必填，用來識別報價月份；period_start 和 period_end 則標示報告日的觀測區間。

---

[完整參考文件 →](https://narwhalapi.com/zh-tw/docs/api/commodities/palmoil-physical-price.md)

GET 取得 棕櫚油 實體商品歷史資料`/v1/commodities/palmoil/physical/{series_id}/observations`

按從舊到新的順序取得棕櫚油觀測值。

#### 參數

- `series_id` 必填 探索介面回傳的序列。
- `start` 選填 查詢範圍包含起始日，且須同時提供 end。印尼價格的有效期間只要與查詢範圍重疊，就會納入結果；馬來西亞每日價格則依報告日期篩選。
- `end` 選填 上限（不含），且必須晚於 start。
- `limit` 選填 回傳的觀測值數量上限。預設為 100；樹齡價目表會保持完整。
- `cursor` 選填 繼續請求時，所有原始參數均須保持不變，包括 series_id、日期、limit 和 price_month。發布資料的變更可能導致游標過期。
- `price_month` 選填 僅適用於 MPOB CPO。選擇一個報價月份；預設為各報告自身所屬的月份。

#### 回應欄位

- `series_id` 字串 穩定的實體商品序列識別碼。
- `currency / unit` 字串 所有觀測值共用的貨幣與原始單位。
- `unit_key` 字串 unit_key 是以一種標準寫法表示的單位,例如 troy_ounce、barrel 或 tonne;unit 則保留來源的原始寫法。當價格以美分報價時,price_scale 為 0.01:將價格乘以該值即可得到以貨幣計的金額。
- `observations` 陣列 期間、修訂版本及單一價格數值或完整價目表，依時間由舊到新排列；MPOB CPO 資料列保留 price_month；馬來西亞 CPO 與 FFB 資料列保留報告日的 period_start/period_end。
- `next_cursor` 字串或 null 不透明的續頁權杖，結束時為 null。

---

[完整參考文件 →](https://narwhalapi.com/zh-tw/docs/api/commodities/palmoil-physical-price-history.md)

## 使用情境

### 每公升和每加侖的石油價格

把布蘭特或 WTI 從每桶美元換算成每公升和每加侖。

[閱讀指南 →](https://narwhalapi.com/zh-tw/how-to/convert-the-oil-price-to-litres-and-gallons.md)

### 每公斤和每公噸的銅價

把銅價從每磅美元換算成每公斤和每公噸。

[閱讀指南 →](https://narwhalapi.com/zh-tw/how-to/convert-the-copper-price-to-kg-and-tonnes.md)

### 金銀比

用同一日期或時間的黃金價格除以白銀價格。

[閱讀指南 →](https://narwhalapi.com/zh-tw/how-to/calculate-the-gold-silver-ratio.md)

### 價格提醒

黃金突破你設定的閾值時發送提醒。

[閱讀指南 →](https://narwhalapi.com/zh-tw/how-to/set-up-a-commodity-price-alert.md)

### 價格歷史匯出為 CSV

把每日黃金價格歷史下載為 CSV 檔案。

[閱讀指南 →](https://narwhalapi.com/zh-tw/how-to/download-commodity-price-history-as-csv.md)

### 以你的貨幣顯示價格

取得以你自己貨幣計價的商品價格，如每克多少印尼盾。

[閱讀指南 →](https://narwhalapi.com/zh-tw/how-to/get-a-commodity-price-in-your-currency.md)

## 涵蓋範圍

- 黃金[即時現貨價格](https://narwhalapi.com/zh-tw/commodities/gold.md)
- 白銀[即時現貨價格](https://narwhalapi.com/zh-tw/commodities/silver.md)
- 鉑金[即時現貨價格](https://narwhalapi.com/zh-tw/commodities/platinum.md)
- 鈀金[即時現貨價格](https://narwhalapi.com/zh-tw/commodities/palladium.md)
- 銅[即時現貨價格](https://narwhalapi.com/zh-tw/commodities/copper.md)
- WTI原油[即時現貨價格](https://narwhalapi.com/zh-tw/commodities/wti-crude.md)
- 布蘭特原油[即時現貨價格](https://narwhalapi.com/zh-tw/commodities/brent-crude.md)
- 美國汽油（零售）[週度 · USD/加侖](https://narwhalapi.com/zh-tw/commodities/gasoline.md)
- 美國柴油（零售）[週度 · USD/加侖](https://narwhalapi.com/zh-tw/commodities/diesel.md)
- 商品月度基準[70個序列 · 月度](https://narwhalapi.com/zh-tw/commodities.md#monthly)
- 實物大宗商品價格[實物價格](https://narwhalapi.com/zh-tw/api/commodities/physical.md)
- 天然氣[每日觀測值](https://narwhalapi.com/zh-tw/commodities/natural-gas.md)

顯示全部 54 項商品

- 黃豆[月度基準價格](https://narwhalapi.com/zh-tw/commodities/soybeans.md)
- 玉米[月度基準價格](https://narwhalapi.com/zh-tw/commodities/corn.md)
- 牛肉[月度基準價格](https://narwhalapi.com/zh-tw/commodities/beef.md)
- 鋁[月度基準價格](https://narwhalapi.com/zh-tw/commodities/aluminium.md)
- 咖啡[月度基準價格](https://narwhalapi.com/zh-tw/commodities/coffee.md)
- 小麥[月度基準價格](https://narwhalapi.com/zh-tw/commodities/wheat.md)
- 糖[月度基準價格](https://narwhalapi.com/zh-tw/commodities/sugar.md)
- 煤炭[月度基準價格](https://narwhalapi.com/zh-tw/commodities/coal.md)
- 可可[月度基準價格](https://narwhalapi.com/zh-tw/commodities/cocoa.md)
- 鎳[月度基準價格](https://narwhalapi.com/zh-tw/commodities/nickel.md)
- 棉花[月度基準價格](https://narwhalapi.com/zh-tw/commodities/cotton.md)
- 稻米[月度基準價格](https://narwhalapi.com/zh-tw/commodities/rice.md)
- 尿素[月度基準價格](https://narwhalapi.com/zh-tw/commodities/urea.md)
- 鐵礦石[月度基準價格](https://narwhalapi.com/zh-tw/commodities/iron-ore.md)
- 鋅[月度基準價格](https://narwhalapi.com/zh-tw/commodities/zinc.md)
- 錫[月度基準價格](https://narwhalapi.com/zh-tw/commodities/tin.md)
- 鉛[月度基準價格](https://narwhalapi.com/zh-tw/commodities/lead.md)
- 棕櫚油[月度基準價格](https://narwhalapi.com/zh-tw/commodities/palm-oil.md)
- 橡膠[月度基準價格](https://narwhalapi.com/zh-tw/commodities/rubber.md)
- 柳橙[月度基準價格](https://narwhalapi.com/zh-tw/commodities/orange.md)
- 茶葉[月度基準價格](https://narwhalapi.com/zh-tw/commodities/tea.md)
- 原油[月度基準價格](https://narwhalapi.com/zh-tw/commodities/crude-oil.md)
- 黃豆油[月度基準價格](https://narwhalapi.com/zh-tw/commodities/soybean-oil.md)
- 黃豆粉[月度基準價格](https://narwhalapi.com/zh-tw/commodities/soybean-meal.md)
- 棕櫚仁油[月度基準價格](https://narwhalapi.com/zh-tw/commodities/palm-kernel-oil.md)
- 椰子油[月度基準價格](https://narwhalapi.com/zh-tw/commodities/coconut-oil.md)
- 葵花籽油[月度基準價格](https://narwhalapi.com/zh-tw/commodities/sunflower-oil.md)
- 菜籽油[月度基準價格](https://narwhalapi.com/zh-tw/commodities/rapeseed-oil.md)
- 花生油[月度基準價格](https://narwhalapi.com/zh-tw/commodities/groundnut-oil.md)
- 花生[月度基準價格](https://narwhalapi.com/zh-tw/commodities/groundnuts.md)
- 魚粉[月度基準價格](https://narwhalapi.com/zh-tw/commodities/fish-meal.md)
- 香蕉[月度基準價格](https://narwhalapi.com/zh-tw/commodities/bananas.md)
- 雞肉[月度基準價格](https://narwhalapi.com/zh-tw/commodities/chicken.md)
- 羔羊肉[月度基準價格](https://narwhalapi.com/zh-tw/commodities/lamb.md)
- 菸草[月度基準價格](https://narwhalapi.com/zh-tw/commodities/tobacco.md)
- 磷酸二銨肥料[月度基準價格](https://narwhalapi.com/zh-tw/commodities/dap.md)
- 重過磷酸鈣肥料[月度基準價格](https://narwhalapi.com/zh-tw/commodities/tsp.md)
- 氯化鉀[月度基準價格](https://narwhalapi.com/zh-tw/commodities/potash.md)
- 磷礦石[月度基準價格](https://narwhalapi.com/zh-tw/commodities/phosphate-rock.md)
- 原木[月度基準價格](https://narwhalapi.com/zh-tw/commodities/logs.md)
- 鋸材[月度基準價格](https://narwhalapi.com/zh-tw/commodities/sawnwood.md)
- 合板[月度基準價格](https://narwhalapi.com/zh-tw/commodities/plywood.md)

## 相關 API

### 現貨金屬價格 API

黃金、白銀、鉑金和鈀金的現貨價格，以及 WTI、布蘭特和銅的參考價格。

[探索 API →](https://narwhalapi.com/zh-tw/api/commodities/spot.md)

### 實物大宗商品價格 API

涵蓋約120種大宗商品的實物價格（金屬、電池材料、能源、肥料與化工原料、農產品），另有美國零售燃油（EIA）與World Bank月度基準。包括棕櫚油。單位與發布時一致。

[探索 API →](https://narwhalapi.com/zh-tw/api/commodities/physical.md)

### 匯率 API

目前匯率、貨幣換算和已儲存的匯率歷史。

[探索 API →](https://narwhalapi.com/zh-tw/api/fx.md)

### 價格

預付額度，每1,000次呼叫2美元，沒有方案或級別。

[查看價格 →](https://narwhalapi.com/zh-tw/pricing.md)

## 常見問題

哪些大宗商品 API 已上線？

已上線的版本涵蓋現貨金屬與實物大宗商品。期貨不對外公開。

我可以取得歷史價格嗎？

可以。請求已納入棕櫚油序列的觀測值；回應會保留原始單位、生效日期、修訂資訊與來源資料缺口。

使用資料之前應該檢查什麼？

單位、價格類型、地域和有效期間都保留在每個已收錄的序列上。期貨產品目前不公開。

## 從免費金鑰開始

每月 10 美元免費額度，無需綁卡。每月 10 美元免費額度，無需綁卡。

[取得免費 API 金鑰](https://narwhalapi.com/zh-tw/signup)
