Skip to main content

Async Hyperliquid

CI Documentation Status PyPI

async-hyperliquid is a typed, asynchronous Python client for the Hyperliquid REST API. It provides credential-free market and account queries through InfoClient, plus authenticated order workflows through AsyncHyperliquid. The client uses aiohttp, keeps protocol-shaped responses as TypedDict, and supports explicit mainnet and testnet routing.

Installation

pip install async-hyperliquid

Read market data

import asyncio

from async_hyperliquid import InfoClient
from async_hyperliquid.types import Network


async def main() -> None:
    async with InfoClient(network=Network.MAINNET) as client:
        print(await client.mid_price("BTC"))


asyncio.run(main())

Place a testnet order

Use a dedicated API-wallet key and start on testnet. This submits a signed market order.

import asyncio
import os

from async_hyperliquid import AsyncHyperliquid
from async_hyperliquid.types import Network


async def main() -> None:
    async with AsyncHyperliquid(
        os.environ["HL_ACCOUNT_ADDRESS"],
        os.environ["HL_SIGNING_KEY"],
        network=Network.TESTNET,
    ) as client:
        result = await client.place_order("BTC", True, 0.001, 0, is_market=True)
        if result["status"] == "err":
            raise RuntimeError(result["response"])
        status = result["response"]["data"]["statuses"][0]
        if isinstance(status, dict) and "error" in status:
            raise RuntimeError(status["error"])
        print(status)


asyncio.run(main())

Learn more in the Read the Docs documentation, API reference, migration guide, changelog, and license.

Benchmarks

The overall signing benchmark values below are from a parity-gated 1.0.0rc1 local CPU reference run. They are not network latency or exchange throughput. See the detailed benchmarks/README.md manual for the full methodology, parity gate, and per-operation results.

Library Geometric-mean throughput Relative to SDK
async-hyperliquid 24,641 ops/s 1.460x
Official SDK 16,874 ops/s 1.000x
CCXT 803 ops/s 0.0476x

The geometric mean gives each of the five operations equal weight, preventing the faster action_hash workload from dominating the score.

Metadata

Release files for async-hyperliquid 1.2.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 async-hyperliquid 1.2.1
File Size Uploaded Provenance Actions
async_hyperliquid-1.2.1.tar.gz 367.8 kB With provenance Details for async_hyperliquid-1.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for async-hyperliquid 1.2.1
File Interpreter ABI Platform Actions
async_hyperliquid-1.2.1-py3-none-any.whl Python 3 none any Details for async_hyperliquid-1.2.1-py3-none-any.whl

Total release size: 407.0 kB

Release files / async_hyperliquid-1.2.1.tar.gz

Download URL async_hyperliquid-1.2.1.tar.gz
Size 367.8 kB
Tags Source
SHA-256 checksum
How to use checksums
df0271c9160fe9634c9bb3df36a44237b49e3749012b5fa09cbf0925d8bece7d
BLAKE2b-256 checksum
How to use checksums
75be5b5f853c6c60e6140ecd0aeed55add3db96dee9f9d76004dec9bec2817df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 3, 2026.

Transparency log

Release files / async_hyperliquid-1.2.1-py3-none-any.whl

Download URL async_hyperliquid-1.2.1-py3-none-any.whl
Size 39.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
50529ce96c4f6f102f74727b039bc3a74cd4eaa320b73246e410df6693f4613e
BLAKE2b-256 checksum
How to use checksums
8a65ab6c7c62f9e8b933acf62beafd1d085137af7ebaa0d26bf99d56ea0ac649
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 3, 2026.

Transparency log

Security for async-hyperliquid 1.2.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 async_hyperliquid-1.2.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 3, 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.

Release history Release notifications | RSS feed

This release

1.2.1 This release

2 release files Full provenance

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