Перейти до вмісту
AstroWay/api v2.173.1 · docs
усі системи в нормі

Hidden stems (Cang Gan)

POST
/bazi/hidden-stems
request.sh
curl -X POST https://api.astroway.info/v1/bazi/hidden-stems \
-H "X-Api-Key: aw_live_..." \
-H "Content-Type: application/json" \
-d '{ "date": "1990-05-15", "time": "14:30:00", "timezoneOffset": 8 }'

The one to three stems each branch shelters, with role and weight. This is where most of a chart’s elements live: a chart with no visible Water can still be soaked in it. On the four storage branches the middle role belongs to the stored element, not to the second in the list.

Media type application/json
object
date required
string
/^\d{4}-\d{2}-\d{2}$/
time
string
/^\d{2}:\d{2}(:\d{2})?$/
timezoneOffset
number
>= -14 <= 14
longitude
number
>= -180 <= 180
trueSolarTime
boolean
stageSchool
string
Allowed values: classical unified
includeFullTable
boolean
language
string
Example
{
"date": "1990-05-15",
"time": "14:30:00",
"timezoneOffset": 8
}

Successful calculation

Media type application/json
object
ok
boolean
data
object
solarYear
number
nullable
pillars
Array<object>
nullable
object
name
string
nullable
stem
string
nullable
branch
string
nullable
pillar
string
nullable
hiddenStems
Array<object>
nullable
object
stem
string
nullable
stemIndex
number
nullable
element
string
nullable
yin
boolean
nullable
role
string
nullable
weight
number
nullable
elementName
string
nullable
polarity
string
nullable
weighting
string
nullable
notes
Array
nullable
methodology
string
nullable
source
string
nullable
disclaimer
string
nullable
Example
{
"ok": true,
"data": {
"solarYear": 1990,
"pillars": [
{
"name": "year",
"stem": "Geng",
"branch": "Wu",
"pillar": "Geng-Wu",
"hiddenStems": [
{
"stem": "Ding",
"stemIndex": 3,
"element": "Fire",
"yin": true,
"role": "principal",
"weight": 0.7,
"elementName": "Вогонь",
"polarity": "Інь"
},
{
"stem": "Ji",
"stemIndex": 5,
"element": "Earth",
"yin": true,
"role": "middle",
"weight": 0.3,
"elementName": "Земля",
"polarity": "Інь"
}
]
},
{
"name": "month",
"stem": "Xin",
"branch": "Si",
"pillar": "Xin-Si",
"hiddenStems": [
{
"stem": "Bing",
"stemIndex": 2,
"element": "Fire",
"yin": false,
"role": "principal",
"weight": 0.6,
"elementName": "Вогонь",
"polarity": "Ян"
},
{
"stem": "Geng",
"stemIndex": 6,
"element": "Metal",
"yin": false,
"role": "middle",
"weight": 0.3,
"elementName": "Метал",
"polarity": "Ян"
},
{
"stem": "Wu",
"stemIndex": 4,
"element": "Earth",
"yin": false,
"role": "residual",
"weight": 0.1,
"elementName": "Земля",
"polarity": "Ян"
}
]
},
{
"name": "day",
"stem": "Geng",
"branch": "Chen",
"pillar": "Geng-Chen",
"hiddenStems": [
{
"stem": "Wu",
"stemIndex": 4,
"element": "Earth",
"yin": false,
"role": "principal",
"weight": 0.6,
"elementName": "Земля",
"polarity": "Ян"
},
{
"stem": "Yi",
"stemIndex": 1,
"element": "Wood",
"yin": true,
"role": "residual",
"weight": 0.3,
"elementName": "Дерево",
"polarity": "Інь"
},
{
"stem": "Gui",
"stemIndex": 9,
"element": "Water",
"yin": true,
"role": "middle",
"weight": 0.1,
"elementName": "Вода",
"polarity": "Інь"
}
]
},
{
"name": "hour",
"stem": "Gui",
"branch": "Wei",
"pillar": "Gui-Wei",
"hiddenStems": [
{
"stem": "Ji",
"stemIndex": 5,
"element": "Earth",
"yin": true,
"role": "principal",
"weight": 0.6,
"elementName": "Земля",
"polarity": "Інь"
},
{
"stem": "Ding",
"stemIndex": 3,
"element": "Fire",
"yin": true,
"role": "residual",
"weight": 0.3,
"elementName": "Вогонь",
"polarity": "Інь"
},
{
"stem": "Yi",
"stemIndex": 1,
"element": "Wood",
"yin": true,
"role": "middle",
"weight": 0.1,
"elementName": "Дерево",
"polarity": "Інь"
}
]
}
],
"weighting": "Each branch contributes one character split among the stems it shelters: 1.0 alone, 0.7/0.3 for two, 0.6/0.3/0.1 for three (本气/中气/余气). The membership is canonical; the split is a stated convention, and the day-count 人元司令 scheme distributes the same characters differently.",
"notes": [],
"methodology": "地支藏干. Each branch shelters one to three stems: 本气 the principal, 中气 the middle, 余气 the residual. A chart with no visible Water can still be soaked in it, which is why an element count over the eight visible characters alone is not a balance.",
"source": "淵海子平 (Song) + 三命通會 (Wan Minying, Ming), public domain",
"disclaimer": "BaZi pillars use the canonical 60-jiazi cycle, anchored at 1990-01-01 = Bing-Yin. Year and month boundaries are the exact Lichun and 節 instants from the ephemeris, stated in China Standard Time; pass time and timezoneOffset for births near a boundary. Day and hour follow the birthplace clock, with the day rolling at 23:00 local."
}
}

Validation error

Media type application/json
Example
{
"ok": false,
"error": {
"code": "INVALID_INPUT",
"message": "Validation failed: date: Date must be YYYY-MM-DD",
"details": [
{
"path": "date",
"message": "Date must be YYYY-MM-DD"
}
]
}
}

Missing or invalid API key

Media type application/json
Example
{
"ok": false,
"error": {
"code": "INVALID_API_KEY",
"message": "Invalid API key"
}
}
Корисно?