Dig Bala part in Shad Bala
Calculate Dig Bala (directional strength), one of the six components of Shadbala in Vedic astrology. Evaluate how planetary positions contribute to directional strength and integrate this component into detailed planetary strength analysis and horoscope applications.
Overview
The Dig Bala API focuses on directional strength, one of the six components of the traditional Vedic astrology Shadbala system. Dig Bala evaluates a planet's strength based on its position in the chart relative to the directions associated with planetary strength.
In traditional Vedic astrology, Dig Bala is assessed for the seven classical planets: Sun, Moon, Mars, Mercury, Jupiter, Venus, and Saturn. This strength component helps developers present directional strength alongside other Shadbala measures in planetary strength tables, horoscope analysis tools, and detailed astrology reports.
Use the birth details and configuration parameters specified in the endpoint documentation to request Dig Bala calculations. The API returns structured JSON data for integration into websites, mobile applications, and Vedic astrology software.
Request Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
year
|
integer | Yes | Year number, eg: 2023 | 2023 |
month
|
integer | Yes | Month number,with no leading zero | 7 |
date
|
integer | Yes | Day number,with no leading zero | 5 |
hours
|
integer | Yes | Hours number,with no leading zero | 1 |
minutes
|
integer | Yes | Minutes number,with no leading zero | 1 |
seconds
|
integer | Yes | Seconds number, with no leading zero | 0 |
latitude
|
float | Yes | Latitude number, in the range from -90 to 90 | 12.86 |
longitude
|
float | Yes | Longitude number, in the range from -180 to 180 | 123.5 |
timezone
|
float | Yes | Timezone of birth location, eg: 5.5 | 5.5 |
config
|
object | No | Contains optional configuration values | |
ayanamsha
|
string | No | Either "tropical" or "sayana" or "lahiri" | Either "tropical" or "sayana" or "lahiri" |
observation_point
|
string | No | Geocentric positions are calculated with respect to the center of Earth. Topocentric positions are calculated with respect to the actual given place | Either "topocentric" or "geocentric" |
Request Example
{
"year": 1993,
"month": 1,
"date": 22,
"hours": 13,
"minutes": 20,
"seconds": 0,
"latitude": 30.37,
"longitude": 75.86,
"timezone": 5.5,
"config": {
"observation_point": "geocentric",
"ayanamsha": "sayana"
}
}
Response Examples
Example responses returned by this API.
{
"statusCode": 200,
"output": {
"Sun": {
"dig_bala": 50.904,
"rupas": 0.85
},
"Moon": {
"dig_bala": 10.744,
"rupas": 0.18
},
"Mars": {
"dig_bala": 15.73,
"rupas": 0.26
},
"Mercury": {
"dig_bala": 20.611,
"rupas": 0.34
},
"Jupiter": {
"dig_bala": 14.991,
"rupas": 0.25
},
"Venus": {
"dig_bala": 6.583,
"rupas": 0.11
},
"Saturn": {
"dig_bala": 33.613,
"rupas": 0.56
}
}
}
Code Examples
Use the following examples to integrate this API into your application.
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://json.freeastrologyapi.com/shadbala/dig-bala',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"year": 1993,
"month": 1,
"date": 22,
"hours": 13,
"minutes": 20,
"seconds": 0,
"latitude": 30.37,
"longitude": 75.86,
"timezone": 5.5,
"config": {
"observation_point": "geocentric",
"ayanamsha": "sayana"
}
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'x-api-key: YOUR_API_KEY_HERE'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
import json
url = "https://json.freeastrologyapi.com/shadbala/dig-bala"
payload = json.dumps({
"year": 1993,
"month": 1,
"date": 22,
"hours": 13,
"minutes": 20,
"seconds": 0,
"latitude": 30.37,
"longitude": 75.86,
"timezone": 5.5,
"config": {
"observation_point": "geocentric",
"ayanamsha": "sayana"
}
})
headers = {
'Content-Type': 'application/json',
'x-api-key': 'YOUR_API_KEY_HERE'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://json.freeastrologyapi.com/shadbala/dig-bala',
'headers': {
'Content-Type': 'application/json',
'x-api-key': 'YOUR_API_KEY_HERE'
},
body: JSON.stringify({
"year": 1993,
"month": 1,
"date": 22,
"hours": 13,
"minutes": 20,
"seconds": 0,
"latitude": 30.37,
"longitude": 75.86,
"timezone": 5.5,
"config": {
"observation_point": "geocentric",
"ayanamsha": "sayana"
}
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});