AstroWay/api v2.173.1 · ja
すべてのシステムが正常です
// astrology api · POST /v1/ziwei/chart

Zi Wei Dou Shu (Purple Star) API

生年月日、時間、性別を入れるだけで、全体のチャートが作れるよ:12の宮とその干、14の主要星、補助星、31の小星、12の人生段階、10年リミット、そして星に付随する4つの変換がマークされるんだ。

Endpoint
POST /v1/ziwei/chart
Cost
20 credits
Latency
~130 ms
Tier
Tier 2
// 01 / What it computes

Zi Wei Dou Shu (Purple Star) API

出生情報は月曜日に変換されるよ、Zi Weiは純粋に月曜日制だからね、BaZiとは違って太陽節に切り替わらないんだ。月曜月と双時からエンドポイントが魂宮と体宮を決めて、五虎則で各宮に干を割り当て、魂宮の柱から五行クラスを読み取る。そのクラスと月曜日で紫微を古典的な借比則で配置し、同系列の6星は固定オフセットで続く。天府は寅-申軸で鏡像になり、独自の8星を持つ。その骨格の上に、6つの吉星と6つの凶星、給与庫と天馬、31の小星が年干・年支・月・日・時に対応してキー付けされ、12の人生段階、学者サイクル、将軍サイクル、年サイクル、クラス番号で開く10年リミット、年齢指定で年リミットが付く。4つの変換は年干から導出され、星自体に付随して返され、別リストにはしないんだ。

// 02 / Live request

POST/v1/ziwei/chart

curl -X POST https://api.astroway.info/v1/ziwei/chart \
  -H "X-Api-Key: aw_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "date": "2000-08-16",
    "time": "04:00:00",
    "gender": "male",
    "age": 25
  }'
Response (excerpt)
{
  "ok": true,
  "data": {
    "fiveElementClass": { "key": "wood3", "chinese": "木三局", "name": "Wood 3", "value": 3 },
    "soulPalace": { "index": 4, "branch": "Wu" },
    "bodyPalace": { "index": 8, "branch": "Xu" },
    "ziwei": { "index": 4, "branch": "Wu" },
    "annualLimit": { "age": 25, "index": 8, "branch": "Xu" },
    "palaces": [
      {
        "branch": "Wu",
        "pillar": "Ren-Wu",
        "palace": "destiny",
        "isSoul": true,
        "majorStars": [{ "chinese": "紫微", "name": "Purple Star", "pinyin": "Zi Wei" }],
        "lifeStage": { "chinese": "死", "name": "Death" },
        "decade": { "index": 0, "fromAge": 3, "toAge": 12 }
      }
    ]
  }
}
// 03 / Parameters

Parameters

nametypeRequired
date string (YYYY-MM-DD) yes Birth date. It is converted to a lunar date, because Zi Wei is a lunar system.
time string (HH:MM:SS) yes Local clock time. Required: the soul palace is placed from the double-hour, so a chart without it would be twelve palaces of confident nonsense rather than a partial answer.
gender string yes male or female. It sets the direction of the twelve life stages, the scholar cycle and the decade limits, so the chart cannot be built without it.
age number no Return the annual-limit palace for this age. Omit and the field comes back null.
yearDivide string no lunar (default: the year opens on day one of the first lunar month) or lichun (the BaZi boundary, for reconciling against a calculator that imported it).
fixLeap boolean no Split a leap month at day 15 (default) or count the whole of it as the month it follows.
dayDivide string no forward (default: 23:00 belongs to the next day) or current (keep the date and mark the hour as the late Zi).
school string no The 四化 table: zhongzhou (default), quanji, quanshu or beipai. The four disagree on three of the ten year stems.
language string no Any of 21 codes. Palace names and life-stage names come back translated; star names stay as characters with an English gloss.
// 04 / When to use it

When to use it

中国占星の製品を作るときに使ってみてね、対象が中国語以外の市場向けなら特に。アプリ、リーディングサービス、チャートレンダラ、構造が必要なエージェントに最適だよ。レスポンスは純粋な構造だけでプローズはなく、12宮グリッドやレポートジェネレータ、LLMプロンプトにそのまま入れられる。同ファミリーのリファレンスエンドポイントはもっと安くて用語集やツールチップに便利だけど、全ての出生で同じテーブルを返し、フィールドでそう言うだけだから、チャート構築には使わないでね。

// 05 / Notes

Notes

3つの公開チャートにピン留めしてあって、1つのライブラリに絞ってないのは意図的だよ。ほとんどのオープンソースZi Weiエコシステムは単一プロジェクトから派生してるから、いくつかに同意すれば実質1つに同意したことになるんだ。完全なチャートが2つ正確に再現され、3つ目は別の教本から来てる。リクエストボディに4つの学派スイッチがあって、コードにはなく、出生データに応じて全体チャートを変えるんだ:年境界、閏月、23:00ロールオーバー、変換テーブル。別の計算機が違う結果を出したら、まずその4つをチェックしてから計算を確認してね。

Try the Zi Wei Dou Shu API

Grab a key and make your first call in under a minute.

99.9% SLA · 有料プラン · 30日間 ステータス →