行运
计算指定时间段内行星行运及其与本命盘的相位。
计算行运
计算某个日期范围内的行运:
bash
curl -X POST "https://api.astroapi.cloud/api/calc/transit" \
-H "X-Api-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"birthDate": "1990-06-15T14:30",
"birthLocation": {
"latitude": 51.5074,
"longitude": -0.1278,
"timezone": "Europe/London"
},
"transitDateStart": "2024-01-01T00:00",
"transitDateEnd": "2024-01-31T23:59",
"transitLocation": {
"latitude": 51.5074,
"longitude": -0.1278,
"timezone": "Europe/London"
}
}'参数
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
birthDate | string | 是 | 出生日期/时间,格式为 YYYY-MM-DDTHH:mm |
birthLocation | object | 是 | 出生地点,包含纬度、经度和时区 |
transitDateStart | string | 是 | 行运期间开始,格式为 YYYY-MM-DDTHH:mm |
transitDateEnd | string | 是 | 行运期间结束,格式为 YYYY-MM-DDTHH:mm |
transitLocation | object | 是 | 行运地点,包含纬度、经度和时区 |
houseSystem | string | 否 | 宫位系统(默认:"placidus") |
points | array | 否 | 要计算的天体点 |
orbs | object | 否 | 每种相位类型的自定义容许度值 |
language | string | 否 | 文本内容的语言代码(默认:"en") |
includeText | boolean | 否 | 包含解读文本(默认:false) |
includeReadableEntities | boolean | 否 | 包含人类可读的实体标题(默认:false) |
地点对象
json
{
"latitude": 51.5074,
"longitude": -0.1278,
"timezone": "Europe/London"
}响应
响应包含行运穿越(行星进入/离开星座或宫位的时刻)、行运宫位、行运行星与本命行星之间的相位以及星盘 URL。
json
{
"data": {
"crossings": [...],
"transitHouses": [...],
"aspects": [
{
"point1": "saturn",
"point2": "sun",
"aspect": "conjunction",
"orb": 1.2,
"applying": true
}
],
"charts": {
"transit": {
"title": "Transit Chart (Bi-wheel)",
"url": "..."
},
"natal": {
"title": "Natal Chart",
"url": "..."
}
},
"natalPoints": [...],
"natalHouses": [...],
"transitPoints": [...]
}
}自定义容许度
为不同相位类型指定自定义容许度值:
bash
curl -X POST "https://api.astroapi.cloud/api/calc/transit" \
-H "X-Api-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"birthDate": "1990-06-15T14:30",
"birthLocation": {
"latitude": 51.5074,
"longitude": -0.1278,
"timezone": "Europe/London"
},
"transitDateStart": "2024-01-01T00:00",
"transitDateEnd": "2024-01-31T23:59",
"transitLocation": {
"latitude": 51.5074,
"longitude": -0.1278,
"timezone": "Europe/London"
},
"orbs": {
"conjunction": 3,
"opposition": 3,
"trine": 2,
"square": 2
}
}'包含解读文本
在行运计算结果中包含解读文本:
bash
curl -X POST "https://api.astroapi.cloud/api/calc/transit" \
-H "X-Api-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"birthDate": "1990-06-15T14:30",
"birthLocation": {
"latitude": 51.5074,
"longitude": -0.1278,
"timezone": "Europe/London"
},
"transitDateStart": "2024-01-15T00:00",
"transitDateEnd": "2024-01-15T23:59",
"transitLocation": {
"latitude": 51.5074,
"longitude": -0.1278,
"timezone": "Europe/London"
},
"includeText": true,
"language": "en"
}'iCal 导出
将行运事件导出为 iCal(.ics)文件,可导入 Google 日历、Apple 日历或 Outlook 等日历应用程序。
POST /api/calc/transit/ical
bash
curl -X POST "https://api.astroapi.cloud/api/calc/transit/ical" \
-H "X-Api-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"birthDate": "1990-06-15T14:30",
"birthLocation": {
"latitude": 51.5074,
"longitude": -0.1278,
"timezone": "Europe/London"
},
"transitDateStart": "2024-01-01T00:00",
"transitDateEnd": "2024-03-31T23:59",
"transitLocation": {
"latitude": 51.5074,
"longitude": -0.1278,
"timezone": "Europe/London"
}
}' --output transits.ics响应为 text/calendar 文件,附带 Content-Disposition: attachment; filename="transits.ics"。
参数
iCal 导出接受与标准行运端点相同的参数,另外还支持:
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
aspects | array | 否 | 按相位类型过滤(例如 ["conjunction", "trine"]) |
TIP
将下载的 .ics 文件导入您的日历应用程序,即可将行运事件作为日历条目查看,并附有每个相位的描述。