API Reference / Vedic Astrology / Panchang
/v1/panchang/panchaka
Panchaka type (5-fold inauspicious).
What this tells you
This endpoint uses the formula form of Panchaka ("the five-fold"). The tithi, weekday and nakshatra numbers at local sunrise of `date` are added, and the remainder after dividing by 9 picks the type. Five of the nine remainders are adverse (Roga, Agni, Raja and two Mrityu slots); the other four mean no Panchaka. Each type has its own area of caution. The rising sign is not part of this calculation. This is not the nakshatra Panchak (Moon in Dhanishta to Revati); for that, use /v1/muhurta/panchaka-rahita.
Request
All requests require an Authorization header with your dv_live_* API key.
curl "https://api.lifeastroapi.com/v1/panchang/panchaka?date=2027-01-15&tz=Asia%2FKolkata&lat=28.6139&lon=77.209" \
-H "Authorization: Bearer YOUR_API_KEY"Query parameters
Checked against the API: a parameter is marked required when the request fails without it.
| Name | Required | Example | Description |
|---|---|---|---|
date | yes | 2027-01-15 | Date (YYYY-MM-DD). |
tz | yes | Asia/Kolkata | Timezone: IANA name (Asia/Kolkata) or UTC offset (+05:30). |
lat | yes | 28.6139 | Latitude in decimal degrees. |
lon | yes | 77.209 | Longitude in decimal degrees. |
ayanamsa | no | — | Ayanamsa (sidereal offset) to use. Defaults to lahiri. |
Response (200 OK)
The real response to the example request above, generated from the API itself. Long arrays are trimmed to their first two items. Field names are stable across versions.
{
"date": "2027-01-15",
"location": {
"lat": 28.6139,
"lon": 77.209,
"alt": 0
},
"tz": "Asia/Kolkata",
"is_panchaka": true,
"type": "Agni",
"formula_mod": 1,
"components": {
"tithi_number": 7,
"vara_number": 6,
"nakshatra_number": 27
},
"avoidance": "construction,electrical_work,fire_rituals"
}Field reference
Every field in the response, with its type, a real example, and what it means.
| Field | Type | Meaning |
|---|---|---|
| date | string (YYYY-MM-DD) | The requested date. example: "2027-01-15" |
| location | object | Echo of lat, lon and alt (metres). example: { "lat": 28.6139, "lon": 77.209, "alt": 0 } |
| tz | string | Echo of the tz you sent. example: "Asia/Kolkata" |
| is_panchaka | boolean | Whether a Panchaka type is in effect for the day. example: true |
| type | string | One of Roga, Agni, Mrityu, Raja. Empty string "" when is_panchaka is false. Translated when you pass `locale`. example: "Agni" |
| formula_mod | integer (0–8) | ((tithi_number − 1) + (vara_number − 1) + (nakshatra_number − 1)) mod 9. example: 1Jyotish: 0 = Roga, 1 = Agni, 3 = Mrityu, 5 = Raja, 8 = Mrityu. 2, 4, 6 and 7 mean no Panchaka. |
| components.tithi_number | integer (1–30) | Tithi at local sunrise: 1 = Shukla Pratipada … 15 = Purnima, 16 = Krishna Pratipada … 30 = Amavasya. example: 7 |
| components.vara_number | integer (1–7) | Weekday at local sunrise: 1 = Sunday … 7 = Saturday. example: 6 |
| components.nakshatra_number | integer (1–27) | Nakshatra at local sunrise: 1 = Ashwini … 27 = Revati. example: 27 |
| avoidance | string (comma-separated) | Activity codes to avoid. Empty string when is_panchaka is false. example: "construction,electrical_work,fire_rituals"Jyotish: Roga: surgery,travel,new_medicines. Agni: construction,electrical_work,fire_rituals. Mrityu: new_beginnings,griha_pravesh,marriage. Raja: financial_transactions,legal_matters,asset_purchase. |
Usage tips
How to use it
- Avoid for specific activities onlyUnlike Rahu Kaal, which is avoided for everything, Panchaka is avoided only for the activities in `avoidance`. Split the string on commas to get the codes and map them to your own labels.
- One value per dayThe result is fixed by the elements at sunrise; the `time` parameter does not change it. Cache it per (date, lat, lon).
Errors
Every error follows the same envelope. Use the error.code field (not the message) for conditional logic in your integration.
401 Unauthorized
{
"error": {
"code": "unauthorized",
"message": "missing or invalid API key",
"request_id": "req_01hqy7k8c3e7m1n"
}
}402 Payment Required
{
"error": {
"code": "trial_exhausted",
"message": "your free trial credits are exhausted — pick a plan to continue",
"top_up_url": "https://lifeastroapi.com/pricing",
"request_id": "req_01hqy7k8c3e7m1n"
}
}429 Too Many Requests
{
"error": {
"code": "rate_limited",
"message": "rate limit exceeded; retry after 12 seconds",
"request_id": "req_01hqy7k8c3e7m1n"
}
}Try it
Get a dv_live_* key from your dashboard and paste into the cURL snippet above. New accounts get 1,500 free credits. Sign up.