search

Copy page

Copy page as Markdown for LLMs

View as Markdown

View this page as plain text


Open in ChatGPT

Ask ChatGPT about this page

Open in Claude

Ask Claude about this page

Asteroid Positions

The Asteroid Positions API returns the calculated ecliptic positions of key asteroids and dwarf planets for a given birth data set. Each body is returned with its sign, exact longitude, house placement, element, and modality, so you can layer asteroid-focused interpretations on top of a natal chart.


Step by Step Asteroid Positions API Postman Testing Integration

https://support.divineapi.com/western-astrology-apis/testing-western-api-planetary-positions-api-using-postman


Supported Language Codes

Support Article URL:
https://support.divineapi.com/general-api-support/translating-a-natal-apis-into-a-different-language

CodeLanguage
enEnglish
hiHindi
ptPortuguese
frFrench
deGerman
jaJapanese
trTurkish
ruRussian
itItalian
esSpanish
nlDutch
plPolish

Guide: These languages are supported by this API. You can use them by passing lan in the request body. Default is en.


House System Codes

Support Article URL:
https://support.divineapi.com/western-astrology-apis/how-to-change-the-house-system-code-in-natal-astrology

CodeDescription
PPlacidus
KKoch
RRegiomontanus
CCampanus
AEqual
WEqual, whole sign
NWhole sign, Aries = 1st house
XAxial rotation system / Meridian houses
TPolich/Page ("topocentric")
MMorinus
OPorphyry
BAlcabitius
DEqual / MC
EEqual = A
FCarter poli-equatorial
G36 Gauquelin sectors
HHorizon / Azimuth
ISunshine
iSunshine alternative
LPullen
S-delta
QPullen
S-ratio
SSripati
UKrusinski-Pisa-Goelzer
VEqual Vehlow
YAPC houses

Note: The default house system used is P – Placidus.


API Endpoint

POST https://astroapi-8.divineapi.com/western-api/v1/asteroid-positions

Returns Asteroid Positions in response.


Headers

NameTypeDescription
Authorization*StringYour API Access Token, e.g. Bearer {token}

Request Body

NameTypeDescription
api_key*StringYour API key
full_name*StringFull name, e.g. Rahul Kumar
day*IntegerDate of birth, e.g. 24
month*IntegerMonth of birth, e.g. 05
year*IntegerYear of birth, e.g. 2023
hour*IntegerHour, e.g. 14
min*IntegerMinute, e.g. 40
sec*IntegerSecond, e.g. 43
gender*StringGender, e.g. male
place*StringPlace, e.g. New Delhi
lat*FloatLatitude, e.g. 28.7041
lon*FloatLongitude, e.g. 77.1025
tzone*FloatTimezone, e.g. 5.5 (see Timezone List)
lanStringLanguage, e.g. en or hi, default en
house_systemStringHouse system code, default P

200 OK: Asteroid Positions Fetched Successfully

{
    "status": "success",
    "code": 200,
    "message": "Request successful",
    "data": [
        {
            "name": "Chiron",
            "full_degree": "24.7068642",
            "sign": "Aries",
            "sign_no": 1,
            "longitude": "24:42:25",
            "house": 4,
            "element": "Fire",
            "modality": "Cardinal"
        },
        {
            "name": "Eris",
            "full_degree": "25.1428105",
            "sign": "Aries",
            "sign_no": 1,
            "longitude": "25:8:34",
            "house": 4,
            "element": "Fire",
            "modality": "Cardinal"
        },
        {
            "name": "Makemake",
            "full_degree": "191.646521",
            "sign": "Libra",
            "sign_no": 7,
            "longitude": "11:38:47",
            "house": 10,
            "element": "Air",
            "modality": "Cardinal"
        },
        {
            "name": "Haumea",
            "full_degree": "212.5687504",
            "sign": "Scorpio",
            "sign_no": 8,
            "longitude": "2:34:8",
            "house": 11,
            "element": "Water",
            "modality": "Fixed"
        },
        {
            "name": "Ceres",
            "full_degree": "5.6364811",
            "sign": "Aries",
            "sign_no": 1,
            "longitude": "5:38:11",
            "house": 4,
            "element": "Fire",
            "modality": "Cardinal"
        },
        {
            "name": "Pallas",
            "full_degree": "307.4276575",
            "sign": "Aquarius",
            "sign_no": 11,
            "longitude": "7:25:40",
            "house": 2,
            "element": "Air",
            "modality": "Fixed"
        },
        {
            "name": "Juno",
            "full_degree": "245.9896235",
            "sign": "Sagittarius",
            "sign_no": 9,
            "longitude": "5:59:23",
            "house": 12,
            "element": "Fire",
            "modality": "Mutable"
        },
        {
            "name": "Vesta",
            "full_degree": "257.313027",
            "sign": "Sagittarius",
            "sign_no": 9,
            "longitude": "17:18:47",
            "house": 1,
            "element": "Fire",
            "modality": "Mutable"
        },
        {
            "name": "Pholus",
            "full_degree": "278.7292707",
            "sign": "Capricorn",
            "sign_no": 10,
            "longitude": "8:43:45",
            "house": 1,
            "element": "Earth",
            "modality": "Cardinal"
        },
        {
            "name": "Gonggong",
            "full_degree": "335.2316915",
            "sign": "Pisces",
            "sign_no": 12,
            "longitude": "5:13:54",
            "house": 3,
            "element": "Water",
            "modality": "Mutable"
        },
        {
            "name": "Hygiea",
            "full_degree": "97.3031455",
            "sign": "Cancer",
            "sign_no": 4,
            "longitude": "7:18:11",
            "house": 7,
            "element": "Water",
            "modality": "Cardinal"
        },
        {
            "name": "Quaoar",
            "full_degree": "279.4676881",
            "sign": "Capricorn",
            "sign_no": 10,
            "longitude": "9:28:4",
            "house": 1,
            "element": "Earth",
            "modality": "Cardinal"
        },
        {
            "name": "Sedna",
            "full_degree": "61.6265234",
            "sign": "Gemini",
            "sign_no": 3,
            "longitude": "1:37:35",
            "house": 6,
            "element": "Air",
            "modality": "Mutable"
        },
        {
            "name": "Orcus",
            "full_degree": "167.7726098",
            "sign": "Virgo",
            "sign_no": 6,
            "longitude": "17:46:21",
            "house": 9,
            "element": "Earth",
            "modality": "Mutable"
        }
    ]
}

Example Code Implementations

Below are example implementations in various programming environments.


cURL

curl --location 'https://astroapi-8.divineapi.com/western-api/v1/asteroid-positions' \
--header 'Authorization: Bearer {Your Auth Token}' \
--form 'api_key="{Your API Key}"' \
--form 'full_name="Rahul Kumar"' \
--form 'day="24"' \
--form 'month="05"' \
--form 'year="2023"' \
--form 'hour="14"' \
--form 'min="40"' \
--form 'sec="43"' \
--form 'gender="male"' \
--form 'place="New Delhi, India"' \
--form 'lat="28.7041"' \
--form 'lon="77.1025"' \
--form 'tzone="5.5"'
--form 'lan="en"' \
--form 'house_system="P"'

NodeJS

var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://astroapi-8.divineapi.com/western-api/v1/asteroid-positions',
  'headers': {
    'Authorization': 'Bearer {Your Auth Token}'
  },
  formData: {
    'api_key': '{Your API Key}',
    'full_name': 'Rahul Kumar',
    'day': '24',
    'month': '05',
    'year': '2023',
    'hour': '14',
    'min': '40',
    'sec': '43',
    'gender': 'male',
    'place': 'New Delhi, India',
    'lat': '28.7041',
    'lon': '77.1025',
    'tzone': '5.5'
    'lan': 'en',
    'house_system': 'P'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

JavaScript jQuery AJAX

var form = new FormData();
form.append("api_key", "{Your API Key}");
form.append("full_name", "Rahul Kumar");
form.append("day", "24");
form.append("month", "05");
form.append("year", "2023");
form.append("hour", "14");
form.append("min", "40");
form.append("sec", "43");
form.append("gender", "male");
form.append("place", "New Delhi, India");
form.append("lat", "28.7041");
form.append("lon", "77.1025");
form.append("tzone", "5.5");
form.append("lan", "en");
form.append("house_system", "P");

var settings = {
  "url": "https://astroapi-8.divineapi.com/western-api/v1/asteroid-positions",
  "method": "POST",
  "timeout": 0,
  "headers": {
    "Authorization": "Bearer {Your Auth Token}"
  },
  "processData": false,
  "mimeType": "multipart/form-data",
  "contentType": false,
  "data": form
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Python

import requests

url = "https://astroapi-8.divineapi.com/western-api/v1/asteroid-positions"

payload = {'api_key': '{Your API Key}',
'full_name': 'Rahul Kumar',
'day': '24',
'month': '05',
'year': '2023',
'hour': '14',
'min': '40',
'sec': '43',
'gender': 'male',
'place': 'New Delhi, India',
'lat': '28.7041',
'lon': '77.1025',
'tzone': '5.5'
'lan': 'en',
'house_system': 'P'}

headers = {
  'Authorization': 'Bearer {Your Auth Token}'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)