1. 두 환율 요청하기 경로의 USD는 기준 통화이고 `symbols`의 EUR, GBP는 대상 통화입니다. 필요한 코드로 바꾸면 됩니다.
사용 중인 스택에서 사용 같은 요청을 curl, Python, JavaScript에서 실행할 수 있습니다. 평가에는 API 키가 필요하지 않습니다.
퀵스타트 열기 → curl Python JavaScript / Node.js
코드 복사 curl -fsS --max-time 10 "https://api.exchangerate.dev/v1/latest/USD?symbols=EUR,GBP" from urllib.request import Request, urlopen
import json
request = Request("https://api.exchangerate.dev/v1/latest/USD?symbols=EUR,GBP")
with urlopen(request, timeout=10) as response:
data = json.load(response)
print(data["rates"]["EUR"]) const response = await fetch("https://api.exchangerate.dev/v1/latest/USD?symbols=EUR,GBP", {
signal: AbortSignal.timeout(10_000),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();
console.log(data.rates.EUR); 응답 예시 {
"result": "success",
"base": "USD",
"source": "live",
"sources": {
"EUR": "live",
"GBP": "live"
},
"market_session": "open",
"timestamp": "2026-06-15T12:00:00Z",
"data_updated_at": "2026-06-15T12:00:00Z",
"effective_at": {
"EUR": "2026-06-15T12:00:00Z",
"GBP": "2026-06-15T12:00:00Z"
},
"rates": {
"EUR": 0.86207,
"GBP": 0.74627
},
"derived_symbols": [],
"notice": "Indicative rates, not for settlement."
} rates.EUR은 1 USD에 해당하는 EUR 금액입니다. effective_at.EUR은 관측 시각이고 sources.EUR은 출처 등급입니다. 값과 시각은 예시입니다.
Python → JavaScript / Node.js → Google Sheets → Excel → Go → Swift → Zapier → 2. 응답 읽기 값은 변하지만 구조는 같습니다. `rates.EUR`를 읽고 `source`, `market_session`, `data_updated_at`도 환율과 함께 저장하세요.
json · exact example COPY
{
"result": "success",
"base": "USD",
"source": "live",
"sources": {
"EUR": "live",
"GBP": "live"
},
"market_session": "open",
"timestamp": "2026-06-15T12:00:00Z",
"data_updated_at": "2026-06-15T12:00:00Z",
"effective_at": {
"EUR": "2026-06-15T12:00:00Z",
"GBP": "2026-06-15T12:00:00Z"
},
"rates": {
"EUR": 0.86207,
"GBP": 0.74627
},
"derived_symbols": [],
"notice": "Indicative rates, not for settlement."
} 3. 계정 할당량이 필요할 때 키 추가하기 무료 키를 만든 뒤 `Authorization: Bearer YOUR_KEY`로 보냅니다. 키는 서버에 저장하고 공개 브라우저 코드에 넣지 마세요.
bash · authenticated COPY
curl "https://api.exchangerate.dev/v1/latest/USD?symbols=EUR,GBP" -H "Authorization: Bearer YOUR_KEY" 참고용 환율
앱, 모델, 분석에 적합하며 실제 거래 호가나 결제 가격은 아닙니다.