메뉴

첫 환율 API 호출

터미널을 열고 명령 한 줄을 붙여 넣으세요. 데이터 엔드포인트 시험에는 키가 필요 없습니다.

1. 두 환율 요청하기

경로의 USD는 기준 통화이고 symbols의 EUR, GBP는 대상 통화입니다. 필요한 코드로 바꾸면 됩니다.

curl -fsS --max-time 10 "https://api.exchangerate.dev/v1/latest/USD?symbols=EUR,GBP"

통합 가이드: Python · JavaScript / Node.js · Google Sheets · Excel · Go · Swift · Zapier

2. 응답 읽기

값은 변하지만 구조는 같습니다. rates.EUR를 읽고 source, market_session, data_updated_at도 환율과 함께 저장하세요.

json
{  "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  },  "stale": {    "EUR": false,    "GBP": false  },  "derived_symbols": [],  "notice": "Indicative rates, not for settlement."}

3. 계정 할당량이 필요할 때 키 추가하기

무료 키를 만든 뒤 Authorization: Bearer YOUR_KEY로 보냅니다. 키는 서버에 저장하고 공개 브라우저 코드에 넣지 마세요.

bash
curl "https://api.exchangerate.dev/v1/latest/USD?symbols=EUR,GBP" \  -H "Authorization: Bearer YOUR_KEY"