🕓 रिकॉर्ड 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 सेकंड)
Section titled “चरण 1: API‑की प्राप्त करो (30 सेकंड)”रजिस्टर हो api.astroway.info/dashboard/sign-up पर। मुफ्त प्लान: 10 000 क्रेडिट / महीना। बिना कार्ड के।
dashboard में «Create key» → «Production» पर क्लिक करो → कॉपी करो। कीज़ का फॉर्मेट aw_live_aB3xY7pQ9rN2mK4jH8vC5tL6wZ1fD0eR है।
संकेत: aw_test_ प्रीफ़िक्स वाले sandbox‑कीज़ भी हैं - वे क्रेडिट नहीं घटाते। विकास के दौरान उनका उपयोग करो।
चरण 2: SDK स्थापित करो
Section titled “चरण 2: SDK स्थापित करो”TypeScript
Section titled “TypeScript”npm install @astroway/sdkPython
Section titled “Python”pip install astrowayदोनों SDK सभी 758 एंडपॉइंट को टाइप्ड अनुरोधों और प्रतिक्रियाओं के साथ कवर करते हैं।
चरण 3: पहली नताल चार्ट
Section titled “चरण 3: पहली नताल चार्ट”TypeScript
Section titled “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
Section titled “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 क्या लौटाता है
Section titled “API क्या लौटाता है”वापस एक JSON‑ऑब्जेक्ट आता है जिसमें चार मुख्य भाग होते हैं:
planets
Section titled “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
Section titled “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
Section titled “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
Section titled “chartSect”"diurnal" (जन्म के समय सूर्य क्षितिज के ऊपर) या "nocturnal" (क्षितिज के नीचे)। क्लासिक ज्योतिष में उपयोग होता है।
आगे क्या
Section titled “आगे क्या”और क्या आज़माएँ:
सिनास्ट्रि: दो लोगों की संगतता:
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}`);क्रेडिट में लागत
Section titled “क्रेडिट में लागत”- नताल चार्ट (
/chart): 20 क्रेडिट - सिनास्ट्रि: 50 क्रेडिट
- ट्रांज़िट्स: 50 क्रेडिट
- दैनिक राशिफल: 20 क्रेडिट
- Human Design: 50 क्रेडिट
मुफ़्त प्लान: 10 000 क्रेडिट / महीना = 500 नताल चार्ट, या 200 सिनास्ट्रि, या मिश्रित लोड।
त्रुटि संभालना
Section titled “त्रुटि संभालना”हर प्रतिक्रिया में क्रेडिट वाले हेडर होते हैं:
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 टाइप्ड एरर फेंकता है, जिन्हें पकड़ सकते हो:
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 को इनहेरिट करते हैं, इसलिए पहले उस पर चेक करने से बाकी सब पकड़े जाएंगे।
अब तुम्हारे पास है:
- काम करने वाला API‑की
- स्थापित SDK
- पहली नताल चार्ट
- पर्याप्त उदाहरण, ताकि सिनास्ट्रि, ट्रांज़िट्स, राशिफल जोड़ सको
आगे पढ़ें:
- पूर्ण गाइड «कहाँ से शुरू करें»: अधिक विवरण
- उदाहरण: नताल चार्ट: गहरा walkthrough
- API reference: सभी 758 एंडपॉइंट
वही Swiss Ephemeris जो Solar Fire में है - बस 4 लाइनों के कोड में।
कार्ड के बिना मुफ्त कुंजी। पहले भुगतान तक 5,000 कॉल प्रति माह।