Перейти до вмісту
AstroWay/api v2.200.11 · docs
усі системи в нормі

Gemstone (ratna) recommendation

POST
/vedic/gemstones
request.sh
curl -X POST https://api.astroway.info/v1/vedic/gemstones \
-H "X-Api-Key: aw_live_..." \
-H "Content-Type: application/json" \
-d '{ "date": "1990-05-15", "time": "15:30:00", "timezone": "Europe/Kyiv", "latitude": 50.45, "longitude": 30.52, "school": "lagna-lord" }'

Which of the nine gems to wear, from the sidereal lagna. Two schools are implemented: lagna-lord (default) prescribes the gems of the 1st, 9th and 5th lords as the life, lucky and benefic stones; functional-benefic classifies every graha by the houses it owns from the lagna, prescribes only for functional benefics led by the yogakaraka, and names the functional malefics as gems to avoid. Both reach the same three gems, because a functional benefic is a graha owning a trikona and the trikona lords are the 1st, 5th and 9th: the school changes the ordering, the role each gem carries, and the avoid list. The response always reports which one produced it. Coordinates are required, since the whole answer is derived from the lagna. Each gem carries its substitutes, day, finger, metal, weight range in ratti/grams/carats, and beeja mantra. Planet dignity is returned as context and does not change the list.

fields
string

Comma-separated dotted paths, relative to data, to keep in the response. A path is applied to every element of an array, so planets.name means the name of each planet. Paths that match nothing come back in _fields_unmatched; a list where nothing matches at all is a 400, because an empty object would be a confident wrong answer.

Example
planets.name,planets.longitude
precision
integer
<= 15

Round every non-integer number in the response to this many decimal places. Integers are left alone, because an id is not a measurement. Ecliptic longitudes ship with fourteen decimals by default; 2 is about a tenth of an arcminute.

Example
4
Media type application/json

Birth data for a gemstone recommendation. Required: date (YYYY-MM-DD), time (HH:mm:ss), latitude and longitude. Coordinates do NOT default to 0 here as they do on other chart endpoints: the whole answer is derived from the lagna, so an omitted pair is a 400 rather than a confident set of gems for 0N 0E.

object
date required
string
/^\d{4}-\d{2}-\d{2}$/
time required
string
/^\d{2}:\d{2}:\d{2}$/
timezoneOffset

Hours from UTC at the given moment, not minutes. Fractional zones are hours too: 5.5 for India, 5.75 for Nepal, -3.5 for Newfoundland. Defaults to 0, meaning UTC. Ignored when timezone is sent.

number
0 nullable >= -14 <= 14
timezone

IANA zone name such as Europe/Kyiv, or auto to look the zone up from latitude and longitude. The server takes the offset that zone kept at this local date and time, summer time included, and uses it in place of timezoneOffset. A clock time that happened twice takes the first occurrence; one skipped when clocks went forward takes the offset from before the change. Abbreviations such as EST are refused. Before 1970 the tz database is not reliable for every place, so send timezoneOffset when the local clock is known.

string
latitude required
number
>= -90 <= 90
longitude required
number
>= -180 <= 180
houseSystem
string
default: P
Allowed values: P K R C E W B M O A T V D F G H I i L N Q S U X Y
name
string
""
city
string
""
zodiacType
string
Allowed values: tropical sidereal
ayanamsaId
number
nullable
ayanamsa

Sidereal school by name. Lahiri when omitted. Equivalent to ayanamsaId; send either.

string
Allowed values: fagan-bradley lahiri de-luce raman krishnamurti kp yukteshwar jn-bhasin true-citra djwhal-khul
cosmogram
boolean
latitude

Birth latitude. Required: the lagna is what both schools prescribe from.

number
>= -90 <= 90
longitude

Birth longitude. Required: the lagna is what both schools prescribe from.

number
>= -180 <= 180
school

Prescription school. Both reach the same three gems (the trikona lords), and differ on what they withhold and on the ordering. The response always names the one used. Default: lagna-lord.

string
Allowed values: lagna-lord functional-benefic
Example
{
"date": "1990-05-15",
"time": "15:30:00",
"timezone": "Europe/Kyiv",
"latitude": 50.45,
"longitude": 30.52,
"school": "lagna-lord"
}

Successful calculation

Media type application/json
object
ok
boolean
data
object
type
string
nullable
school
string
nullable
schoolNote
string
nullable
ayanamsa
number
nullable
lagna
object
sign
number
nullable
signName
string
nullable
longitude
number
nullable
lord
number
nullable
lordName
string
nullable
recommended
Array<object>
nullable
object
role
string
nullable
graha
number
nullable
housesOwned
Array<number>
nullable
basis
string
nullable
grahaName
string
nullable
grahaSanskrit
string
nullable
gem
string
nullable
gemSanskrit
string
nullable
mineral
string
nullable
substitutes
Array<string>
nullable
wearing
object
day
string
nullable
finger
string
nullable
fingerVariants
Array<string>
nullable
metals
Array<string>
nullable
minWeight
object
ratti
Array<number>
nullable
grams
Array<number>
nullable
carats
Array<number>
nullable
mantra
string
nullable
japaCount
number
nullable
avoid
Array<object>
nullable
object
role
string
nullable
graha
number
nullable
housesOwned
Array<number>
nullable
basis
string
nullable
grahaName
string
nullable
grahaSanskrit
string
nullable
gem
string
nullable
gemSanskrit
string
nullable
mineral
string
nullable
substitutes
Array<string>
nullable
wearing
object
day
string
nullable
finger
string
nullable
fingerVariants
Array<string>
nullable
metals
Array<string>
nullable
minWeight
object
ratti
Array<number>
nullable
grams
Array<number>
nullable
carats
Array<number>
nullable
mantra
string
nullable
japaCount
number
nullable
cautions
Array<object>
nullable
object
role
string
nullable
graha
number
nullable
housesOwned
Array<number>
nullable
basis
string
nullable
grahaName
string
nullable
grahaSanskrit
string
nullable
gem
string
nullable
gemSanskrit
string
nullable
mineral
string
nullable
substitutes
Array<string>
nullable
wearing
object
day
string
nullable
finger
string
nullable
fingerVariants
Array<string>
nullable
metals
Array<string>
nullable
minWeight
object
ratti
Array<number>
nullable
grams
Array<number>
nullable
carats
Array<number>
nullable
mantra
string
nullable
japaCount
number
nullable
nodesNote
string
nullable
condition
object
Sun
object
sign
number
nullable
signName
string
nullable
degreeInSign
number
nullable
house
number
nullable
dignity
string
nullable
isRetrograde
boolean
nullable
isCombust
boolean
nullable
Moon
object
sign
number
nullable
signName
string
nullable
degreeInSign
number
nullable
house
number
nullable
dignity
string
nullable
isRetrograde
boolean
nullable
isCombust
boolean
nullable
Mercury
object
sign
number
nullable
signName
string
nullable
degreeInSign
number
nullable
house
number
nullable
dignity
string
nullable
isRetrograde
boolean
nullable
isCombust
boolean
nullable
Venus
object
sign
number
nullable
signName
string
nullable
degreeInSign
number
nullable
house
number
nullable
dignity
string
nullable
isRetrograde
boolean
nullable
isCombust
boolean
nullable
Mars
object
sign
number
nullable
signName
string
nullable
degreeInSign
number
nullable
house
number
nullable
dignity
string
nullable
isRetrograde
boolean
nullable
isCombust
boolean
nullable
Jupiter
object
sign
number
nullable
signName
string
nullable
degreeInSign
number
nullable
house
number
nullable
dignity
string
nullable
isRetrograde
boolean
nullable
isCombust
boolean
nullable
Saturn
object
sign
number
nullable
signName
string
nullable
degreeInSign
number
nullable
house
number
nullable
dignity
string
nullable
isRetrograde
boolean
nullable
isCombust
boolean
nullable
conditionNote
string
nullable
disclaimer
string
nullable
Example
{
"ok": true,
"data": {
"type": "gemstone-recommendation",
"school": "lagna-lord",
"schoolNote": "Prescribes the gems of the 1st, 9th and 5th lords as the life, lucky and benefic stones. Strengthening the lagna lord is safe for the native by definition, which is the argument for the school. It withholds a gem only when its graha owns nothing but dusthanas, so the avoid list is usually empty. Same three gems as functional-benefic, ordered by role rather than by strength of the yoga.",
"ayanamsa": 23.7225,
"lagna": {
"sign": 4,
"signName": "Leo",
"longitude": 146.2454,
"lord": 0,
"lordName": "Sun"
},
"recommended": [
{
"role": "life stone (jeevan ratna)",
"graha": 0,
"housesOwned": [
1
],
"basis": "lord of the 1st house (Leo)",
"grahaName": "Sun",
"grahaSanskrit": "Surya",
"gem": "Ruby",
"gemSanskrit": "Manikya",
"mineral": "Corundum (red)",
"substitutes": [
"Red spinel"
],
"wearing": {
"day": "Sunday",
"finger": "Ring finger",
"fingerVariants": [
"Ring finger"
],
"metals": [
"Gold"
],
"minWeight": {
"ratti": [
3
],
"grams": [
0.364
],
"carats": [
1.82
]
},
"mantra": "Om Hraam Hreem Hraum Sah Suryaya Namah",
"japaCount": 6000
}
}
],
"avoid": [
{
"role": "withheld",
"graha": 1,
"housesOwned": [
12
],
"basis": "owns only 12th (dusthana)",
"grahaName": "Moon",
"grahaSanskrit": "Chandra",
"gem": "Pearl",
"gemSanskrit": "Moti",
"mineral": "Natural nacre (Pinctada)",
"substitutes": [
"Moonstone"
],
"wearing": {
"day": "Monday",
"finger": "Little finger",
"fingerVariants": [
"Little finger"
],
"metals": [
"Silver"
],
"minWeight": {
"ratti": [
4
],
"grams": [
0.486
],
"carats": [
2.43
]
},
"mantra": "Om Shraam Shreem Shraum Sah Chandraya Namah",
"japaCount": 11000
}
}
],
"cautions": [
{
"role": "maraka caution",
"graha": 2,
"housesOwned": [
2
],
"basis": "owns the 2nd (maraka)",
"grahaName": "Mercury",
"grahaSanskrit": "Budha",
"gem": "Emerald",
"gemSanskrit": "Panna",
"mineral": "Beryl (green)",
"substitutes": [
"Peridot"
],
"wearing": {
"day": "Wednesday",
"finger": "Little finger",
"fingerVariants": [
"Little finger"
],
"metals": [
"Gold"
],
"minWeight": {
"ratti": [
3
],
"grams": [
0.364
],
"carats": [
1.82
]
},
"mantra": "Om Braam Breem Braum Sah Budhaya Namah",
"japaCount": 9000
}
}
],
"nodesNote": "Rahu and Ketu own no sign, so neither school reaches hessonite or cat's eye from the lagna. They are prescribed on a specific reason (a running dasha, a conjunction, an affliction), which is a separate judgement from the one this endpoint makes.",
"condition": {
"Sun": {
"sign": 1,
"signName": "Taurus",
"degreeInSign": 0.6502119223189666,
"house": 10,
"dignity": "neutral",
"isRetrograde": false,
"isCombust": false
},
"Moon": {
"sign": 9,
"signName": "Capricorn",
"degreeInSign": 3.1788798971629717,
"house": 6,
"dignity": "neutral",
"isRetrograde": false,
"isCombust": false
},
"Mercury": {
"sign": 0,
"signName": "Aries",
"degreeInSign": 14.28917860756014,
"house": 9,
"dignity": "neutral",
"isRetrograde": true,
"isCombust": false
},
"Venus": {
"sign": 11,
"signName": "Pisces",
"degreeInSign": 19.06874274676204,
"house": 8,
"dignity": "exalted",
"isRetrograde": false,
"isCombust": false
},
"Mars": {
"sign": 10,
"signName": "Aquarius",
"degreeInSign": 24.592569875940683,
"house": 7,
"dignity": "neutral",
"isRetrograde": false,
"isCombust": false
},
"Jupiter": {
"sign": 2,
"signName": "Gemini",
"degreeInSign": 15.811997278981366,
"house": 11,
"dignity": "neutral",
"isRetrograde": false,
"isCombust": false
},
"Saturn": {
"sign": 9,
"signName": "Capricorn",
"degreeInSign": 1.523954056640207,
"house": 6,
"dignity": "own sign",
"isRetrograde": true,
"isCombust": false
}
},
"conditionNote": "Context only. Both schools prescribe by house ownership, not by strength, so dignity and combustion do not change the list above.",
"disclaimer": "Traditional Jyotish remedy, informational only. Gem identity, treatment and weight must be confirmed by a qualified gemmologist or jeweller before purchase, and no gemstone is a substitute for medical care: consult a licensed physician for any health concern."
}
}

Validation error

Media type application/json
Example
{
"ok": false,
"error": {
"code": "INVALID_INPUT",
"message": "Validation failed: date: Date must be YYYY-MM-DD",
"details": [
{
"path": "date",
"message": "Date must be YYYY-MM-DD"
}
]
}
}

Missing or invalid API key

Media type application/json
Example
{
"ok": false,
"error": {
"code": "INVALID_API_KEY",
"message": "Invalid API key"
}
}
Корисно?