Western day view
One calendar day at a place, Western style: planetary hours, void-of-course Moon periods, Moon sign changes and the Moon phase. The day runs from local midnight to midnight; every planetary hour that falls in it is listed, with the void-of-course periods that overlap it and the Moon's tropical sign at the start and end. Same engines as /v1/western/planetary-hours and /v1/western/moon/void-of-course, in one call. Western counterpart of the panchanga civil day.
Endpoint
POST /v1/western/day
GET works tooGET /v1/western/day: Same answer as the POST route with the same fields as query parameters; cacheable (public, 10 minutes).
Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
| date | string | Yes | Date in YYYY-MM-DD format |
| location | string | null | No | City name. Example: 'Mumbai' |
| latitude | number | null | No | Latitude in decimal degrees, north positive. Use with longitude and timezone instead of location. |
| longitude | number | null | No | Longitude in decimal degrees, east positive. Use with latitude and timezone instead of location. |
| timezone | string | null | No | IANA timezone string |
Example request
- curl
- Python
- TypeScript
curl -X POST "https://api.asterwise.com/v1/western/day" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"date":"2026-01-01","latitude":51.5074,"longitude":-0.1278,"timezone":"Europe/London"}'
import asterwise
from asterwise.api.western_astrology_api import WesternAstrologyApi
from asterwise.models.western_day_request import WesternDayRequest
configuration = asterwise.Configuration(
host="https://api.asterwise.com",
access_token="YOUR_API_KEY",
)
request = WesternDayRequest(
date="2026-01-01",
latitude=51.5074,
longitude=-0.1278,
timezone="Europe/London",
)
with asterwise.ApiClient(configuration) as client:
api = WesternAstrologyApi(client)
result = api.western_day(western_day_request=request)
print(result)
import { createClient, createConfig, westernDay } from 'asterwise';
const client = createClient(createConfig({
baseUrl: 'https://api.asterwise.com',
headers: { Authorization: 'Bearer YOUR_API_KEY' },
}));
const result = await westernDay({
client,
body: {
"date": "2026-01-01",
"latitude": 51.5074,
"longitude": -0.1278,
"timezone": "Europe/London"
},
});
console.log(result.data);
Example response
Example response omitted — live API call did not return HTTP 200.
Response fields
| Field | Type | Description |
|---|---|---|
| success | boolean | True if the request succeeded |
| message | string | Human-readable status message |
| data | object | |
| data.date | string | |
| data.timezone | string | |
| data.start | string | Local midnight that opens the day, ISO 8601 with offset. |
| data.end | string | Local midnight that closes it. |
| data.start_utc | string | |
| data.end_utc | string | |
| data.status | string | no_sunrise at polar latitudes: planetary_hours is then null. |
| data.status_detail | string | null | |
| data.planetary_hours | array[PlanetaryHour] | null | Every planetary hour that overlaps the civil day (the hours after midnight come from the previous sunrise's night). |
| data.void_of_course | array[object] | Void-of-course Moon periods that overlap the civil day (traditional rule, see /v1/western/moon/void-of-course). |
| data.void_of_course[].start_utc | string | |
| data.void_of_course[].end_utc | string | |
| data.void_of_course[].duration_hours | number | |
| data.void_of_course[].moon_sign | string | |
| data.void_of_course[].next_sign | string | |
| data.void_of_course[].last_aspect | VoidOfCourseLastAspect | null | |
| data.void_of_course[].whole_sign_void | boolean | |
| data.moon | object | |
| data.moon.sign_at_start | string | Tropical Moon sign at local midnight opening the day. |
| data.moon.sign_at_end | string | Tropical Moon sign at the midnight closing it. |
| data.moon.sign_changes | array[object] | Moon sign changes inside the day, with exact times. |
| data.moon.sign_changes[].at_utc | string | |
| data.moon.sign_changes[].at_local | string | |
| data.moon.sign_changes[].from_sign | string | |
| data.moon.sign_changes[].to_sign | string | |
| data.moon.phase_name | string | Moon phase for the date (eight 45° phases). |
| data.moon.illumination_pct | number | |
| data.moon.is_waxing | boolean |
Errors
| Code | Description | Reference |
|---|---|---|
| api_key_invalid | Invalid API key format. | api_key_invalid |
| api_key_missing | API key is missing. Include it in the Authorization header as 'Bearer YOUR_KEY'. | api_key_missing |
| api_key_not_found | The provided API key was not found. Verify the key in your Asterwise dashboard. | api_key_not_found |
| api_key_revoked | This API key has been revoked. | api_key_revoked |
| burst_limit_exceeded | Too many requests per minute. Please slow down. | burst_limit_exceeded |
| internal_error | Something 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_exceeded | Too many requests from this IP address. Please slow down. | ip_rate_limit_exceeded |
| monthly_usage_limit_exceeded | Monthly API call limit reached. Upgrade your plan to continue. | monthly_usage_limit_exceeded |
| payload_too_large | Request body exceeds maximum allowed size of 64KB. | payload_too_large |
| subscription_expired | Your subscription has expired. Please renew at asterwise.com/dashboard to continue. | subscription_expired |
| validation_error | The request couldn't be processed. See the 'details' field for specific field-level issues. | validation_error |