Get Chinese Astrology
v1.0.1BaZi, zodiac year, compatibility, five elements, Kua, I Ching, Zi Wei and Flying Stars charts.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_bazi_chart BaZi chart
Calculates the Four Pillars (BaZi) chart for a birth date, an optional birth time and the birthplace time zone. Returns the year, month, day and hour pillars, the Day Master, each stem's Ten Gods relation to it, the hidden stems in each branch and the five-element count.
| Parameter | Type | Description |
|---|---|---|
birthDate * | string | Birth date as YYYY-MM-DD, from 1901-02-19 to 2100-02-08. |
time | string | Local birth time as HH:MM on a 24-hour clock. Without it the chart has no hour pillar and is read at midday. |
timeZone | string | IANA time zone of the birthplace, such as Asia/Shanghai, Asia/Tokyo or America/New_York. Asia/Shanghai when absent. |
get_zodiac_year Chinese zodiac year
Returns the Chinese zodiac year for a birth date or a calendar year: the animal, Heavenly Stem, element, yin or yang, the Chinese New Year dates that open and close the year and the Li Chun date. A birth date also reports whether Chinese New Year and Li Chun give different animals.
| Parameter | Type | Description |
|---|---|---|
date | string | Birth date as YYYY-MM-DD, from 1901-02-19 to 2100-02-08. The year can be given instead. |
year | integer | Zodiac year from 1901 to 2099, opened by Chinese New Year of that year. The date can be given instead. |
check_animal_compatibility Animal compatibility
Compares two Chinese zodiac animals, or the animals of two birth years, and names their relationship: Six Harmony, Three Harmony, clash, harm, break, punishment or neutral. Returns the relation types, the phase interaction, the distance on the twelve-animal circle and a written reading of the pair.
| Parameter | Type | Description |
|---|---|---|
firstAnimal | string | First zodiac animal, paired with secondAnimal. |
firstYear | integer | First birth year from 1901 to 2100, paired with secondYear. |
secondAnimal | string | Second zodiac animal, paired with firstAnimal. |
secondYear | integer | Second birth year from 1901 to 2100, paired with firstYear. |
count_five_elements Five elements count
Counts Wood, Fire, Earth, Metal and Water across the visible characters of the Four Pillars chart for a birth date, with an optional birth time and UTC offset. Returns each count with its relation to the Day Master, the leading element, the elements missing from view and the Day Master.
| Parameter | Type | Description |
|---|---|---|
date * | string | Birth date as YYYY-MM-DD, from 1901-02-19 to 2100-02-08. |
time | string | Local birth time as HH:MM on a 24-hour clock. Without it the count covers six characters instead of eight. |
utcOffset | string | Fixed UTC offset of the birthplace as +HH:MM or -HH:MM, used for solar-term boundaries. +08:00 when absent. |
get_kua_number Kua number
Returns the feng shui Kua number for a birth date and calculation table: its trigram, element, East or West group, and the four favourable and four unfavourable directions. Birthdays before Chinese New Year use the preceding Chinese year.
| Parameter | Type | Description |
|---|---|---|
birthDate * | string | Birth date as YYYY-MM-DD, from 1901-02-19 to 2099-12-31. |
formula * | string | Calculation table: male or female. |
cast_i_ching I Ching reading
Reads an I Ching hexagram from six line values, bottom line first: 6 is a changing Yin line, 7 a Yang line, 8 a Yin line and 9 a changing Yang line. Without line values it makes a random three-coin cast. Returns the primary and relating hexagrams, the changing lines and their classical texts.
| Parameter | Type | Description |
|---|---|---|
lines | array | Six line values from 6 to 9, bottom line first. A cast is made when absent. |
get_zi_wei_chart Zi Wei Dou Shu chart
Builds a Zi Wei Dou Shu chart for a birth date, a birth time and a traditional calculation table. Returns the lunar date, the Five Element bureau, the Life and Body palace branches and the major stars with their brightness and transformations in each of the twelve palaces.
| Parameter | Type | Description |
|---|---|---|
birthDate * | string | Birth date as YYYY-MM-DD, from 1900-01-01 to 2099-12-31. |
gender * | string | Traditional calculation table: male or female. |
time * | string | Local birth time as HH:MM on a 24-hour clock. |
get_flying_stars Annual flying stars
Returns the annual Flying Stars chart for a year: the star in each of the nine palaces, the centre star and the moment Li Chun begins the year. The grid has south at the top.
| Parameter | Type | Description |
|---|---|---|
year * | integer | Year from 1900 to 2099. |