Skip to main content

Planetary hours

The 24 planetary hours for a date and place, with the planet ruling each hour. Sunrise to sunset and sunset to the next sunrise are each split into 12 equal parts, so hours are longer by day in summer and shorter in winter. The first hour after sunrise belongs to the planet of the weekday (Sunday Sun, Monday Moon, Tuesday Mars, Wednesday Mercury, Thursday Jupiter, Friday Venus, Saturday Saturn); the rest follow the Chaldean order Saturn, Jupiter, Mars, Sun, Venus, Mercury, Moon. Same calculation as /v1/astro/panchanga/hora, with Western naming and both local and UTC times.

Endpoint​

POST /v1/western/planetary-hours

GET works too

GET /v1/western/planetary-hours: Same answer as the POST route with the same fields as query parameters; cacheable (public, 10 minutes). Current-moment flags such as is_current may lag by up to the cache age.

Request parameters​

FieldTypeRequiredDescription
datestringYesDate in YYYY-MM-DD format
locationstring | nullNoCity name. Example: 'Mumbai'
latitudenumber | nullNoLatitude in decimal degrees, north positive. Use with longitude and timezone instead of location.
longitudenumber | nullNoLongitude in decimal degrees, east positive. Use with latitude and timezone instead of location.
timezonestring | nullNoIANA timezone string

Example request​

curl -X POST "https://api.asterwise.com/v1/western/planetary-hours" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"date":"2026-01-01","latitude":19.076,"longitude":72.8777,"timezone":"Asia/Kolkata"}'

Example response​

Example response omitted — live API call did not return HTTP 200.

Response fields​

FieldTypeDescription
successbooleanTrue if the request succeeded
messagestringHuman-readable status message
dataobject
data.statusstringok, or no_sunrise when the place has no sunrise or sunset on that date (polar latitudes): the hour fields are then null.
data.status_detailstring | nullPlain-English reason when status is not ok.
data.datestring
data.weekdaystring | nullWeekday of the date, e.g. Sunday.
data.day_rulerstring | nullPlanet of the weekday; it rules the first hour after sunrise.
data.conventionstring | nullunequal_seasonal: day and night each split into 12 equal parts from real sunrise and sunset.
data.sunrise_localstring | null
data.sunset_localstring | null
data.next_sunrise_localstring | null
data.sunrise_utcstring | null
data.sunset_utcstring | null
data.next_sunrise_utcstring | null
data.day_hour_minutesnumber | nullLength of one day hour in minutes.
data.night_hour_minutesnumber | nullLength of one night hour in minutes.
data.hoursarray[PlanetaryHour] | nullThe 24 hours; null when status is no_sunrise.

Errors​

CodeDescriptionReference
api_key_invalidInvalid API key format.api_key_invalid
api_key_missingAPI key is missing. Include it in the Authorization header as 'Bearer YOUR_KEY'.api_key_missing
api_key_not_foundThe provided API key was not found. Verify the key in your Asterwise dashboard.api_key_not_found
api_key_revokedThis API key has been revoked.api_key_revoked
burst_limit_exceededToo many requests per minute. Please slow down.burst_limit_exceeded
internal_errorSomething went wrong on our end. Please try again, or contact [email protected] if the problem persists. Include your request_id when contacting support.internal_error
ip_rate_limit_exceededToo many requests from this IP address. Please slow down.ip_rate_limit_exceeded
monthly_usage_limit_exceededMonthly API call limit reached. Upgrade your plan to continue.monthly_usage_limit_exceeded
payload_too_largeRequest body exceeds maximum allowed size of 64KB.payload_too_large
subscription_expiredYour subscription has expired. Please renew at asterwise.com/dashboard to continue.subscription_expired
validation_errorThe request couldn't be processed. See the 'details' field for specific field-level issues.validation_error