API reference for the natalengine library
npm install natalengine
import {
calculateAstrology,
calculateVedic,
calculateHumanDesign,
calculateGeneKeys
} from 'natalengine';
// Western Astrology
const astro = calculateAstrology(
'1990-06-15', // birth date (YYYY-MM-DD)
14.5, // birth hour (decimal, 14.5 = 2:30 PM)
-5, // timezone (UTC offset)
40.7128, // latitude
-74.0060 // longitude
);
console.log(astro.bigThree);
// "♊ Gemini Sun, ♓ Pisces Moon, ♎ Libra Rising"
// Human Design
const hd = calculateHumanDesign('1990-06-15', 14.5, -5);
console.log(hd.type.name); // "Generator"
// Vedic (Jyotish)
const vedic = calculateVedic('1990-06-15', 14.5, -5, 40.7128, -74.0060);
console.log(vedic.moonSign.summary);
// "Moon in Simha (Leo), Purva Phalguni Nakshatra"
// Gene Keys
const gk = calculateGeneKeys(hd);
console.log(gk.activationSequence.lifeWork.gift); // "Discrimination"
Calculate Western natal chart with planetary positions, aspects, and analysis.
birthDate (string) - Date in YYYY-MM-DD formatbirthHour (number) - Decimal hours (14.5 = 2:30 PM)timezone (number) - UTC offset (-5 for EST)latitude (number, optional) - Required for accurate Risinglongitude (number, optional) - Required for accurate Rising{
sun: { sign, degree, longitude },
moon: { sign, degree, longitude },
rising: { sign, degree, longitude, accurate },
planets: {
mercury, venus, mars, jupiter,
saturn, uranus, neptune, pluto
},
nodes: { north, south },
midheaven: { sign, degree, longitude },
aspects: [
{ planet1, planet2, aspect, symbol, orb, nature }
],
balance: {
elements: { fire, earth, air, water },
modalities: { cardinal, fixed, mutable },
dominantElement,
dominantModality
},
bigThree: "♊ Gemini Sun, ♓ Pisces Moon, ♎ Libra Rising"
}
Calculate Vedic (Jyotish) astrology chart using sidereal zodiac with Lahiri ayanamsa.
birthDate (string) - Date in YYYY-MM-DD formatbirthHour (number) - Decimal hours (14.5 = 2:30 PM)timezone (number) - UTC offset (-5 for EST)latitude (number, optional) - Required for accurate Lagnalongitude (number, optional) - Required for accurate Lagna{
ayanamsa: {
system: "Lahiri",
degrees: 24.123,
formatted: "24° 7' 23\""
},
moonSign: {
rashi: { name: "Simha", westernName: "Leo", symbol: "♌" },
nakshatra: { name: "Purva Phalguni", pada: 2 },
summary: "Moon in Simha (Leo), Purva Phalguni Nakshatra"
},
positions: {
sun: { rashi, nakshatra, degree },
moon: { rashi, nakshatra, degree },
// ... all planets, rahu, ketu
},
dasha: {
birthLord: "Venus",
current: {
maha: "Venus", mahaRemaining: "5y 3m",
antar: "Saturn", antarRemaining: "1y 2m"
},
dashas: [...]
},
houses: { 1: { sign, planets }, ... }
}
Calculate Human Design chart with Type, Strategy, Authority, and gate activations.
birthDate (string) - Date in YYYY-MM-DD formatbirthHour (number) - Decimal hourstimezone (number) - UTC offset{
type: {
name: "Generator",
strategy: "Wait to respond",
signature: "Satisfaction",
notSelf: "Frustration"
},
authority: {
name: "Emotional Authority",
description: "Wait through emotional wave"
},
profile: {
numbers: "3/5",
name: "Martyr/Heretic",
theme: "Trial and error, universalizing"
},
incarnationCross: {
name: "Right Angle Cross of Planning",
gates: [40, 37, 9, 16]
},
centers: {
defined: [{ name, theme, biological }],
undefined: [{ name, theme, biological }]
},
gates: {
personality: {
sun, earth, moon, northNode, southNode,
mercury, venus, mars, jupiter, saturn,
uranus, neptune, pluto
},
design: { ... },
all: [1, 2, 3, ...]
},
channels: [
{ gates: [41, 30], name: "Recognition", centers: [...] }
]
}
Calculate Gene Keys profile from Human Design data.
humanDesignData (object) - Result from calculateHumanDesign(){
activationSequence: {
lifeWork: { key, line, sphere, shadow, gift, siddhi },
evolution: { ... },
radiance: { ... },
purpose: { ... }
},
venusSequence: {
attraction: { ... },
iq: { ... },
eq: { ... },
sq: { ... }
},
pearlSequence: {
vocation: { ... },
culture: { ... },
pearl: { ... }
}
}