Vimshottari Dasha via API: dashaLevels, referenceDate and Lahiri Ayanamsa
5 min read
Request Mahadasha, Antardasha and Pratyantardasha from a Vimshottari Dasha API. What dashaLevels and referenceDate do, and why Lahiri is the default.
In Vedic astrology, the birth chart shows the promise and the Dasha shows the timing. Ask any astrologer which feature their clients care about most, and "What period am I in, and when does it change?" is near the top. For astrology apps, a clear Dasha timeline is one of the features users pay for.
It is also easy to get subtly wrong, which is why Mantrilo makes every input explicit. This post explains Vimshottari Dasha in developer terms, then shows exactly how to request it from the Vimshottari Dasha API in Mantrilo and turn the result into a "current period" card and a timeline.
Vimshottari Dasha in 200 words
Vimshottari is a 120-year cycle divided among nine grahas. Each rules a Mahadasha of fixed length, always in the same order:
| Lord | Years |
|---|---|
| Ketu | 7 |
| Venus (Shukra) | 20 |
| Sun (Surya) | 6 |
| Moon (Chandra) | 10 |
| Mars (Mangal) | 7 |
| Rahu | 18 |
| Jupiter (Guru) | 16 |
| Saturn (Shani) | 19 |
| Mercury (Budh) | 17 |
Where you start in the sequence depends on the Moon's nakshatra at birth. Each of the 27 nakshatras has a ruling lord, and the first Mahadasha belongs to that lord. You don't get the whole period, only the part that remains, in proportion to how far the Moon still has to travel through that nakshatra. This leftover is called the balance of Dasha at birth.
Each Mahadasha divides into nine Antardashas in the same order, starting with the Mahadasha lord itself. An Antardasha lasts (Mahadasha years × Antardasha lord's years) ÷ 120. Venus within Venus, for example, is 20 × 20 ÷ 120 = 3 years and 4 months. Each Antardasha divides again into Pratyantardashas by the same rule.
Try it in one request
curl https://api.mantrilo.com/v1/astrology/calculate \
-H "Authorization: Bearer $MANTRILO_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"operation": "chart",
"birth": {
"datetime": "1995-03-14T06:30:00+05:45",
"latitude": 27.7172,
"longitude": 85.3240,
"timezone": "Asia/Kathmandu"
},
"dashaLevels": 2,
"referenceDate": "2026-12-02"
}'You get the Lahiri D1/D9 chart plus Vimshottari Dasha periods down to Antardasha, in data.result.
Try it with your own birth details: get a free sandbox key.
dashaLevels: how deep to go
dashaLevels controls how many layers of periods you get back:
| dashaLevels | You get | Typical use |
|---|---|---|
| 0 (or omitted) | No Dasha | Chart only |
| 1 | Mahadashas | Life overview |
| 2 | Plus Antardashas | "Current period" cards, yearly views |
| 3 | Plus Pratyantardashas | Detailed monthly timing |
Deeper levels mean much larger responses. Nine Mahadashas become 81 Antardashas and 729 Pratyantardashas over a full cycle. Request level 3 only on screens that need it.
referenceDate: why it is required
Any nonzero dashaLevels requires a referenceDate in YYYY-MM-DD format. Leave it out and the request fails validation.
The reference date anchors the calculation to a point in time. It lets the result mark which period is running on that date, and it keeps the request explicit: the same inputs always return the same answer, rather than depending on the server's clock. That makes results reproducible and cacheable.
For a "current period" card, send today's date in the user's time zone. For a "what's coming next year" view, send a future date.
Lahiri ayanamsa, and why it is the default
Vedic astrology uses the sidereal zodiac, measured against the fixed stars. Western astrology mostly uses the tropical zodiac, tied to the seasons. The gap between them, called the ayanamsa, grows slowly over time and is currently about 24 degrees.
Different traditions compute that gap slightly differently. Lahiri (also called Chitrapaksha) is the ayanamsa adopted for official Indian calendars and the most widely used in Indian astrology, so Mantrilo uses it by default for charts.
Why this matters for Dasha: the Moon's sidereal position decides the starting nakshatra and the balance at birth. A different ayanamsa shifts the Moon by a fraction of a degree, which can shift every Dasha date in a person's life. Users comparing your app with their family astrologer's printout will notice. If you need a specific ayanamsa for raw planetary positions, the positions and panchang operations accept an optional ayanamsaDegrees.
Turning the response into a "current period" card
Log one real response, then walk the tree to find the periods running on the reference date:
function currentPeriods(dashas, onDate) {
const path = [];
let level = dashas;
while (level?.length) {
const running = level.find((p) => p.start <= onDate && onDate < p.end);
if (!running) break;
path.push(running);
level = running.children;
}
return path; // [Mahadasha, Antardasha, Pratyantardasha?]
}
const [maha, antar] = currentPeriods(result.dasha, "2026-12-02");
// e.g. "Saturn Mahadasha, Mercury Antardasha, until 2028-03-10"Display it as a sentence users understand: "You are in Saturn Mahadasha and Mercury Antardasha, which runs until March 2028." Then show a progress bar for how far through the Antardasha they are. That single card answers the question most users open astrology apps to ask.
For a timeline view, render Mahadashas as a horizontal bar across the user's life and let them tap into a period to see its Antardashas.
Common mistakes
Wrong birth time zone. The Moon moves roughly half a degree an hour. A birth entered with today's offset instead of the historical one (Kathmandu used +05:30 before 1986) can move the Dasha balance by weeks. Always build the birth datetime with the offset in force on the birth date.
Approximate birth times presented as exact. A ten-minute error in birth time shifts the Moon by roughly a tenth of a degree. Inside a 20-year Venus Mahadasha, that moves the dates by about seven weeks. If the user isn't sure of their time, say so on screen.
Recomputing on every screen. The Dasha tree for a birth never changes. Store it with the profile and only call the API again when the user edits their birth details or you need a different level.
Forgetting referenceDate. It is required for any dashaLevels above zero.
Why Mantrilo for Dasha
A Dasha timeline is only as good as the birth instant and ayanamsa behind it. Mantrilo requires the historical UTC offset and IANA zone, uses Lahiri by default and asks for an explicit referenceDate, so the same request always returns the same answer.
You also get Dasha in the same response as the chart, up to three levels deep, without a second service. For astrology apps where the "current period" card is the reason users subscribe, that reliability is the feature.
FAQ
What is the difference between Mahadasha and Antardasha? A Mahadasha is a major period ruled by one graha, lasting 6 to 20 years. Each Mahadasha divides into nine Antardashas, which are sub-periods with their own lords.
Which ayanamsa does the Dasha calculation use? Lahiri by default, the standard in Indian astrology.
Why does my app's Dasha differ from another app's? Usually because of a different ayanamsa, a different birth time zone offset, or a slightly different birth time. Check all three.
How many Dasha levels can I request? Up to three: Mahadasha, Antardasha and Pratyantardasha.
Add Dasha timing to your app. Get a free sandbox key, start from our Kundli tutorial and see every chart option in the astrology docs.
