Planetary transits — Gochar
Scans a date range for planetary sign ingresses and retrograde/direct station events. Requires authenticated API key access (Vedic tier or above in product terms). Returns grouped transit events for supported planets. Also known as Gochar. Returns planetary sign ingresses and retrograde/direct station events for a given date range.
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. |
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","latitude":28.6139,"longitude":77.209,"timezone":"Asia/Kolkata"}'
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",
latitude=28.6139,
longitude=77.209,
timezone="Asia/Kolkata",
)
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",
"latitude": 28.6139,
"longitude": 77.209,
"timezone": "Asia/Kolkata"
},
});
console.log(result.data);
Example response
Response fields
| Field | Type | Description |
|---|---|---|
| success | boolean | True if the request succeeded |
| message | string | Human-readable status message |
| data | object | |
| data.ingresses | array[object] | All sign ingress events in the requested date range. Includes all 9 Vedic planets: Sun, Moon, Mars, Mercury, Jupiter, Venus, Saturn, Rahu, Ketu. |
| 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[].jd | number | Julian Day number of the ingress moment |
| data.ingresses[].date_iso | string | Date of ingress in YYYY-MM-DD format |
| 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.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 | Date of station in YYYY-MM-DD format |
| data.stations[].longitude | number | Sidereal longitude of the planet at the moment of station |
Errors
| Code | Description | Reference |
|---|---|---|
| authentication_failed | Missing or invalid API key. | authentication_failed |
| ephemeris_unavailable | Upstream ephemeris service error. | ephemeris_unavailable |
| insufficient_tier | API key tier does not include this endpoint. | insufficient_tier |
| internal_error | Unexpected server error. | internal_error |
| ip_rate_limit_exceeded | Too many requests in a short window. | ip_rate_limit_exceeded |
| payload_too_large | Request body exceeds the size limit. | payload_too_large |
| resource_not_found | Referenced resource was not found. | resource_not_found |
| validation_error | Request body failed schema validation. | validation_error |