The rule: keep the instant, change the place
date + time + tz_offset_minutes together fix a UTC instant. Keep all three exactly as recorded at the birthplace and change only lat and lng. If you replace the offset with the new city's offset, you have moved the birth in time and computed a different person's chart - the planets will shift and the check below will fail.
What changes with the place: the Ascendant, the house cusps and which house each planet occupies. What does not: every planet's sign, degree and nakshatra, the vargas and the dasha sequence.
Node: three cities, one instant
// relocate.mjs - Node 18+, server-side. /v1/charts/birth is on the Free plan.
const API = "https://api.astronode.dev";
// Born 24 Apr 1973, 17:25 in Mumbai (UTC+05:30).
const birth = { date: "1973-04-24", time: "17:25:00", tz_offset_minutes: 330 };
const places = [
{ label: "Mumbai (birthplace)", lat: 19.076, lng: 72.8777 },
{ label: "Toronto", lat: 43.6532, lng: -79.3832 },
{ label: "London", lat: 51.5074, lng: -0.1278 },
];
const chartAt = async (place) => {
const res = await fetch(`${API}/v1/charts/birth`, {
method: "POST",
headers: { authorization: `Bearer ${process.env.ASTRONODE_API_KEY}`, "content-type": "application/json" },
// Same date, time AND tz_offset_minutes: that pins the same UTC instant.
// Only lat/lng change. Never swap in the new city's offset.
body: JSON.stringify({ ...birth, lat: place.lat, lng: place.lng }),
});
return (await res.json()).data;
};
const charts = await Promise.all(places.map(chartAt));
charts.forEach((c, i) => {
const house = Object.fromEntries(c.planets.map((p) => [p.name, p.house]));
console.log(
places[i].label.padEnd(20),
`Asc ${c.ascendant.sign}`.padEnd(16),
`Sun H${house.Sun} Moon H${house.Moon} Saturn H${house.Saturn}`,
);
});
// Planet signs never change with the place - assert it, it catches offset bugs.
const signs = (c) => c.planets.map((p) => `${p.name}:${p.sign}:${p.degree_in_sign.toFixed(4)}`).join();
console.log("planets identical everywhere:", charts.every((c) => signs(c) === signs(charts[0])));$ node relocate.mjs Mumbai (birthplace) Asc Virgo Sun H8 Moon H4 Saturn H9 Toronto Asc Taurus Sun H12 Moon H8 Saturn H1 London Asc Cancer Sun H10 Moon H6 Saturn H11 planets identical everywhere: true
POST /v1/charts/birth is on the Free plan and uses whole-sign houses, so a relocated house number is simply the planet's sign counted from the new rising sign. Saturn moves from the 9th in Mumbai to the 1st in Toronto while staying in Taurus.
Python: Western angles, including the polar case
For a Western relocation screen the interesting numbers are the relocated ASC and MC from POST /v1/western/natal/houses (Hobby). Relocation is also how users end up asking for charts above the polar circle, where Placidus cusps do not exist. The API answers that with a 400 that names the alternatives; fall back instead of failing:
# relocated_angles.py - Python 3.9+, standard library only. Hobby plan (Western).
import json, os, urllib.error, urllib.request
API = "https://api.astronode.dev"
KEY = os.environ["ASTRONODE_API_KEY"]
birth = {"date": "1973-04-24", "time": "17:25:00", "tz_offset_minutes": 330}
def houses(lat, lng, system="placidus"):
body = dict(birth, lat=lat, lng=lng, house_system=system)
req = urllib.request.Request(
API + "/v1/western/natal/houses",
data=json.dumps(body).encode(),
headers={"Authorization": "Bearer " + KEY, "Content-Type": "application/json"},
)
try:
return system, json.load(urllib.request.urlopen(req))["data"]
except urllib.error.HTTPError as e:
err = json.load(e)["error"]
if e.code == 400 and system == "placidus":
print(" placidus refused:", err["message"])
return houses(lat, lng, "whole-sign") # defined at every latitude
raise
for label, lat, lng in [("Toronto", 43.6532, -79.3832), ("Tromso", 69.6492, 18.9553)]:
system, d = houses(lat, lng)
print(label, system, "| ASC", d["ascendant"]["sign"], round(d["ascendant"]["degree"], 2),
"| MC", d["midheaven"]["sign"], round(d["midheaven"]["degree"], 2))$ python3 relocated_angles.py Toronto placidus | ASC Gemini 5.38 | MC Aquarius 9.3 placidus refused: Placidus house cusps are undefined at latitude 69.65ยฐ for this moment (inside the polar circle, some degrees of the ecliptic never rise). Use a house_system that is defined everywhere: porphyry, equal or whole-sign. Tromso whole-sign | ASC Virgo 10.13 | MC Taurus 22.48
Checks worth keeping in production
- Assert that planet signs and degrees are identical across places, as the Node code does. It catches the offset mistake every time.
- Label the screen with both places: "born in Mumbai, chart cast for Toronto". Storing only the relocated coordinates loses the birthplace you need for every other chart.
- The Placidus
400is a validation error and is not billed; the retry withwhole-signis one billable call. - Relocation cannot turn one planet into another sign; copy that promises a "better placement" from moving should talk about houses and angles only.
Questions
- What do I end up with?
- The same birth recast for several cities: relocated ascendant and house placements, planets unchanged. The code is in Node.js and Python.
- Which endpoints does this recipe call, and in what order?
- 2 endpoints, in this order: Birth Chart (Kundli) (
POST /v1/charts/birth), then Western Natal Houses (POST /v1/western/natal/houses).