Choghadiya periods
Calculate all 16 Choghadiya periods (8 day + 8 night) for a given date and location. Each period is classified (e.g. highly auspicious for Amrit, good, beneficial, neutral, or inauspicious) with the ruling planet.
Endpoint
POST /v1/astro/panchanga/choghadiya
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 | |
| longitude | number | null | No | |
| timezone | string | null | No | IANA timezone string |
Example request
- curl
- Python
- TypeScript
curl -X POST "https://api.asterwise.com/v1/astro/panchanga/choghadiya" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"date":"1990-05-15","latitude":28.6139,"longitude":77.209,"timezone":"Asia/Kolkata"}'
import asterwise
from asterwise.api.astrology_api import AstrologyApi
from asterwise.models.panchanga_ext_request import PanchangaExtRequest
configuration = asterwise.Configuration(
host="https://api.asterwise.com",
access_token="YOUR_API_KEY",
)
request = PanchangaExtRequest(
date="1990-05-15",
latitude=28.6139,
longitude=77.209,
timezone="Asia/Kolkata",
)
with asterwise.ApiClient(configuration) as client:
api = AstrologyApi(client)
result = api.panchanga_choghadiya(panchanga_ext_request=request)
print(result)
import { createClient, createConfig, panchangaChoghadiya } from 'asterwise';
const client = createClient(createConfig({
baseUrl: 'https://api.asterwise.com',
headers: { Authorization: 'Bearer YOUR_API_KEY' },
}));
const result = await panchangaChoghadiya({
client,
body: {
"date": "1990-05-15",
"latitude": 28.6139,
"longitude": 77.209,
"timezone": "Asia/Kolkata"
},
});
console.log(result.data);
Example response
Response fields
| Field | Type | Description |
|---|---|---|
| success | boolean | True if the request succeeded |
| message | string | Human-readable status message |
| data | object | |
| data.date | string | Date for which Choghadiya is calculated (YYYY-MM-DD). |
| data.sunrise | string | Sunrise time in HH:MM local time. |
| data.sunset | string | Sunset time in HH:MM local time. |
| data.day_choghadiya | array[object] | 8 Choghadiya periods from sunrise to sunset. |
| data.day_choghadiya[].period | integer | Period number, 1 to 8. |
| data.day_choghadiya[].name | string | Choghadiya name, e.g. Amrit, Shubh, Kaal. |
| data.day_choghadiya[].type | string | Classification: highly auspicious, auspicious, or inauspicious. |
| data.day_choghadiya[].ruling_planet | string | Planet ruling this Choghadiya period. |
| data.day_choghadiya[].suitable_for | string | Activities suited to this period. |
| data.day_choghadiya[].start | string | Period start time in HH:MM local time. |
| data.day_choghadiya[].end | string | Period end time in HH:MM local time. |
| data.day_choghadiya[].is_current | boolean | True if this period is currently active. |
| data.night_choghadiya | array[object] | 8 Choghadiya periods from sunset to next sunrise. |
| data.night_choghadiya[].period | integer | Period number, 1 to 8. |
| data.night_choghadiya[].name | string | Choghadiya name, e.g. Amrit, Shubh, Kaal. |
| data.night_choghadiya[].type | string | Classification: highly auspicious, auspicious, or inauspicious. |
| data.night_choghadiya[].ruling_planet | string | Planet ruling this Choghadiya period. |
| data.night_choghadiya[].suitable_for | string | Activities suited to this period. |
| data.night_choghadiya[].start | string | Period start time in HH:MM local time. |
| data.night_choghadiya[].end | string | Period end time in HH:MM local time. |
| data.night_choghadiya[].is_current | boolean | True if this period is currently active. |
Errors
| Code | Description | Reference |
|---|---|---|
| authentication_failed | Missing or invalid API key. | authentication_failed |
| ephemeris_unavailable | Upstream ephemeris service error. | ephemeris_unavailable |
| insufficient_tier | API key tier does not include this endpoint. | insufficient_tier |
| internal_error | Unexpected server error. | internal_error |
| ip_rate_limit_exceeded | Too many requests in a short window. | ip_rate_limit_exceeded |
| payload_too_large | Request body exceeds the size limit. | payload_too_large |
| resource_not_found | Referenced resource was not found. | resource_not_found |
| validation_error | Request body failed schema validation. | validation_error |