// sdk · C# / .NET
C# SDK for the AstroWay API
Package Astroway.Sdk: every API endpoint as an async method, such as aw.Chart.ComputeAsync, cancellable with a CancellationToken. Retries on 408/409/429/5xx honour Retry-After, every kind of failure has its own exception, and the response deserializes into your own records. .NET Standard 2.0 and .NET 8: .NET Framework 4.7.2+, .NET 6/8/9, Unity.
// 01 / install
Install
dotnet add package Astroway.Sdk PackageReference
<PackageReference Include="Astroway.Sdk" Version="0.1.0" /> Package Manager
Install-Package Astroway.Sdk import: using Astroway;
View on registry → Astroway.Sdk
// 02 / highlights
Highlights
- 725 async methods
- CancellationToken on every call
- QuotaExceededException, RateLimitException
- .NET Standard 2.0 and .NET 8
- System.Text.Json only
// 03 / first request
Make your first request
using Astroway;
using var aw = new AstrowayClient(Environment.GetEnvironmentVariable("ASTROWAY_API_KEY")!);
var res = await aw.Chart.ComputeAsync(new
{
date = "1990-07-14", time = "14:30:00", timezoneOffset = 3,
latitude = 50.4501, longitude = 30.5234, houseSystem = "P",
});
var chart = res.Deserialize<Chart>()!;
Console.WriteLine(chart.Houses.Ascendant); // 212.0952574979425
record Houses(double Ascendant);
record Chart(Houses Houses); Start building with C# / .NET
10,000 credits free per month. Open-source SDK, generated from OpenAPI 3.1, always in sync with the backend.