금 시세 API 레퍼런스: 귀금속·원자재 현물 가격
금 시세 API로 금, 은, 백금, 팔라듐의 현물 가격과 WTI, 브렌트, 구리의 기준 가격을 단위 및 UTC 타임스탬프와 함께 확인할 수 있습니다.
인증 및 요청
Authorization 헤더에 Bearer 방식으로 API 키를 보내세요. 제품 개요 →
curl "https://api.narwhalapi.com/v1/commodities/spot/XAU/USD" \
--header "Authorization: Bearer $NARWHAL_API_KEY"작업
| 엔드포인트 | 작업 |
|---|---|
GET /v1/commodities/spot/{commodity}/{currency} | 현물 가격 또는 선물 기반 기준 가격을 조회합니다. |
GET /v1/commodities/spot/{commodity}/{currency}/bars | 금, 은, 백금, 팔라듐, 구리, WTI 및 BRENT의 시가, 고가, 저가, 종가 바를 조회합니다. 구리 이력도 제공됩니다. |
매개변수
| 필드 | 의미 |
|---|---|
commodity | 경로 매개변수입니다. XAU, XAG, XPT, XPD, WTI(WTI 원유), BRENT(브렌트 원유) 또는 XCU(구리)입니다. |
currency | 경로 매개변수이며 대문자로 입력합니다. 금: USD, AUD, BGN, BRL, CAD, CHF, CNY, CZK, DKK, EUR, GBP, HKD, HUF, IDR, ILS, INR, ISK, JPY, KRW, MXN, MYR, NOK, NZD, PHP, PLN, RON, SEK, SGD, THB, TRY 또는 ZAR. 은, 백금, 팔라듐, WTI, BRENT 및 XCU: USD만 지원합니다. |
unit | 스폿과 바 요청에 사용합니다. 선택 사항이며 troy_, gram, kilogram, pound, metric_ 중 하나입니다. 가격은 해당 단위당 값이며, 응답의 unit과 unit_가 그 단위를 나타냅니다. 금, 은, 백금, 팔라듐, 구리(XCU)는 다섯 가지를 모두 사용할 수 있고, WTI와 BRENT는 배럴 단위로 제공되므로 barrel만 사용할 수 있습니다. 그 밖의 값은 400 unit_를 반환합니다. unit을 생략하면 이전과 같은 응답을 받습니다. |
interval | 바 전용. 1m, 5m, 15m, 1h, 4h 또는 1d(기본값). |
start / | 바에만 적용됩니다. 둘 다 필수입니다. UTC 시각을 간격 경계에 맞춥니다(4h는 00, 04, 08시 등, 1d는 자정). 시작은 포함하고 끝은 제외합니다. |
limit / | 바 전용. 기본값은 100, 최댓값은 500입니다. 동일한 쿼리로 next_cursor를 재사용하세요. |
시세 필드
| 필드 | 의미 |
|---|---|
symbol, currency, unit | 심볼과 표시 통화입니다. unit은 귀금속의 경우 troy_ounce, WTI와 BRENT는 barrel, XCU는 pound입니다. |
commodity_ | commodity_는 현물, 선물, 예측 시장, 실물 가격에서 상품을 같은 이름으로 나타냅니다(예: gold, crude-oil). 원유에는 benchmark(wti, brent, urals, dubai)도 함께 제공되며, 선물에는 거래소의 표준 코드인 exchange_이 함께 제공됩니다. |
unit_ | unit_는 단위를 하나의 표준 표기로 나타냅니다(예: troy_ounce, barrel, tonne). unit은 출처의 표기를 그대로 유지합니다. 가격이 센트로 표시된 경우 price_은 0.01입니다. 가격에 이 값을 곱하면 currency 기준 금액이 됩니다. |
price | 하나의 양수 참고 가격을 십진수 문자열로 나타냅니다. |
timestamp, stale | 시세 UTC 타임스탬프 및 명시적인 최신 상태 플래그입니다. |
bars | 바에만 적용됩니다. 마감된 바를 오래된 순서로 반환합니다. 각 바에는 timestamp(바 시작 시각)와 십진 문자열인 open, high, low, close가 있습니다. USD 이외 통화의 금에는 close만 있습니다. |
start, end | start와 end는 Narwhal이 요청한 범위를 변경한 경우에만 반환됩니다. |
next_ | 바 전용. 이어서 조회할 커서이며, 남은 바가 없으면 null입니다. |
응답 예시: GET /v1/commodities/spot/{commodity}/{currency}.
{
"symbol": "XAU-USD",
"commodity_key": "gold",
"price": "3550.6320",
"currency": "USD",
"unit": "troy_ounce",
"unit_key": "troy_ounce",
"timestamp": "2026-11-20T05:54:00Z",
"stale": false
}{
"symbol": "WTI-USD",
"commodity_key": "crude-oil",
"benchmark": "wti",
"price": "82.5990",
"currency": "USD",
"unit": "barrel",
"unit_key": "barrel",
"timestamp": "2026-11-20T05:52:00Z",
"stale": false
}With unit=gram, a silver quote is priced per gram.
curl "https://api.narwhalapi.com/v1/commodities/spot/XAG/USD?unit=gram" \
--header "Authorization: Bearer $NARWHAL_API_KEY"{
"symbol": "XAG-USD",
"commodity_key": "silver",
"price": "1.31824",
"currency": "USD",
"unit": "gram",
"unit_key": "gram",
"timestamp": "2026-11-21T18:11:00Z",
"stale": false
}A converted price is worked out in exact decimals from the price shown without unit, with 1 troy ounce = 31.1034768 g and 1 pound = 453.59237 g. It keeps as many significant figures as that price (trailing zeros of a whole number do not count), and a price under 10 keeps at least 4 decimals. Halves round up and zeros after the decimal point are dropped. Bars convert open, high, low and close the same way.
Bars response for GET /. start and end are returned only when Narwhal changes the requested range.
{
"symbol": "XAU-USD",
"commodity_key": "gold",
"currency": "USD",
"unit": "troy_ounce",
"unit_key": "troy_ounce",
"bars": [
{
"timestamp": "2026-10-01T00:00:00Z",
"open": "4156.8352",
"high": "4192.5215",
"low": "4139.7787",
"close": "4177.4458"
},
{
"timestamp": "2026-10-02T00:00:00Z",
"open": "4177.2183",
"high": "4225.6497",
"low": "4125.9232",
"close": "4141.5280"
}
],
"next_cursor": null
}Gold in a currency other than USD has close only.
{
"symbol": "XAU-EUR",
"commodity_key": "gold",
"currency": "EUR",
"unit": "troy_ounce",
"unit_key": "troy_ounce",
"bars": [
{
"timestamp": "2026-10-01T00:00:00Z",
"close": "3715.66"
},
{
"timestamp": "2026-10-02T00:00:00Z",
"close": "3680.67"
}
],
"next_cursor": null
}A request may span at most 3 days of 1m bars, 14 days of 5m bars, 60 days of 15m bars; a longer range returns 400 invalid_. Wider intervals have no cap.
데이터 해석
WTI, BRENT and XCU are reference prices derived from futures markets, not physical spot cargo prices. Display the unit and timestamp with the price. The timestamp is the start of the minute the price belongs to; during the daily 17:00 New York metals pause (21:00 UTC in summer, 22:00 UTC in winter), which is not a market closure, a quote can carry stale: true. A closed market never makes a quote stale: from Friday 17:00 to Sunday 17:00 New York time you get the last price with stale: false. A quote is stale when its price is more than 10 minutes old, counting only open-market time; do not present a stale quote as a fresh market price. An unknown commodity returns 404 commodity_. A known commodity with an unsupported currency returns 404 currency_. Price history is available for gold, silver, platinum, palladium, copper (XCU), WTI and BRENT. We never fill gaps: missing bars stay missing. We keep 1m and 5m bars for 30 days and 15m, 1h, 4h and 1d bars indefinitely. A range outside retention returns an empty bars list, not an error. WTI and BRENT have 15-minute and hourly history from 2020.
현물 가격은 무료 크레딧만 사용하는 계정을 포함해 모든 계정에서 실시간으로 제공됩니다. 가격 스트림은 종료되었으니 대신 이 경로를 폴링하세요. 가격 스트림 레퍼런스 →
오류
- 경로 값이 유효하지 않거나, 시작 또는 끝이 간격 경계에 맞지 않거나, 바 요청에
start또는end가 없거나, 바 범위가 해당 간격에서 허용하는 길이를 초과하면400 invalid_를 반환합니다.query - Bearer 키가 없거나 유효하지 않으면
401 invalid_를 반환합니다.api_ key 400 unit_는 해당 상품을 표시할 수 없는not_ supported unit을 지정했을 때 반환됩니다. 오류 상세 내용에 그 상품에서 허용되는 단위 목록이 나옵니다.- Narwhal이 제공하지 않는 원자재에는
404 commodity_를, 해당 원자재에서 제공하지 않는 통화에는not_ supported 404 currency_를 반환합니다.not_ supported - 분당 한도에 도달하면
429 rate_, 잔액이 호출 비용에 부족하면limit_ exceeded 402 insufficient_를 반환합니다.credits - 가격 데이터를 읽을 수 없으면
503 upstream_을 반환합니다.unavailable
MCP 도구
commodities_get_spot_pricecommodities_get_price_history이 페이지가 도움이 되었나요?