AstroWay/api v2.19.0 · sdks
all systems operational
UA EN
// sdk · PHP

PHP SDK for the AstroWay API

Official `astroway/sdk` on Packagist — built on Guzzle 7 + PSR-18. PHP 8.1+ (readonly properties, constructor promotion). Stainless-style error hierarchy, built-in retry middleware on 408/409/429/5xx, two auth schemes (X-Api-Key default or Bearer).

// 01 / install

Install

composer require astroway/sdk

import: use Astroway\Astroway;

// 02 / highlights

Highlights

// 03 / first request

Make your first request

<?php
use Astroway\Astroway;

$aw = new Astroway(['apiKey' => getenv('ASTROWAY_API_KEY')]);

$chart = $aw->post('/chart', body: [
    'date'           => '1990-07-14',
    'time'           => '14:30:00',
    'timezoneOffset' => 3,
    'latitude'       => 50.4501,
    'longitude'      => 30.5234,
    'houseSystem'    => 'P',
]);

echo $chart['angles']['asc']['sign'];

Start building with PHP

10,000 credits free per month. Open-source SDK, generated from OpenAPI 3.1, always in sync with the backend.

100% uptime · Calculation API · 30d status →