🕓 작성일 2026-04-14, 최종 수정 2026-05-09. TS / Python / PHP SDK는 이제 공개 레지스트리로 이동했습니다 —
@astroway/sdk(npm),astroway(PyPI),astroway/sdk(Packagist). 자세한 내용은 changelog를 참고하세요.
코드에서 natal chart를 계산하고 싶나요? 가장 빠른 방법으로 5분 만에 JSON 결과를 얻을 수 있습니다.
1단계: API 키 발급하기 (30초)
섹션 제목: “1단계: API 키 발급하기 (30초)”api.astroway.info/dashboard/sign-up에서 가입하세요. 무료 플랜: 월 10,000 크레딧. 카드 없이 이용 가능합니다.
대시보드에서 「Create key」 → 「Production」을 클릭한 후 키를 복사하세요. 키는 aw_live_aB3xY7pQ9rN2mK4jH8vC5tL6wZ1fD0eR와 같은 형식입니다.
팁: aw_test_ 접두사가 붙은 샌드박스 키도 있습니다. 개발 시에는 이 키를 사용해 크레딧이 소모되지 않도록 하세요.
2단계: SDK 설치하기
섹션 제목: “2단계: SDK 설치하기”TypeScript
섹션 제목: “TypeScript”npm install @astroway/sdkPython
섹션 제목: “Python”pip install astroway두 SDK 모두 723 엔드포인트를 타입이 지정된 요청과 응답으로 제공합니다.
3단계: 첫 natal chart
섹션 제목: “3단계: 첫 natal chart”TypeScript
섹션 제목: “TypeScript”import { Astroway } from '@astroway/sdk';
const client = new Astroway({ apiKey: process.env.ASTROWAY_API_KEY!,});
const chart = await client.chart({ date: '1990-07-14', time: '14:30:00', timezoneOffset: 3, // UTC+3, 키예프의 여름 시간 latitude: 50.4501, longitude: 30.5234, houseSystem: 'P', // Placidus});
console.log(`Sun: ${chart.planets[0].sign} at ${chart.planets[0].longitude}°`);console.log(`ASC: ${chart.houses.ascendant}°`);console.log(`Aspects: ${chart.aspects.length}`);실행:
ASTROWAY_API_KEY=aw_live_... npx tsx chart.tsPython
섹션 제목: “Python”from astroway import Astroway
client = Astroway(api_key="aw_live_your_key_here")
chart = client.chart( date="1990-07-14", time="14:30:00", timezone_offset=3, latitude=50.4501, longitude=30.5234, house_system="P",)
print(f"Sun: {chart['planets'][0]['sign']} at {chart['planets'][0]['longitude']}°")print(f"ASC: {chart['houses']['ascendant']}°")print(f"Aspects: {len(chart['aspects'])}")실행:
ASTROWAY_API_KEY=aw_live_... python3 chart.pyAPI 응답 구조
섹션 제목: “API 응답 구조”API는 JSON 객체를 반환하며, 주요 네 부분으로 구성됩니다:
planets
섹션 제목: “planets”12개의 객체 배열(Sun, Moon, Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto, North Node, Chiron):
{ "name": "Sun", "longitude": 111.87, // 황도 경도(도) "latitude": 0.0, "speed": 0.955, // 하루당 경도(역행은 음수) "sign": "cancer", "signIndex": 3, "house": 10, "retrograde": false}houses
섹션 제목: “houses”12개의 house cusp와 asc, MC:
{ "system": "P", "cusps": [12.34, 43.21, ...], // 12개의 값 "ascendant": 12.34, "mc": 280.12}aspects
섹션 제목: “aspects”행성 간의 aspect 배열:
{ "planet1": "Sun", "planet2": "Moon", "type": "sextile", // conjunction, opposition, trine, square, sextile, quincunx "orb": 1.36, // 정확한 각도와의 차이(도) "applying": true}chartSect
섹션 제목: “chartSect”"diurnal"(태양이 지평선 위에 있는 경우) 또는 "nocturnal"(지평선 아래). 전통 astrology에서 사용됩니다.
다음 단계
섹션 제목: “다음 단계”더 시도해 볼 만한 기능:
Synastry — 두 사람의 호환성:
const synastry = await client.synastry({ chart1: { date: '1990-07-14', time: '14:30:00', timezoneOffset: 3, latitude: 50.45, longitude: 30.52 }, chart2: { date: '1992-03-22', time: '09:15:00', timezoneOffset: 2, latitude: 48.85, longitude: 2.35 },});console.log(`Compatibility score: ${synastry.compatibility.score}/100`);현재 natal chart의 transit:
const transits = await client.transits({ // 출생 데이터 date: '1990-07-14', time: '14:30:00', timezoneOffset: 3, latitude: 50.4501, longitude: 30.5234, // transit 날짜 transitDate: '2026-04-14',});실제 transit을 반영한 일일 horoscope:
const horoscope = await client.horoscopeDaily({ date: '1990-07-14', time: '14:30:00', timezoneOffset: 3, latitude: 50.4501, longitude: 30.5234,});console.log(horoscope.text);완전한 Human Design 차트:
const hd = await client.humanDesign({ date: '1990-07-14', time: '14:30:00', timezoneOffset: 3, latitude: 50.4501, longitude: 30.5234,});console.log(`${hd.type} — ${hd.strategy} — Profile ${hd.profile}`);크레딧별 요금
섹션 제목: “크레딧별 요금”- Natal chart (
/chart): 20 크레딧 - Synastry: 50 크레딧
- Transit: 50 크레딧
- 일일 horoscope: 20 크레딧
- Human Design: 50 크레딧
무료 플랜: 월 10,000 크레딧 = 500개의 natal chart, 또는 200개의 synastry, 또는 혼합 사용 가능.
에러 처리
섹션 제목: “에러 처리”모든 응답에는 크레딧 관련 헤더가 포함됩니다:
X-Credits-Used: 20X-Credits-Remaining: 4980X-Credits-Reset: 2026-05-01T00:00:00Z크레딧이 부족하면 402 Payment Required가 반환됩니다. rate-limit에 걸리면(Free: 분당 10회) 429 Too Many Requests와 Retry-After 헤더가 반환됩니다.
SDK는 타입이 지정된 에러를 던지며, 이를 catch할 수 있습니다:
try { const chart = await client.chart({ ... });} catch (err) { if (err.code === 'credits_exhausted') { console.log('플랜을 업그레이드하거나 리셋을 기다리세요'); } else if (err.code === 'rate_limit_exceeded') { console.log(`다음 요청까지 ${err.retryAfter}초 대기하세요`); }}이제 준비 완료
섹션 제목: “이제 준비 완료”이제 너는:
- 동작하는 API 키
- 설치된 SDK
- 첫 natal chart
- synastry, transit, horoscope를 추가할 수 있는 예제
더 읽어보기:
- 시작 가이드 — 더 많은 세부 정보
- 예제: natal chart — 심층 walkthrough
- API reference — 모든 723 엔드포인트
Solar Fire에 사용된 것과 동일한 Swiss Ephemeris — 단 4줄의 코드로.
카드 없이 무료 키. 첫 결제 전까지 월 5,000 API 호출.