// 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;
View on registry → astroway/sdk
// 02 / highlights
Highlights
- PHP 8.1+
- Guzzle 7 + PSR-18
- Built-in retry middleware
- Stainless-style errors
- Auto-mirror on Packagist
// 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.