Ascendant API with Fiber

Integrate Ascendant API in Fiber. Complete code examples and SDK documentation.

Operation

POST /v2/astrology/ascendant

Lagna (ascendant) sign and degree calculation

Parameters

NameInTypeDescription
datetimebodystring—
latitudebodynumber—
longitudebodynumber—
timezonebodystring—

Request example for Fiber

Authenticate with Authorization: Bearer YOUR_API_KEY. Keep the key in the VEDIKA_API_KEY environment variable on your server and never in source control.

package main

import (
	"io"
	"net/http"
	"os"
	"strings"
)

const payload = `{
  "datetime": "1990-05-15T10:30:00",
  "latitude": 19.07,
  "longitude": 72.87,
  "timezone": "+05:30"
}`

func callVedika() ([]byte, int, error) {
	req, err := http.NewRequest("POST", "https://api.vedika.io/v2/astrology/ascendant", strings.NewReader(payload))
	if err != nil {
		return nil, 0, err
	}
	req.Header.Set("Authorization", "Bearer "+os.Getenv("VEDIKA_API_KEY"))
	req.Header.Set("Content-Type", "application/json")
	res, err := http.DefaultClient.Do(req)
	if err != nil {
		return nil, 0, err
	}
	defer res.Body.Close()
	data, err := io.ReadAll(res.Body)
	return data, res.StatusCode, err
}

// app := fiber.New()
func vedika(c *fiber.Ctx) error {
	data, status, err := callVedika()
	if err != nil {
		return c.SendStatus(http.StatusBadGateway)
	}
	c.Set("Content-Type", "application/json")
	return c.Status(status).Send(data)
}
// app.Get("/vedika/ascendant", vedika)

Try it in the keyless sandbox

The sandbox mirrors the production route and needs no API key:

curl -X POST https://api.vedika.io/sandbox/astrology/ascendant \
  -H "Content-Type: application/json" \
  -d '{"datetime":"1990-05-15T10:30:00","latitude":19.07,"longitude":72.87,"timezone":"+05:30"}'

Sandbox response from POST /sandbox/astrology/ascendant, abridged (billing block, long text fields and long lists trimmed). The sandbox answers with a fixed demo result and ignores your inputs; a production call computes the result for the details you send.

{
  "data": {
    "degree": 13.55,
    "fullDegree": 343.55,
    "interpretation": {
      "career": [
        "Arts",
        "Healing",
        "Spirituality"
      ],
      "challenges": [
        "Escapism",
        "Over-sensitivity",
        "Victim mentality"
      ],
      "compatibility": [
        "Cancer",
        "Scorpio",
        "Taurus"
      ],
      "element": "Water",
      "quality": "Dual (Mutable)",
      "strengths": [
        "Intuition",
        "Compassion",
        "Creativity"
      ],
      "symbol": "The Fish",
      "traits": [
        "Intuitive",
        "Compassionate",
        "Artistic"
      ]
    },
    "nakshatra": {
      "deity": "Ahirbudhnya",
      "id": 26,
      "lord": "Saturn",
      "name": "Uttara Bhadrapada",
      "pada": 4
    },
    "sign": "Pisces",
    "signLord": "Jupiter",
    "signNumber": 12
  },
  "meta": {
    "contentMode": "fixture",
    "engine": "vedika-intelligence",
    "fixtureId": "demo-birth-1995-new-delhi",
    "inputUsage": "ignored",
    "mode": "sandbox",
    "sample": true,
    "version": "2.1.0"
  },
  "success": true
}

Related

The same endpoint in other stacks:

Last updated: 22 November 2026

Start 14-day trial