AstroWay/api v2.180.1 · ja
すべてのシステムが正常です

Rectification API: 開発者向けの出生時間の修正

レクティフィケーションは、未知または不正確な出生時間を生活の出来事に基づいて調整するプロセスです。この投稿では、アルゴリズミック方法とTrutine of Hermesを使用してAPI経由で自動化する方法について説明します

矯正是時間的校正。您開始於一個約定的時間(例如,“早上”或“約14:00”)並縮小它,使用:

  • 重要的生活事件(結婚、孩子、職業變更、死亡)
  • 身體特徵(古典的天文學將升交點的類型與身體類型對應)
  • 行星的角度位置(出生時)

結果是校正的時間,通常在±5分鐘內精確。

1. Trutine of Hermes (/v1/rectification/trutine) - 250 credits

Section titled “1. Trutine of Hermes (/v1/rectification/trutine) - 250 credits”

古典方法,奉行於赫爾墨斯·特里斯梅吉斯。它使用月球在出生時的位置與升交點/降交點在懷孕時的位置之間的關係。

如何運作:

  1. 我們取一個約定的出生時間
  2. 我們計算懷孕的時間範圍(約260-290天)
  3. 對每個懷孕時間,我們檢查出生時月球的位置是否符合懷孕時的升交點/降交點
  4. 我們返回一個包含候選時間的列表,按照適合度排序

快速,但不夠精確。適合於縮小廣泛的時間窗口(例如,“早上”→2小時的時間窗口)。

const result = await client.rectification.trutine({
date: '1990-07-14',
time: '14:30:00',
timezoneOffset: 3,
latitude: 50.4501,
longitude: 30.5234,
});
console.log(`Suggested ascendant: ${result.suggestedAsc.toFixed(2)}°`);
console.log(`Moon above the horizon at conception: ${result.moonAboveHorizon}`);

2. 全面的矯正 (/v1/rectification) - 500 credits

Section titled “2. 全面的矯正 (/v1/rectification) - 500 credits”

基於多個生活事件的算法。這是最具挑戰性的方法(每個請求約120秒)。

輸入:

  • 約定的出生時間(時間範圍)
  • 一個包含事件的列表,包括日期和類型
  • 可選:身體描述

算法:

  1. 我們生成一個包含候選時間的列表,範圍內(通常每分鐘一步)
  2. 對每個候選時間,我們計算天文學的天盤
  3. 我們評估每個候選時間的適合度,根據預測的天文學模式(進步、直行、轉位)
  4. 我們返回一個包含適合度評分的列表,按照適合度排序
const result = await client.rectification.compute({
baseInput: {
date: '1990-07-14',
time: '14:30:00',
timezoneOffset: 3,
latitude: 50.4501,
longitude: 30.5234,
},
events: [
// type picks which significators are checked; weight is 1-3 importance
{ date: '2015-06-20', type: 'marriage', description: 'married', weight: 3 },
{ date: '2018-03-12', type: 'child', description: 'first child', weight: 2 },
{ date: '2020-09-05', type: 'career', description: 'career change', weight: 2 },
],
searchRangeMinutes: 120,
stepMinutes: 5,
});
const best = result.candidates[0];
console.log(`Best candidate: ${best.timeFormatted}, score ${best.score.toFixed(2)}, ${result.count} candidates scored`);
console.log(`Candidates: ${result.candidates.length}`);

矯正對於:

  • 使用者不知道時間:提供矯正為付費功能
  • 專業的天文學工具:節省每個客戶的手動工作時間
  • HD工具:人體設計非常敏感於時間;矯正大大提高了準確性
  • 研究工具:驗證歷史天文學,當出生時間不準確時

不適合

  • 工具,當使用者已經知道時間的精確度(±5分鐘)時(沒有收益)
  • 休閒天文學工具,當時間的準確性對結果沒有影響時(每日的太陽座標不需要)
  • Trutine: 250 credits:約1-2秒鐘
  • 全面的矯正:500 credits:約120秒鐘

這是API中最具挑戰性的方法。若你提供矯正作為功能,請相應地定價:這是高級服務,值得付費。

計畫預算:

  • 每月100次矯正:約50,000 credits = Pro計畫($59)+額外的預算
  • 每月1,000次矯正:500,000 credits = Enterprise計畫

矯正需要時間。UI應該:

  • 非同步處理:不要阻塞請求;將其放入隊列,顯示進度
  • 進度指示器:全面的矯正可能需要120秒;使用者需要反饋
  • 顯示結果:矯正後的時間,適合度評分,重新計算的選擇,若事件不準確
async function handleRectify(input: RectifyInput) {
setLoading(true);
setStatus('Running rectification (this may take up to 2 minutes)...');
try {
const result = await client.rectification.compute(input);
setResult(result);
const best = result.candidates[0];
setStatus(`Done. Refined time: ${best.timeFormatted} (score ${best.score.toFixed(2)} of ${result.count})`);
} catch (err) {
setStatus(`Error: ${err.message}`);
} finally {
setLoading(false);
}
}

矯正工具的典型流程:

  1. 使用者輸入約定的出生時間+生活事件
  2. 工具首先呼叫 /v1/rectification/trutine(便宜,快速),以縮小時間窗口
  3. 然後呼叫 /v1/rectification(全面的)以獲得更精確的時間
  4. 工具儲存結果並使用校正的時間進行所有未來的計算
  5. 未來的請求標記為“矯正自約定的”

這種整合方法約需750 credits,但提供了最佳的準確性。

矯正永遠不會提供100%的準確性。即使是專業的天文學家也會在評估中有5-10分鐘的差異。

AstroWay的算法是基於相對準確性的:縮小時間窗口,但結果永遠是“最佳候選者”,而不是絕對的真實。總是顯示適合度評分,並提供重新計算的選擇,若使用者有更好的資訊。

算法是尋找模式的。經驗豐富的天文學家考慮到上下文,難以編碼:“結婚是否匆促?”“職業變更是否自願?”結合:

  1. 算法矯正:縮小時間窗口
  2. 天文學家的手動檢查:最終的校正

你的工具可以提供這作為付費服務。

  • [API參考](/docs/api/):找到矯正的API端點
  • [定價](/pricing/):查看信用單位的定價計畫
  • [快速入門](/getting-started/):獲得API金鑰
MakSeong · AstroWay

AstroWay API を作っている: Swiss Ephemeris を純粋な REST にラップし、実際に重要な退屈な詳細を書いています。

// この上に構築

Solar Fireと同じSwiss Ephemeris - 4行のコードで。

無料のキー(カード不要)。最初の支払いまでに月5,000回の呼び出し。

より多くのブログ

Industry 2026-06-05

Free Astrology API: Which One Has the Best Free Tier in 2026?

A side-by-side of free tiers across the major astrology APIs - credits, request caps, card requirements - and how much you can actually build for free.

Engineering 2026-06-05

Horoscope API Tutorial: Build a Daily Horoscope Feature

Add daily, weekly and monthly horoscopes to your app via API - sign-based text vs transit-based personalization - with TypeScript and Python code.

Engineering 2026-06-05

Natal Chart API in PHP: SDK + Laravel Example

Compute a natal chart in PHP with the AstroWay SDK - plain PHP and a Laravel facade - without compiling a Swiss Ephemeris extension.