API Reference / Vedic Astrology / Chart (Kundli)
/v1/chart/graha-yuddha
Planetary war detection.
What this tells you
Graha Yuddha ("planetary war") occurs when two of the five tara grahas — Mars, Mercury, Jupiter, Venus, Saturn — are within 1° of each other. Sun, Moon, Rahu and Ketu never take part. The winner keeps its strength; the loser is weakened. Classical texts decide the winner by brightness or latitude; this API uses a simpler rule and names the planet with the lower sidereal longitude as winner.
Request
All requests require an Authorization header with your dv_live_* API key.
curl "https://api.lifeastroapi.com/v1/chart/graha-yuddha?date=1990-01-15&tz=Asia%2FKolkata&lat=19.076&lon=72.8777&time=10%3A30" \
-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 | 1990-01-15 | Birth date (YYYY-MM-DD). |
tz | yes | Asia/Kolkata | Birth place timezone: IANA name (Asia/Kolkata) or UTC offset (+05:30). |
lat | yes | 19.076 | Birth place latitude in decimal degrees. |
lon | yes | 72.8777 | Birth place longitude in decimal degrees. |
time | no | 10:30 | Birth time (HH:MM, 24-hour, local). Defaults to 12:00. |
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": "1990-01-15",
"time": "10:30",
"location": {
"lat": 19.076,
"lon": 72.8777,
"alt": 0
},
"tz": "Asia/Kolkata",
"ayanamsa": "lahiri",
"ayanamsa_value": 23.71795,
"house_system": "whole_sign",
"yuddha": []
}Field reference
Every field in the response, with its type, a real example, and what it means.
| Field | Type | Meaning |
|---|---|---|
| date | string | Birth date you sent (YYYY-MM-DD), echoed back. example: "1990-01-15" |
| time | string | Birth time you sent, echoed back. "12:00" when you leave `time` out. example: "10:30" |
| tz | string | Timezone you sent (IANA name or fixed offset such as +05:30), echoed back. example: "Asia/Kolkata" |
| location | object | Birth coordinates used. `alt` is in metres and is 0 unless you send `alt`. example: { "lat": 19.076, "lon": 72.8777, "alt": 0 } |
| ayanamsa | string | Ayanamsa used. Default lahiri; set it with the `ayanamsa` parameter (lahiri, raman, krishnamurti, fagan, yukteshwar, true_chitrapaksha). example: "lahiri" |
| ayanamsa_value | number | Ayanamsa in degrees at the birth moment. Sidereal longitude = tropical longitude − this value. example: 23.71795 |
| house_system | string | Echo of the optional `house_system` parameter (default whole_sign). This endpoint does not use it, so you never need to send it; only /v1/chart/houses changes with it. example: "whole_sign" |
| yuddha[] | array of objects | Planetary wars in the chart. Empty array when there are none, as in this example and most charts. example: [] |
| yuddha[].planet1 | string | First planet of the pair (the one earlier in the order Mars, Mercury, Jupiter, Venus, Saturn). example: "Mars" |
| yuddha[].planet2 | string | Second planet of the pair. example: "Saturn" |
| yuddha[].angular_gap | number (0–1) | Distance between the two planets in degrees of sidereal longitude. Always below 1. example: 0.42 |
| yuddha[].winner | string | Winning planet: the one with the lower sidereal longitude. The other planet is the loser; there is no separate loser field. example: "Mars" |
Usage tips
How to use it
- Rare eventMost charts have zero active wars. If `yuddha` is empty, just skip rendering.
- Show as a strong warningWhen a war exists, the loser's significations are unreliable. The loser is whichever of `planet1` / `planet2` is not `winner`; highlight it in the chart with a clear badge.
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.