🕓 기록: 2026-04-14, 업데이트: 2026-05-09. TS / Python / PHP SDK가 이제 public registries에 있어요 -
@astroway/sdk(npm),astroway(PyPI),astroway/sdk(Packagist). 자세한 내용은 changelog에 있어요.
코드로 네이탈 차트를 계산하고 싶어? 여기 가장 짧은 방법이야 – 5분이면 제로부터 작동하는 JSON까지.
1단계: API 키 받기 (30초)
섹션 제목: “1단계: API 키 받기 (30초)”가입하려면 api.astroway.info/dashboard/sign-up으로 가. 무료 플랜: 월 10 000 크레딧. 카드 없이도 가능해.
dashboard에서 «Create key» → «Production» 클릭하고 복사해. 키는 aw_live_aB3xY7pQ9rN2mK4jH8vC5tL6wZ1fD0eR 형태야.
팁: aw_test_ 접두사가 붙은 sandbox 키도 있어 – 이 키는 크레딧을 차감하지 않아. 개발할 때 사용해.
2단계: SDK 설치
섹션 제목: “2단계: SDK 설치”TypeScript
섹션 제목: “TypeScript”npm install @astroway/sdkPython
섹션 제목: “Python”pip install astroway두 SDK 모두 758 엔드포인트를 타입이 지정된 요청과 응답으로 지원해.
3단계: 첫 네이탈 차트
섹션 제목: “3단계: 첫 네이탈 차트”TypeScript
섹션 제목: “TypeScript”import { Astroway } from '@astroway/sdk';
const aw = new Astroway({ apiKey: process.env.ASTROWAY_API_KEY!,});
const chart = await aw.chart.compute({ date: '1990-07-14', time: '14:30:00', timezoneOffset: 3, // UTC+3, літо в Києві latitude: 50.4501, longitude: 30.5234, houseSystem: 'P', // Placidus});
const SIGNS = ['Aries', 'Taurus', 'Gemini', 'Cancer', 'Leo', 'Virgo', 'Libra', 'Scorpio', 'Sagittarius', 'Capricorn', 'Aquarius', 'Pisces'];
const sun = chart.planets.find((p) => p.name === 'Sun')!;console.log(`Sun: ${SIGNS[Math.floor(sun.longitude / 30)]} at ${sun.longitude.toFixed(2)}°`);console.log(`ASC: ${chart.houses.ascendant.toFixed(2)}°`);console.log(`Aspects: ${chart.aspects.length}`);실행해:
ASTROWAY_API_KEY=aw_live_... npx tsx chart.ts파일이 top-level await을 사용하니까 package.json에 "type": "module"이 있어야 해. 그렇지 않으면 tsx가 Top-level await is currently not supported with the "cjs" output format 오류가 나와.
Python
섹션 제목: “Python”from astroway import Astroway, BirthData
aw = Astroway(api_key="aw_live_your_key_here")
chart = aw.chart.compute(BirthData( date="1990-07-14", time="14:30:00", timezone_offset=3, latitude=50.4501, longitude=30.5234, house_system="P",))
SIGNS = ["Aries", "Taurus", "Gemini", "Cancer", "Leo", "Virgo", "Libra", "Scorpio", "Sagittarius", "Capricorn", "Aquarius", "Pisces"]
sun = next(p for p in chart["planets"] if p["name"] == "Sun")print(f"Sun: {SIGNS[int(sun['longitude'] // 30)]} at {sun['longitude']:.2f}°")print(f"ASC: {chart['houses']['ascendant']:.2f}°")print(f"Aspects: {len(chart['aspects'])}")실행해:
ASTROWAY_API_KEY=aw_live_... python3 chart.pyAPI가 반환하는 것
섹션 제목: “API가 반환하는 것”JSON 객체가 네 개의 주요 섹션으로 반환돼:
planets
섹션 제목: “planets”13개의 객체 배열이야. name에는 Swiss Ephemeris에서 가져온 천체 이름이 들어 있어: Sun, Moon, Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto, true Node (북쪽 노드), mean Apogee (리리트), Chiron.
{ "id": 0, "name": "Sun", "longitude": 354.702, // еклiптична довгота у градусах "latitude": -0.00016, "distance": 0.9945, // в астрономічних одиницях "speedLong": 0.9971, // градусів на день (від'ємне = ретроград) "speedLat": 0.00003, "speedDist": 0.00019, "isRetrograde": false, "declination": -1.4159, "rightAscension": 355.437}별자리와 하우스는 여기서 제공되지 않아: 별자리는 Math.floor(longitude / 30)으로 계산하고, 하우스는 houses의 커스피드로 구해.
houses
섹션 제목: “houses”하우스 커스피드 (12개)와 asc, MC도 포함돼:
{ "system": "P", "cusps": [118.18, 138.27, ...], // 12 значень "ascendant": 118.18, "mc": 12.708, "armc": 11.69, "vertex": 253.97, "equatorialAsc": 100.75, "coAscWK": 81.13, "coAscMunkasey": 123.7, "polarAsc": 261.13}aspects
섹션 제목: “aspects”행성 간의 어스펙트 배열:
{ "planet1": "Sun", "planet2": "Mercury", "planet1Id": 0, "planet2Id": 2, "type": { // об'єкт, не рядок "name": "Conjunction", "i18nKey": "aspect_conjunction", "angle": 0, "orb": 12, "symbol": "☌", "isMajor": true, "color": "#660480" }, "exactAngle": 3.365, "orb": 3.365, // відхилення від точного у градусах "isApplying": true}chartSect
섹션 제목: “chartSect”"diurnal" (출생 순간에 태양이 지평선 위에 있음) 또는 "nocturnal" (지평선 아래). 고전 점성술에서 사용돼.
다음은
섹션 제목: “다음은”다음도 시도해볼 수 있어:
시냅스트리: 두 사람의 궁합:
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`);현재 트랜짓을 네이탈 차트에 적용:
const transits = await client.transits({ // дані народження date: '1990-07-14', time: '14:30:00', timezoneOffset: 3, latitude: 50.4501, longitude: 30.5234, // дата транзиту transitDate: '2026-04-14',});실제 트랜짓을 기반으로 한 일일 운세:
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}`);크레딧 비용
섹션 제목: “크레딧 비용”- 네이탈 차트 (
/chart): 20 크레딧 - 시냅스트리: 50 크레딧
- 트랜짓: 50 크레딧
- 일일 운세: 20 크레딧
- Human Design: 50 크레딧
무료 플랜: 월 10 000 크레딧 = 네이탈 차트 500개, 혹은 시냅스트리 200개, 혹은 혼합 사용량.
오류 처리
섹션 제목: “오류 처리”각 응답에는 크레딧 정보를 담은 헤더가 있어:
X-Credits-Used: 20X-Credits-Remaining: 4980X-Credits-Reset: 2026-05-01T00:00:00Z크레딧이 소진되면 402 Payment Required를 받게 돼. 레이트 제한에 걸리면 (Free: 10 요청 / 분) 429 Too Many Requests와 Retry-After 헤더가 반환돼.
SDK는 타입이 지정된 오류를 던지니, 잡을 수 있어:
import { QuotaExceededError, RateLimitError } from '@astroway/sdk';
try { const chart = await aw.chart.compute(birth);} catch (err) { if (err instanceof QuotaExceededError) { console.log('Upgrade plan or wait for reset'); } else if (err instanceof RateLimitError) { console.log(`Retry in ${err.retryAfterSeconds ?? 60} seconds`); } else { throw err; }}구체적인 오류부터 일반적인 오류까지 잡아야 해: 모두 ApiError를 상속하니까, 먼저 ApiError를 체크하면 나머지는 자동으로 포함돼.
이제 끝
섹션 제목: “이제 끝”이제 네가 가진 것:
- 작동하는 API 키
- 설치된 SDK
- 첫 네이탈 차트
- 시냅스트리, 트랜짓, 운세 등을 추가할 충분한 예제
읽어볼 다음 페이지:
- 전체 가이드 «시작하기»: 더 자세히
- 예시: 네이탈 차트: 더 깊은 walkthrough
- API reference: 모든 758 엔드포인트
Solar Fire에 사용된 것과 동일한 Swiss Ephemeris - 단 4줄의 코드로.
카드 없이 무료 키. 첫 결제 전까지 월 5,000 API 호출.