Planetary transits — Gochar
Scans a date range for planetary sign ingresses (Moon included) and retrograde/direct station events, each with its exact UTC time. Lahiri sidereal by default; set ayanamsa to 'tropical' for Western (tropical) sign changes, or 'raman' / 'kp' for those ayanamsas. Also known as Gochar.
Endpoint
POST /v1/astro/transits
Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
| from_date | string | Yes | Start of the date range to scan, in YYYY-MM-DD format. |
| to_date | string | Yes | End of the date range to scan, in YYYY-MM-DD format. Maximum range is 3 years (1095 days) from from_date. |
| ayanamsa | string | No | Zodiac for the sign changes. lahiri (default), raman and kp are sidereal ayanamsas (Vedic). tropical is the Western zodiac with no ayanamsa, so ingresses become Western sign changes (Sun into Aries at the March equinox, Moon sign changes every ~2.5 days). Station moments do not depend on this; only their reported longitude does. |
Example request
- curl
- Python
- TypeScript
curl -X POST "https://api.asterwise.com/v1/astro/transits" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"from_date":"2026-01-01","to_date":"2026-01-07"}'
import asterwise
from asterwise.api.advanced_api import AdvancedApi
from asterwise.models.transits_request import TransitsRequest
configuration = asterwise.Configuration(
host="https://api.asterwise.com",
access_token="YOUR_API_KEY",
)
request = TransitsRequest(
from_date="2026-01-01",
to_date="2026-01-07",
)
with asterwise.ApiClient(configuration) as client:
api = AdvancedApi(client)
result = api.transits(transits_request=request)
print(result)
import { createClient, createConfig, transits } from 'asterwise';
const client = createClient(createConfig({
baseUrl: 'https://api.asterwise.com',
headers: { Authorization: 'Bearer YOUR_API_KEY' },
}));
const result = await transits({
client,
body: {
"from_date": "2026-01-01",
"to_date": "2026-01-07"
},
});
console.log(result.data);
Example response
Example response omitted — live API call did not return HTTP 200.
Response fields
| Field | Type | Description |
|---|---|---|
| success | boolean | True if the request succeeded |
| message | string | Human-readable status message |
| data | object | |
| data.zodiac | string | Zodiac used for every event: sidereal (Vedic, default) or tropical (Western). |
| data.ayanamsa | string | Ayanamsa used: lahiri (default), raman, kp, or tropical (no ayanamsa). |
| data.ingresses | array[object] | All sign ingress events in the requested date range, Moon sign changes included. Covers all 9 Vedic planets: Sun, Moon, Mars, Mercury, Jupiter, Venus, Saturn, Rahu, Ketu (Rahu/Ketu are the mean nodes). |
| data.ingresses[].planet | string | Planet name, e.g. Sun, Mars, Rahu |
| data.ingresses[].from_sign | integer | Zero-based sign index the planet is leaving, 0 for Aries through 11 for Pisces |
| data.ingresses[].to_sign | integer | Zero-based sign index the planet is entering |
| data.ingresses[].from_sign_name | string | null | Name of the sign the planet is leaving, e.g. Pisces |
| data.ingresses[].to_sign_name | string | null | Name of the sign the planet is entering, e.g. Aries |
| data.ingresses[].jd | number | Julian Day number of the ingress moment |
| data.ingresses[].date_iso | string | Instant of ingress in UTC, ISO 8601 without an offset (YYYY-MM-DDTHH:MM:SS). Read it as UTC; datetime_utc carries the Z. |
| data.ingresses[].datetime_utc | string | null | Instant of ingress, ISO 8601 UTC with Z (e.g. 2026-06-02T08:03:11Z). |
| data.ingresses[].is_sankranti | boolean | True for solar ingress (Sankranti); false for all other planets. |
| data.ingresses[].retrograde_ingress | boolean | True when the planet is retrograde (speed < 0) at the ingress moment. |
| data.ingresses[].zodiac | string | null | Zodiac the signs are measured in: sidereal or tropical. |
| data.ingresses[].ayanamsa | string | null | Ayanamsa used: lahiri, raman, kp, or tropical (none). |
| data.stations | array[object] | All retrograde and direct station events in the requested date range. Only the 7 classical planets (Sun through Saturn) have stations. Rahu and Ketu are always excluded from this list. |
| data.stations[].planet | string | Planet name. Rahu and Ketu never have station events. |
| data.stations[].station_type | string | retrograde — planet appears to reverse direction. direct — planet resumes forward motion. |
| data.stations[].jd | number | Julian Day number of the station moment |
| data.stations[].date_iso | string | Instant of station in UTC, ISO 8601 without an offset (YYYY-MM-DDTHH:MM:SS). Read it as UTC; datetime_utc carries the Z. |
| data.stations[].datetime_utc | string | null | Instant of station, ISO 8601 UTC with Z. |
| data.stations[].longitude | number | Longitude of the planet at the moment of station, in the requested zodiac (sidereal by default; tropical when ayanamsa is tropical). |
| data.stations[].sign | integer | null | Zero-based sign index at the station, 0 for Aries through 11 for Pisces |
| data.stations[].sign_name | string | null | Name of the sign at the station, e.g. Gemini |
| data.stations[].zodiac | string | null | Zodiac the longitude is measured in: sidereal or tropical. |
| data.stations[].ayanamsa | string | null | Ayanamsa used: lahiri, raman, kp, or tropical (none). |
Errors
| Code | Description | Reference |
|---|---|---|
| api_key_invalid | Invalid API key format. | api_key_invalid |
| api_key_missing | API key is missing. Include it in the Authorization header as 'Bearer YOUR_KEY'. | api_key_missing |
| api_key_not_found | The provided API key was not found. Verify the key in your Asterwise dashboard. | api_key_not_found |
| api_key_revoked | This API key has been revoked. | api_key_revoked |
| burst_limit_exceeded | Too many requests per minute. Please slow down. | burst_limit_exceeded |
| internal_error | Something went wrong on our end. Please try again, or contact [email protected] if the problem persists. Include your request_id when contacting support. | internal_error |
| ip_rate_limit_exceeded | Too many requests from this IP address. Please slow down. | ip_rate_limit_exceeded |
| monthly_usage_limit_exceeded | Monthly API call limit reached. Upgrade your plan to continue. | monthly_usage_limit_exceeded |
| payload_too_large | Request body exceeds maximum allowed size of 64KB. | payload_too_large |
| subscription_expired | Your subscription has expired. Please renew at asterwise.com/dashboard to continue. | subscription_expired |
| validation_error | The request couldn't be processed. See the 'details' field for specific field-level issues. | validation_error |