Dasha Periods API

Vimshottari Dasha - Planetary period calculations

POST /v2/astrology/vimshottari-dasha $0.030/call

Basic Usage

import { VedikaClient } from '@vedika-io/sdk';

const client = new VedikaClient({ apiKey: process.env.VEDIKA_API_KEY });

const dasha = await client.getVimshottariDasha({
  datetime: '1990-05-15T10:30:00',
  latitude: 28.6139,
  longitude: 77.2090,
  timezone: '+05:30'
});

// Current periods
const current = dasha.current_dasha;
console.log('Current Mahadasha:', current.maha_dasha.planet);    // e.g. 'Rahu'
console.log('Current Antardasha:', current.antar_dasha.planet);  // e.g. 'Sun'

// Period dates
console.log('Mahadasha ends:', current.maha_dasha.end_date);     // e.g. '2029-12-09'

Response Structure

// What client.getVimshottariDasha() returns: the "data" object of
// POST /v2/astrology/vimshottari-dasha (the SDK removes the { success, data } wrapper).
// Raw HTTP callers read the same fields under body.data.
// Periods are relative to today's date; the values below are for 15 Oct 2026.
// {
//   "nakshatra": { "id": 21, "name": "Uttara Ashadha", "pada": 1, "lord": "Sun" },
//
//   "dasha_balance": {
//     "planet": "Sun",
//     "vedic_name": "Surya",
//     "years": 4,
//     "months": 6,
//     "days": 24,
//     "elapsed_percentage": 23.88
//   },
//
//   "current_dasha": {
//     "maha_dasha": {
//       "planet": "Rahu",
//       "vedic_name": "Rahu",
//       "start_date": "2011-12-09",
//       "end_date": "2029-12-09"
//     },
//     "antar_dasha": {
//       "planet": "Sun",
//       "vedic_name": "Surya",
//       "start_date": "2026-06-28",
//       "end_date": "2027-05-23"
//     },
//     "pratyantar_dasha": {
//       "planet": "Rahu",
//       "vedic_name": "Rahu",
//       "start_date": "2026-08-29",
//       "end_date": "2026-10-17"
//     },
//     "interpretation": {
//       "theme": "...",
//       "summary": "...",
//       "career": "...",
//       "health": "...",
//       "relationships": "...",
//       "spiritual": "...",
//       "areas_of_focus": ["..."],
//       "opportunities": ["..."],
//       "challenges": ["..."],
//       "advice": ["..."],
//       "remedies": ["..."]
//     },
//     "antar_interpretation": {
//       "combined_theme": "Rahu-Sun Period",
//       "primary_influence": "Rahu",
//       "secondary_influence": "Sun",
//       "summary": "..."
//     }
//   },
//
//   "maha_dasha": [
//     {
//       "planet": "Sun",
//       "vedic_name": "Surya",
//       "start_date": "1990-05-15",
//       "end_date": "1994-12-08",
//       "duration_years": 4.57,
//       "is_current": false,
//       "dignity": "neutral",
//       "dignity_strength": 1,
//       "antar_dasha": [
//         { "planet": "Sun", "start_date": "1990-05-15", "end_date": "...", "duration_years": 0.9, "is_current": false }
//         ... remaining antardashas of this mahadasha
//       ]
//     }
//     ... remaining mahadashas (the full 120-year cycle)
//   ],
//
//   "guidance": {
//     "current_phase": "You are in Rahu (Rahu) Maha Dasha",
//     "theme": "Ambition, Innovation, and Worldly Desires",
//     "time_remaining": "3 years, 1 month remaining",
//     "key_advice": ["..."],
//     "recommended_remedies": ["..."]
//   }
// }

Vimshottari Dasha Periods

Planet Duration Nakshatras
Ketu7 yearsAshwini, Magha, Moola
Venus20 yearsBharani, Purva Phalguni, Purva Ashadha
Sun6 yearsKrittika, Uttara Phalguni, Uttara Ashadha
Moon10 yearsRohini, Hasta, Shravana
Mars7 yearsMrigashira, Chitra, Dhanishta
Rahu18 yearsArdra, Swati, Shatabhisha
Jupiter16 yearsPunarvasu, Vishakha, Purva Bhadrapada
Saturn19 yearsPushya, Anuradha, Uttara Bhadrapada
Mercury17 yearsAshlesha, Jyeshtha, Revati

Get Specific Dasha Levels

const birthDetails = {
  datetime: '1990-05-15T10:30:00',
  latitude: 28.6139,
  longitude: 77.2090,
  timezone: '+05:30'
};

// Get only Mahadashas
const mahadashas = await client.getDashaV2('mahadasha', birthDetails);

// Get Antardashas (sub-periods)
const antardashas = await client.getDashaV2('antardasha', birthDetails);

// Get Pratyantardashas (sub-sub periods)
const pratyantardashas = await client.getDashaV2('pratyantardasha', birthDetails);

console.log(mahadashas);

// The full Vimshottari call also nests the antardashas inside each mahadasha
const dasha = await client.getVimshottariDasha(birthDetails);
const rahu = dasha.maha_dasha.find(m => m.planet === 'Rahu');
rahu.antar_dasha.forEach(a => {
  console.log(`Rahu-${a.planet}: ${a.start_date} to ${a.end_date}`);
});

Find Dasha for Specific Date

// What dasha will be running in 2030?
const dasha = await client.getVimshottariDasha({
  datetime: '1990-05-15T10:30:00',
  latitude: 28.6139,
  longitude: 77.2090,
  timezone: '+05:30'
});

const targetDate = '2030-06-15';
// ISO dates (YYYY-MM-DD) compare correctly as strings
const covers = p => p.start_date <= targetDate && targetDate <= p.end_date;

const maha = dasha.maha_dasha.find(covers);
const antar = maha.antar_dasha.find(covers);

console.log('In 2030:');
console.log('Mahadasha:', maha.planet);    // e.g. 'Mercury'
console.log('Antardasha:', antar.planet);  // e.g. 'Venus'

Dasha Predictions

// Guidance for the current dasha
const dasha = await client.getVimshottariDasha({
  datetime: '1990-05-15T10:30:00',
  latitude: 28.6139,
  longitude: 77.2090,
  timezone: '+05:30'
});

console.log('Current Period Analysis:');
console.log(dasha.guidance);
// {
//   current_phase: 'You are in Rahu (Rahu) Maha Dasha',
//   theme: 'Ambition, Innovation, and Worldly Desires',
//   time_remaining: '3 years, 1 month remaining',
//   key_advice: [ ... ],
//   recommended_remedies: [ ... ]
// }

const reading = dasha.current_dasha.interpretation;
console.log(reading.career);
console.log(reading.relationships);
console.log(reading.health);
console.log(reading.remedies);

Build Timeline Visualization

async function buildDashaTimeline(birthDetails) {
  const client = new VedikaClient({ apiKey: process.env.VEDIKA_API_KEY });

  const dasha = await client.getVimshottariDasha(birthDetails);
  const today = new Date();

  // Build timeline data
  const timeline = dasha.maha_dasha.map(md => {
    const startDate = new Date(md.start_date);
    const endDate = new Date(md.end_date);
    const isActive = today >= startDate && today <= endDate;
    const isPast = today > endDate;

    // Calculate progress percentage
    const totalDays = (endDate - startDate) / (1000 * 60 * 60 * 24);
    const elapsedDays = Math.max(0, (today - startDate) / (1000 * 60 * 60 * 24));
    const progress = isPast ? 100 : isActive ? (elapsedDays / totalDays) * 100 : 0;

    return {
      planet: md.planet,
      startDate: md.start_date,
      endDate: md.end_date,
      durationYears: md.duration_years,
      isActive,
      isPast,
      isFuture: !isActive && !isPast,
      progress: Math.round(progress),
      color: getPlanetColor(md.planet)
    };
  });

  return timeline;
}

function getPlanetColor(planet) {
  const colors = {
    Sun: '#f59e0b',
    Moon: '#e5e7eb',
    Mars: '#ef4444',
    Mercury: '#22c55e',
    Jupiter: '#eab308',
    Venus: '#ec4899',
    Saturn: '#3b82f6',
    Rahu: '#6366f1',
    Ketu: '#8b5cf6'
  };
  return colors[planet] || '#6b7280';
}

// Usage
const timeline = await buildDashaTimeline({
  datetime: '1990-05-15T10:30:00',
  latitude: 28.6139,
  longitude: 77.2090,
  timezone: '+05:30'
});

console.log(timeline);

Related APIs