# 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.

Source: https://astronode.dev/reference/units-and-conventions · Updated: 2026-12-01

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.

| Field | Type | Constraint | Example | Required |
| --- | --- | --- | --- | --- |
| `date` | `string` | `pattern ^\d{4}-\d{2}-\d{2}$` | `1993-07-04` | yes |
| `time` | `string` | `pattern ^\d{2}:\d{2}(:\d{2})?$` | `09:27:11` | yes |
| `tz_offset_minutes` | `integer` | `-840 … 840` | `330` | yes |
| `lat` | `number` | `-90 … 90` | `31.7473` | yes |
| `lng` | `number` | `-180 … 180` | `77.7754` | yes |

## Conventions

| Quantity | Convention | Example fields |
| --- | --- | --- |
| Time-zone offset | Integer 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 / longitude | Decimal degrees, north and **east** positive. | `lat, lng` |
| Local date and time | Civil date `YYYY-MM-DD` and 24-hour `HH:mm` or `HH:mm:ss` at the place, before applying the offset. | `date, time` |
| Instants in responses | ISO 8601 in UTC with milliseconds and `Z`. | `start, end, sunrise, computed_at` |
| Ecliptic longitude | Decimal degrees `0 ≤ x < 360` from 0° Aries - sidereal on Vedic and KP endpoints, tropical on Western. | `longitude, cusp_longitude` |
| Position within a sign | Decimal degrees `0 ≤ x < 30`. | `degree_in_sign, ascendant.degree` |
| Durations | Decimal years of 365.25 days in the dasha endpoints. | `years, remaining_years` |
| Houses | Integers 1-12, counted from the ascendant (or from the reference point the field names). | `house, house_of_mars` |
| Catalog indices | 1-based (nakshatra, tithi, yoga, karana, sign) - except the weekday, which is 0-based with Sunday = 0. | `nakshatra_index, tithi.index, vara.index` |
| Julian day | Astronomical Julian day number (UT), where an endpoint exposes it. | `anchor_jd` |
| Not applicable | `null`, not an empty string or a missing key - except `cancellation_note`, which is `""`. | `type, reason, cycle_ends_at` |

## Things to watch

- 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 `===`.

## Example: 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`).

## Endpoints

- [`POST /v1/charts/birth`](https://astronode.dev/capabilities/vedic/charts-birth) - Birth Chart (Kundli) API
- [`POST /v1/panchang`](https://astronode.dev/capabilities/vedic/panchang) - Panchang API
- [`POST /v1/dasha/vimshottari`](https://astronode.dev/capabilities/vedic/dasha-vimshottari) - Vimshottari Dasha API
- [`POST /v1/upagraha-positions`](https://astronode.dev/capabilities/vedic/upagraha-positions) - Upagraha Positions (Gulika, Mandi) API
