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

Ephemeris Range

POST
/ephemeris
request.sh
curl -X POST https://api.astroway.info/v1/ephemeris \
-H "X-Api-Key: aw_live_..." \
-H "Content-Type: application/json" \
-d '{ "startDate": "2024-01-01", "endDate": "2024-12-31", "stepDays": 1, "planetIds": [ 0, 1, 2 ] }'

Return planet positions for a date range with configurable step (min 0.01 days). Max range: 1 year for sub-day steps, 5 years otherwise. Optionally filter by planetIds.

Media type application/json
object
startDate required
string
/^\d{4}-\d{2}-\d{2}$/
endDate required
string
/^\d{4}-\d{2}-\d{2}$/
stepDays
number
nullable
planetIds
Array<number>
Example
{
"startDate": "2024-01-01",
"endDate": "2024-12-31",
"stepDays": 1,
"planetIds": [
0,
1,
2
]
}

Successful calculation

Media type application/json
object
ok
boolean
data
object
ephemeris
Array<object>
object
jd
number
date
string
positions
Array<object>
object
planetId
number
longitude
number
latitude
number
speed
number
Example
{
"ok": true
}

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"
}
}
Корисно?