← API reference

Units and conventions: degrees, offsets, times and indices

Most integration bugs are not astrology bugs. They are a sign flipped on a time-zone offset, a degree read as a longitude, or a UTC instant shown as local time. These are the API's conventions, in one place.

Updated · values generated from the engine

What this catalog is

Requests describe a moment in local civil time plus the offset that converts it to UTC, and a place in decimal degrees. Responses describe angles in decimal degrees and moments as UTC instants. Nothing is localised for you on the way out.

The birth input

Every single-birth endpoint takes these five fields (two-person endpoints take two of them). Unknown fields are rejected.

Birth input fields from the published OpenAPI spec
FieldTypeConstraintExampleRequired
datestringpattern ^\d{4}-\d{2}-\d{2}$1993-07-04yes
timestringpattern ^\d{2}:\d{2}(:\d{2})?$09:27:11yes
tz_offset_minutesinteger-840 … 840330yes
latnumber-90 … 9031.7473yes
lngnumber-180 … 18077.7754yes

Conventions

Units and conventions used across requests and responses
QuantityConventionExample fields
Time-zone offsetInteger minutes east of UTC: IST is 330, US Eastern standard time is -300. Half- and quarter-hour zones are whole minutes (345 for Nepal); fractions are rejected.tz_offset_minutes
Latitude / longitudeDecimal degrees, north and east positive.lat, lng
Local date and timeCivil date YYYY-MM-DD and 24-hour HH:mm or HH:mm:ss at the place, before applying the offset.date, time
Instants in responsesISO 8601 in UTC with milliseconds and Z.start, end, sunrise, computed_at
Ecliptic longitudeDecimal degrees 0 ≤ x < 360 from 0° Aries - sidereal on Vedic and KP endpoints, tropical on Western.longitude, cusp_longitude
Position within a signDecimal degrees 0 ≤ x < 30.degree_in_sign, ascendant.degree
DurationsDecimal years of 365.25 days in the dasha endpoints.years, remaining_years
HousesIntegers 1-12, counted from the ascendant (or from the reference point the field names).house, house_of_mars
Catalog indices1-based (nakshatra, tithi, yoga, karana, sign) - except the weekday, which is 0-based with Sunday = 0.nakshatra_index, tithi.index, vara.index
Julian dayAstronomical Julian day number (UT), where an endpoint exposes it.anchor_jd
Not applicablenull, not an empty string or a missing key - except cancellation_note, which is "".type, reason, cycle_ends_at

Parsing notes

  • The offset is the one in force AT THE BIRTH, not today's. Historical daylight saving and war-time clocks change it - Indian clocks ran at UTC+6:30 (390) during the Second World War. Resolve it from a time-zone database for the birth date.
  • Sign conventions differ from some libraries: POSIX TZ strings and JavaScript's Date.getTimezoneOffset() are west-positive (IST is -330 there). Negate before sending.
  • ascendant.degree in Vedic chart responses is the degree within the sign, not a longitude. Add 30 × (sign index − 1) for the longitude.
  • Instants are UTC. Convert to the user's zone for display; a sunrise in India is the previous calendar day in UTC.
  • Fractional years accumulate float noise (0.30000000000000004). Round for display; do not compare with ===.

In a real response

POST /v1/dasha/vimshottari - Recorded POST /v1/dasha/vimshottari excerpt: UTC instants with milliseconds and fractional years.

json
{
  "data": {
    "birth_balance": {
      "lord": "Venus",
      "remaining_years": 9.190143669857733
    },
    "mahadasha": [
      {
        "lord": "Venus",
        "start": "1993-07-04T03:57:11.000Z",
        "end": "2002-09-11T20:45:08.875Z",
        "years": 9.190143669857733
      }
    ]
  }
}

Questions

Which endpoints does this page apply to?
4 endpoints: Birth Chart (Kundli) (POST /v1/charts/birth); Panchang (POST /v1/panchang); Vimshottari Dasha (POST /v1/dasha/vimshottari); Upagraha Positions (Gulika, Mandi) (POST /v1/upagraha-positions).