Daily Panchanga
Calculate Vedic Panchanga for a given date and location. Returns Tithi, Nakshatra, Yoga, Karana, Vara (weekday), and auspicious and inauspicious periods for the day. Returns Tithi, Vara (weekday), Nakshatra, Yoga, and Karana for the birth date and location.
Endpoint
POST /v1/astro/panchanga
Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
| location | string | null | No | City name to resolve to lat/lon/tz automatically. Example: 'Mumbai' or 'New Delhi, India'. If provided, latitude, longitude and timezone are not required. |
| name | string | null | No | Optional. Name is not used in panchanga calculations. |
| date | string | Yes | Birth date in YYYY-MM-DD format |
| time | string | null | No | Birth time in HH:MM 24-hour format. If omitted, sunrise chart is used as fallback. |
| latitude | number | null | No | Latitude. Required if location not provided. |
| longitude | number | null | No | Longitude. Required if location not provided. |
| timezone | string | null | No | IANA timezone. Required if location not provided. |
| ayanamsa | string | No | Sidereal ayanamsa mode used in calculations |
Example request
- curl
- Python
- TypeScript
curl -X POST "https://api.asterwise.com/v1/astro/panchanga" \
-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_request import PanchangaRequest
configuration = asterwise.Configuration(
host="https://api.asterwise.com",
access_token="YOUR_API_KEY",
)
request = PanchangaRequest(
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(panchanga_request=request)
print(result)
import { createClient, createConfig, panchanga } from 'asterwise';
const client = createClient(createConfig({
baseUrl: 'https://api.asterwise.com',
headers: { Authorization: 'Bearer YOUR_API_KEY' },
}));
const result = await panchanga({
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.tithi | object | |
| data.tithi.number | integer | Tithi number, 1 to 30 |
| data.tithi.name | string | Tithi name, e.g. Pratipada, Purnima, Amavasya |
| data.tithi.paksha | string | Paksha — Shukla (waxing) or Krishna (waning) |
| data.tithi.degrees_elapsed | number | Degrees completed within the current tithi |
| data.tithi.degrees_remaining | number | Degrees remaining until the next tithi |
| data.tithi.end_time | string | null | |
| data.vara | object | |
| data.vara.number | integer | Weekday number, 1 to 7 |
| data.vara.name | string | Weekday name in Sanskrit, e.g. Ravivar, Somvar |
| data.vara.lord | string | Planetary lord of the weekday, e.g. Sun, Moon |
| data.vara.end_time | string | null | |
| data.nakshatra | object | |
| data.nakshatra.index | integer | Zero-based nakshatra index, 0 to 26 |
| data.nakshatra.name | string | Nakshatra name, e.g. Ashwini, Revati |
| data.nakshatra.pada | integer | Pada number, 1 to 4 |
| data.nakshatra.degrees_elapsed | number | Degrees completed within the current nakshatra |
| data.nakshatra.degrees_remaining | number | Degrees remaining until the next nakshatra |
| data.nakshatra.end_time | string | null | |
| data.yoga | object | |
| data.yoga.index | integer | Zero-based yoga index, 0 to 26 |
| data.yoga.name | string | Yoga name, e.g. Vishkumbha, Shiva |
| data.yoga.is_inauspicious | boolean | True if this yoga is considered inauspicious |
| data.yoga.degrees_elapsed | number | Degrees completed within the current yoga |
| data.yoga.end_time | string | null | |
| data.karana | object | |
| data.karana.number | integer | Karana number, 1 to 60 |
| data.karana.name | string | Karana name |
| data.karana.degrees_elapsed | number | Degrees completed within the current karana |
| data.karana.degrees_remaining | number | Degrees remaining until the next karana |
| data.karana.end_time | string | null |
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 |