Skip to main content

Typed Aster

A fully typed, validated async client for the Aster API.

PyPI version Python versions Docs License



from typed_aster import Aster

async with Aster.new(public=True) as client:
  book = await client.futures.market.depth('BTCUSDT', limit=5)
  print(book['bids'][0])

One Aster client covers five surfaces:

  • client.futures: perpetual futures
  • client.spot: spot trading
  • client.prediction: prediction markets
  • client.chain: Aster Chain (staking, transfers, withdrawals, and on-chain reads by address)
  • client.bapi: the web app's public API (every asset that can be deposited or withdrawn)

Public market data needs no credentials. Everything signed uses Aster's Pro API wallets. See Authenticated Setup.

Why Typed Aster?

  • 🎯 Precise Types: Typed order unions and datetime timestamps across futures, spot, prediction and Aster Chain, not dict/Any. Prices and quantities Aster sends as strings are Decimal; the few amounts it sends as JSON numbers (Aster Chain balances such as walletBalance, withdrawal fee estimates, fee caps) are float.
  • ✅ Runtime Validation: Every REST, JSON-RPC and WebSocket response is validated by default, not just typed on paper.
  • ⚡ Async First: Async HTTP plus WebSocket market and user-data streams, built for concurrent workflows.
  • 📚 Full Surface: Every documented Pro API endpoint, including strategy orders, sub-accounts, builders, prediction outcomes and staking.

Installation

pip install typed-aster

How To

Reference

Design Philosophy

Typed Aster follows the principles outlined in this blog post.

Details matter. Developer experience matters.

License

MIT — see LICENSE.

Metadata

Release files for typed-aster 0.7.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for typed-aster 0.7.1
File Size Uploaded Provenance Actions
typed_aster-0.7.1.tar.gz 145.8 kB With provenance Details for typed_aster-0.7.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for typed-aster 0.7.1
File Interpreter ABI Platform Actions
typed_aster-0.7.1-py3-none-any.whl Python 3 none any Details for typed_aster-0.7.1-py3-none-any.whl

Total release size: 515.6 kB

Release files / typed_aster-0.7.1.tar.gz

Download URL typed_aster-0.7.1.tar.gz
Size 145.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ca0da62c52480df87b8e93de5ed3b4eeca042f9733d15a8abc927e374882b82d
BLAKE2b-256 checksum
How to use checksums
cb799c7d9c03b43476ba4eee8730d3023093c0984a7f8a15699beacac2d21425
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Release files / typed_aster-0.7.1-py3-none-any.whl

Download URL typed_aster-0.7.1-py3-none-any.whl
Size 369.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e1afd98ea4cfbefd1b09780a29c81939e76ff7534dcdb255610d6c8f1fb90eb1
BLAKE2b-256 checksum
How to use checksums
d86c2b7ab6a6cef93fbf68d7721c6b7bb9f16a89c92814ff70e7bbb5017b6495
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Security for typed-aster 0.7.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for typed_aster-0.7.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page