async-hyperliquid 1.0.0__tar.gz → 1.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/CHANGELOG.md +13 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/PKG-INFO +29 -6
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/README.md +27 -4
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/benchmarks/README.md +6 -3
- async_hyperliquid-1.1.0/docs/_static/language-switcher.css +14 -0
- async_hyperliquid-1.1.0/docs/_templates/sidebar/language-switcher.html +15 -0
- async_hyperliquid-1.1.0/docs/conf.py +94 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/howto/index.rst +5 -4
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/howto/info-queries.rst +16 -0
- async_hyperliquid-1.1.0/docs/howto/orders.rst +445 -0
- async_hyperliquid-1.1.0/docs/howto/transfers-administration.rst +282 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/locale/zh_CN/LC_MESSAGES/howto/index.po +21 -16
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/locale/zh_CN/LC_MESSAGES/howto/info-queries.po +17 -6
- async_hyperliquid-1.1.0/docs/locale/zh_CN/LC_MESSAGES/howto/orders.po +369 -0
- async_hyperliquid-1.1.0/docs/locale/zh_CN/LC_MESSAGES/howto/transfers-administration.po +346 -0
- async_hyperliquid-1.1.0/docs/locale/zh_CN/LC_MESSAGES/project/benchmarks.po +111 -0
- async_hyperliquid-1.1.0/docs/locale/zh_CN/LC_MESSAGES/reference/async-hyperliquid.po +90 -0
- async_hyperliquid-1.1.0/docs/locale/zh_CN/LC_MESSAGES/reference/exchange-client.po +100 -0
- async_hyperliquid-1.1.0/docs/locale/zh_CN/LC_MESSAGES/reference/info-client.po +71 -0
- async_hyperliquid-1.1.0/docs/project/benchmarks.md +19 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/project/index.rst +1 -0
- async_hyperliquid-1.1.0/docs/reference/async-hyperliquid.rst +38 -0
- async_hyperliquid-1.1.0/docs/reference/exchange-client.rst +41 -0
- async_hyperliquid-1.1.0/docs/reference/info-client.rst +27 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/pyproject.toml +2 -2
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/src/async_hyperliquid/info.py +10 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/src/async_hyperliquid/types/info.py +9 -0
- async_hyperliquid-1.0.0/docs/conf.py +0 -34
- async_hyperliquid-1.0.0/docs/howto/orders.rst +0 -111
- async_hyperliquid-1.0.0/docs/howto/transfers-administration.rst +0 -65
- async_hyperliquid-1.0.0/docs/locale/zh_CN/LC_MESSAGES/howto/orders.po +0 -200
- async_hyperliquid-1.0.0/docs/locale/zh_CN/LC_MESSAGES/howto/transfers-administration.po +0 -161
- async_hyperliquid-1.0.0/docs/locale/zh_CN/LC_MESSAGES/reference/async-hyperliquid.po +0 -51
- async_hyperliquid-1.0.0/docs/locale/zh_CN/LC_MESSAGES/reference/exchange-client.po +0 -51
- async_hyperliquid-1.0.0/docs/locale/zh_CN/LC_MESSAGES/reference/info-client.po +0 -33
- async_hyperliquid-1.0.0/docs/reference/async-hyperliquid.rst +0 -19
- async_hyperliquid-1.0.0/docs/reference/exchange-client.rst +0 -19
- async_hyperliquid-1.0.0/docs/reference/info-client.rst +0 -9
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/LICENSE +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/benchmarks/__init__.py +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/benchmarks/hotpath.py +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/benchmarks/live/__init__.py +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/benchmarks/live/models.py +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/benchmarks/live/pacing.py +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/benchmarks/live/preflight.py +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/benchmarks/live/providers.py +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/benchmarks/live/reporting.py +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/benchmarks/live/results.py +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/benchmarks/live/runner.py +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/benchmarks/live/workload.py +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/benchmarks/live_exchange.py +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/benchmarks/results/20260805T192621Z/cancel-id-latency.png +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/benchmarks/results/20260805T192621Z/cancel-id-latency.svg +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/benchmarks/results/20260805T192621Z/report.json +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/benchmarks/results/20260805T192621Z/samples.csv +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/benchmarks/signing.py +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/coin-name-mapping.md +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/howto/lifecycle-reconciliation.rst +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/howto/markets.rst +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/howto/routing.rst +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/index.rst +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/introduction/index.rst +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/introduction/installation.rst +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/introduction/quickstart.rst +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/locale/zh_CN/LC_MESSAGES/coin-name-mapping.po +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/locale/zh_CN/LC_MESSAGES/howto/lifecycle-reconciliation.po +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/locale/zh_CN/LC_MESSAGES/howto/markets.po +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/locale/zh_CN/LC_MESSAGES/howto/routing.po +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/locale/zh_CN/LC_MESSAGES/index.po +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/locale/zh_CN/LC_MESSAGES/introduction/index.po +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/locale/zh_CN/LC_MESSAGES/introduction/installation.po +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/locale/zh_CN/LC_MESSAGES/introduction/quickstart.po +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/locale/zh_CN/LC_MESSAGES/migration-0.5-to-1.0.po +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/locale/zh_CN/LC_MESSAGES/project/about.po +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/locale/zh_CN/LC_MESSAGES/project/index.po +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/locale/zh_CN/LC_MESSAGES/project/license.po +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/locale/zh_CN/LC_MESSAGES/reference/errors.po +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/locale/zh_CN/LC_MESSAGES/reference/index.po +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/locale/zh_CN/LC_MESSAGES/reference/response-types.po +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/locale/zh_CN/LC_MESSAGES/reference/types.po +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/migration-0.5-to-1.0.md +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/project/about.rst +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/project/license.rst +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/reference/errors.rst +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/reference/index.rst +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/reference/response-types.rst +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/docs/reference/types.rst +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/src/async_hyperliquid/__init__.py +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/src/async_hyperliquid/_internal/__init__.py +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/src/async_hyperliquid/_internal/encoding.py +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/src/async_hyperliquid/_internal/exchange.py +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/src/async_hyperliquid/_internal/http.py +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/src/async_hyperliquid/_internal/info.py +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/src/async_hyperliquid/_internal/metadata.py +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/src/async_hyperliquid/_internal/signing.py +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/src/async_hyperliquid/client.py +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/src/async_hyperliquid/constants.py +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/src/async_hyperliquid/errors.py +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/src/async_hyperliquid/exchange.py +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/src/async_hyperliquid/py.typed +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/src/async_hyperliquid/types/__init__.py +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/src/async_hyperliquid/types/common.py +0 -0
- {async_hyperliquid-1.0.0 → async_hyperliquid-1.1.0}/src/async_hyperliquid/types/exchange.py +0 -0
|
@@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.1.0] - 2026-09-14
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Add `InfoClient.extra_agents()` with typed API-wallet responses.
|
|
13
|
+
- Add `reversed=True` to `InfoClient.user_fills()` time-range queries to request
|
|
14
|
+
the newest fills first; `start_time` is required when enabled.
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- Cover ascending and mixed-order fill responses to detect unintended client-side
|
|
19
|
+
sorting, and verify reversed fill queries against complete reference windows.
|
|
20
|
+
|
|
8
21
|
## [1.0.0] - 2026-08-17
|
|
9
22
|
|
|
10
23
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: async-hyperliquid
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.1.0
|
|
4
4
|
Summary: Async Hyperliquid client using aiohttp
|
|
5
5
|
Keywords: dex,hyperliquid,async,aiohttp,trading,cryptocurrency,defi
|
|
6
6
|
Author: Yuki
|
|
@@ -26,7 +26,7 @@ Requires-Dist: eth-utils>=5.3.1,<6.0.0
|
|
|
26
26
|
Requires-Dist: coincurve>=21.0.0
|
|
27
27
|
Requires-Python: >=3.12
|
|
28
28
|
Project-URL: Homepage, https://github.com/owlyfi/async-hyperliquid
|
|
29
|
-
Project-URL: Documentation, https://async-hyperliquid.readthedocs.io/
|
|
29
|
+
Project-URL: Documentation, https://async-hyperliquid.readthedocs.io/en/latest/
|
|
30
30
|
Project-URL: Repository, https://github.com/owlyfi/async-hyperliquid
|
|
31
31
|
Project-URL: Issues, https://github.com/owlyfi/async-hyperliquid/issues
|
|
32
32
|
Project-URL: Changelog, https://github.com/owlyfi/async-hyperliquid/blob/main/CHANGELOG.md
|
|
@@ -35,8 +35,8 @@ Description-Content-Type: text/markdown
|
|
|
35
35
|
# Async Hyperliquid
|
|
36
36
|
|
|
37
37
|
[](https://github.com/owlyfi/async-hyperliquid/actions/workflows/ci.yml)
|
|
38
|
-
[](https://async-hyperliquid.readthedocs.io/en/latest
|
|
39
|
-
[](https://pypi.org/project/async-hyperliquid/)
|
|
38
|
+
[](https://async-hyperliquid.readthedocs.io/en/latest/)
|
|
39
|
+
[](https://pypi.org/project/async-hyperliquid/)
|
|
40
40
|
|
|
41
41
|
`async-hyperliquid` is a typed, asynchronous Python client for the Hyperliquid
|
|
42
42
|
REST API. It provides credential-free market and account queries through
|
|
@@ -87,13 +87,36 @@ async def main() -> None:
|
|
|
87
87
|
network=Network.TESTNET,
|
|
88
88
|
) as client:
|
|
89
89
|
result = await client.place_order("BTC", True, 0.001, 0, is_market=True)
|
|
90
|
-
|
|
90
|
+
if result["status"] == "err":
|
|
91
|
+
raise RuntimeError(result["response"])
|
|
92
|
+
status = result["response"]["data"]["statuses"][0]
|
|
93
|
+
if isinstance(status, dict) and "error" in status:
|
|
94
|
+
raise RuntimeError(status["error"])
|
|
95
|
+
print(status)
|
|
91
96
|
|
|
92
97
|
|
|
93
98
|
asyncio.run(main())
|
|
94
99
|
```
|
|
95
100
|
|
|
96
|
-
Learn more in the [Read the Docs documentation](https://async-hyperliquid.readthedocs.io/),
|
|
101
|
+
Learn more in the [Read the Docs documentation](https://async-hyperliquid.readthedocs.io/en/latest/),
|
|
97
102
|
[API reference](https://async-hyperliquid.readthedocs.io/en/latest/reference/index.html),
|
|
98
103
|
[migration guide](https://async-hyperliquid.readthedocs.io/en/latest/migration-0.5-to-1.0.html),
|
|
99
104
|
[changelog](CHANGELOG.md), and [license](LICENSE).
|
|
105
|
+
|
|
106
|
+
## Benchmarks
|
|
107
|
+
|
|
108
|
+
The overall signing benchmark values below are from a parity-gated `1.0.0rc1`
|
|
109
|
+
local CPU reference run. They are not network latency or exchange throughput.
|
|
110
|
+
See the detailed [benchmarks/README.md](benchmarks/README.md) manual for the
|
|
111
|
+
full methodology, parity gate, and per-operation results.
|
|
112
|
+
|
|
113
|
+
<!-- signing-benchmark:overall:start -->
|
|
114
|
+
| Library | Geometric-mean throughput | Relative to SDK |
|
|
115
|
+
|---|---:|---:|
|
|
116
|
+
| async-hyperliquid | 24,641 ops/s | 1.460x |
|
|
117
|
+
| Official SDK | 16,874 ops/s | 1.000x |
|
|
118
|
+
| CCXT | 803 ops/s | 0.0476x |
|
|
119
|
+
|
|
120
|
+
The geometric mean gives each of the five operations equal weight, preventing
|
|
121
|
+
the faster `action_hash` workload from dominating the score.
|
|
122
|
+
<!-- signing-benchmark:overall:end -->
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Async Hyperliquid
|
|
2
2
|
|
|
3
3
|
[](https://github.com/owlyfi/async-hyperliquid/actions/workflows/ci.yml)
|
|
4
|
-
[](https://async-hyperliquid.readthedocs.io/en/latest
|
|
5
|
-
[](https://pypi.org/project/async-hyperliquid/)
|
|
4
|
+
[](https://async-hyperliquid.readthedocs.io/en/latest/)
|
|
5
|
+
[](https://pypi.org/project/async-hyperliquid/)
|
|
6
6
|
|
|
7
7
|
`async-hyperliquid` is a typed, asynchronous Python client for the Hyperliquid
|
|
8
8
|
REST API. It provides credential-free market and account queries through
|
|
@@ -53,13 +53,36 @@ async def main() -> None:
|
|
|
53
53
|
network=Network.TESTNET,
|
|
54
54
|
) as client:
|
|
55
55
|
result = await client.place_order("BTC", True, 0.001, 0, is_market=True)
|
|
56
|
-
|
|
56
|
+
if result["status"] == "err":
|
|
57
|
+
raise RuntimeError(result["response"])
|
|
58
|
+
status = result["response"]["data"]["statuses"][0]
|
|
59
|
+
if isinstance(status, dict) and "error" in status:
|
|
60
|
+
raise RuntimeError(status["error"])
|
|
61
|
+
print(status)
|
|
57
62
|
|
|
58
63
|
|
|
59
64
|
asyncio.run(main())
|
|
60
65
|
```
|
|
61
66
|
|
|
62
|
-
Learn more in the [Read the Docs documentation](https://async-hyperliquid.readthedocs.io/),
|
|
67
|
+
Learn more in the [Read the Docs documentation](https://async-hyperliquid.readthedocs.io/en/latest/),
|
|
63
68
|
[API reference](https://async-hyperliquid.readthedocs.io/en/latest/reference/index.html),
|
|
64
69
|
[migration guide](https://async-hyperliquid.readthedocs.io/en/latest/migration-0.5-to-1.0.html),
|
|
65
70
|
[changelog](CHANGELOG.md), and [license](LICENSE).
|
|
71
|
+
|
|
72
|
+
## Benchmarks
|
|
73
|
+
|
|
74
|
+
The overall signing benchmark values below are from a parity-gated `1.0.0rc1`
|
|
75
|
+
local CPU reference run. They are not network latency or exchange throughput.
|
|
76
|
+
See the detailed [benchmarks/README.md](benchmarks/README.md) manual for the
|
|
77
|
+
full methodology, parity gate, and per-operation results.
|
|
78
|
+
|
|
79
|
+
<!-- signing-benchmark:overall:start -->
|
|
80
|
+
| Library | Geometric-mean throughput | Relative to SDK |
|
|
81
|
+
|---|---:|---:|
|
|
82
|
+
| async-hyperliquid | 24,641 ops/s | 1.460x |
|
|
83
|
+
| Official SDK | 16,874 ops/s | 1.000x |
|
|
84
|
+
| CCXT | 803 ops/s | 0.0476x |
|
|
85
|
+
|
|
86
|
+
The geometric mean gives each of the five operations equal weight, preventing
|
|
87
|
+
the faster `action_hash` workload from dominating the score.
|
|
88
|
+
<!-- signing-benchmark:overall:end -->
|
|
@@ -372,15 +372,18 @@ divided by the provider aggregate median, so higher is better.
|
|
|
372
372
|
The overall score gives each of the five operations equal weight. It is the
|
|
373
373
|
geometric mean of their aggregate throughputs:
|
|
374
374
|
|
|
375
|
+
<!-- signing-benchmark:overall:start -->
|
|
375
376
|
| Library | Geometric-mean throughput | Relative to SDK |
|
|
376
377
|
|---|---:|---:|
|
|
377
378
|
| async-hyperliquid | 24,641 ops/s | 1.460x |
|
|
378
379
|
| Official SDK | 16,874 ops/s | 1.000x |
|
|
379
380
|
| CCXT | 803 ops/s | 0.0476x |
|
|
380
381
|
|
|
381
|
-
The geometric mean
|
|
382
|
-
|
|
383
|
-
|
|
382
|
+
The geometric mean gives each of the five operations equal weight, preventing
|
|
383
|
+
the faster `action_hash` workload from dominating the score.
|
|
384
|
+
<!-- signing-benchmark:overall:end -->
|
|
385
|
+
|
|
386
|
+
The same five workloads, versions, and weighting must be used for comparisons.
|
|
384
387
|
|
|
385
388
|
## Correctness verification
|
|
386
389
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
.sidebar-language-switch {
|
|
2
|
+
align-items: center;
|
|
3
|
+
display: flex;
|
|
4
|
+
font-size: 0.875rem;
|
|
5
|
+
gap: 0.5rem;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
margin: -0.5rem 0 0.75rem;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.sidebar-language-switch a[aria-current="page"] {
|
|
11
|
+
color: var(--color-foreground-primary);
|
|
12
|
+
font-weight: 600;
|
|
13
|
+
text-decoration: none;
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<nav class="sidebar-language-switch" aria-label="Documentation language">
|
|
2
|
+
{% if documentation_is_hosted %}
|
|
3
|
+
<a href="https://async-hyperliquid.readthedocs.io/en/{{ documentation_version|e }}/{{ pagename|e }}.html"
|
|
4
|
+
lang="en"{% if documentation_language == "en" %} aria-current="page"{% endif %}>English</a>
|
|
5
|
+
<span aria-hidden="true">|</span>
|
|
6
|
+
<a href="https://async-hyperliquid.readthedocs.io/zh-cn/{{ documentation_version|e }}/{{ pagename|e }}.html"
|
|
7
|
+
lang="zh-CN"{% if documentation_language == "zh-cn" %} aria-current="page"{% endif %}>简体中文</a>
|
|
8
|
+
{% else %}
|
|
9
|
+
<a href="{{ documentation_root_prefix|e }}en/{{ pagename|e }}.html"
|
|
10
|
+
lang="en"{% if documentation_language == "en" %} aria-current="page"{% endif %}>English</a>
|
|
11
|
+
<span aria-hidden="true">|</span>
|
|
12
|
+
<a href="{{ documentation_root_prefix|e }}zh_CN/{{ pagename|e }}.html"
|
|
13
|
+
lang="zh-CN"{% if documentation_language == "zh-cn" %} aria-current="page"{% endif %}>简体中文</a>
|
|
14
|
+
{% endif %}
|
|
15
|
+
</nav>
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import re
|
|
3
|
+
from importlib.metadata import metadata, version as package_version
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
project = "async-hyperliquid"
|
|
7
|
+
release = package_version(project)
|
|
8
|
+
version = release
|
|
9
|
+
|
|
10
|
+
requires_python = metadata(project)["Requires-Python"]
|
|
11
|
+
minimum_python = requires_python.removeprefix(">=")
|
|
12
|
+
if minimum_python == requires_python:
|
|
13
|
+
raise RuntimeError(
|
|
14
|
+
"documentation expects a minimum-only Requires-Python package constraint"
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
rst_prolog = "\n".join(
|
|
18
|
+
(
|
|
19
|
+
f".. |minimum-python| replace:: {minimum_python}",
|
|
20
|
+
f".. |requires-python| replace:: ``{requires_python}``",
|
|
21
|
+
)
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
extensions = [
|
|
25
|
+
"myst_parser",
|
|
26
|
+
"sphinx.ext.autodoc",
|
|
27
|
+
"sphinx_copybutton",
|
|
28
|
+
"sphinx_inline_tabs",
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
locale_dirs = ["locale/"]
|
|
32
|
+
gettext_compact = False
|
|
33
|
+
gettext_uuid = True
|
|
34
|
+
|
|
35
|
+
exclude_patterns = ["_build"]
|
|
36
|
+
html_theme = "furo"
|
|
37
|
+
html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "")
|
|
38
|
+
|
|
39
|
+
_HOSTED_TO_SPHINX_LANGUAGE = {"en": "en", "zh-cn": "zh_CN"}
|
|
40
|
+
_SPHINX_TO_HOSTED_LANGUAGE = {
|
|
41
|
+
value: key for key, value in _HOSTED_TO_SPHINX_LANGUAGE.items()
|
|
42
|
+
}
|
|
43
|
+
_READTHEDOCS_VERSION = os.environ.get("READTHEDOCS_VERSION", "latest")
|
|
44
|
+
_IS_READTHEDOCS = os.environ.get("READTHEDOCS") == "True"
|
|
45
|
+
if not re.fullmatch(r"[a-z0-9._-]+", _READTHEDOCS_VERSION, flags=re.ASCII):
|
|
46
|
+
raise RuntimeError(
|
|
47
|
+
"READTHEDOCS_VERSION must be a non-empty Read the Docs version slug"
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
rtd_language = os.environ.get("READTHEDOCS_LANGUAGE")
|
|
51
|
+
if rtd_language is not None:
|
|
52
|
+
try:
|
|
53
|
+
language = _HOSTED_TO_SPHINX_LANGUAGE[rtd_language]
|
|
54
|
+
except KeyError as exc:
|
|
55
|
+
raise RuntimeError(
|
|
56
|
+
f"unsupported Read the Docs language: {rtd_language}"
|
|
57
|
+
) from exc
|
|
58
|
+
|
|
59
|
+
html_title = project
|
|
60
|
+
templates_path = ["_templates"]
|
|
61
|
+
html_static_path = ["_static"]
|
|
62
|
+
html_css_files = ["language-switcher.css"]
|
|
63
|
+
html_sidebars = {
|
|
64
|
+
"**": [
|
|
65
|
+
"sidebar/brand.html",
|
|
66
|
+
"sidebar/language-switcher.html",
|
|
67
|
+
"sidebar/search.html",
|
|
68
|
+
"sidebar/scroll-start.html",
|
|
69
|
+
"sidebar/navigation.html",
|
|
70
|
+
"sidebar/ethical-ads.html",
|
|
71
|
+
"sidebar/scroll-end.html",
|
|
72
|
+
"sidebar/variant-selector.html",
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def _add_documentation_context(app, pagename, templatename, context, doctree):
|
|
78
|
+
del templatename, doctree
|
|
79
|
+
rendered_language = app.config.language or "en"
|
|
80
|
+
try:
|
|
81
|
+
context["documentation_language"] = _SPHINX_TO_HOSTED_LANGUAGE[
|
|
82
|
+
rendered_language
|
|
83
|
+
]
|
|
84
|
+
except KeyError as exc:
|
|
85
|
+
raise RuntimeError(
|
|
86
|
+
f"unsupported Sphinx documentation language: {rendered_language}"
|
|
87
|
+
) from exc
|
|
88
|
+
context["documentation_version"] = _READTHEDOCS_VERSION
|
|
89
|
+
context["documentation_is_hosted"] = _IS_READTHEDOCS
|
|
90
|
+
context["documentation_root_prefix"] = "../" * (pagename.count("/") + 1)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
def setup(app):
|
|
94
|
+
app.connect("html-page-context", _add_documentation_context)
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
How-to guides
|
|
2
2
|
=============
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
Choose the guide for the outcome you need, then follow its safety and response
|
|
5
|
+
steps before copying an example:
|
|
5
6
|
|
|
6
7
|
* :doc:`info-queries` covers credential-free market and account reads.
|
|
7
8
|
* :doc:`markets` explains canonical coin names and metadata-derived IDs.
|
|
@@ -9,8 +10,8 @@ These guides group public operations by workflow:
|
|
|
9
10
|
cancellation, and closing.
|
|
10
11
|
* :doc:`routing` explains main accounts, API wallets, subaccounts, vaults, and
|
|
11
12
|
endpoint trust boundaries.
|
|
12
|
-
* :doc:`transfers-administration`
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
* :doc:`transfers-administration` covers fund-moving operations with explicit
|
|
14
|
+
signed-action examples, plus paid, administrative, outcome, and validator
|
|
15
|
+
actions.
|
|
15
16
|
* :doc:`lifecycle-reconciliation` covers sessions, errors, nonce ownership, and
|
|
16
17
|
ambiguous signed outcomes.
|
|
@@ -43,6 +43,7 @@ address identifies a signing role and normally has no portfolio of its own.
|
|
|
43
43
|
state = await info.account_state(account_address, dexs=("", "xyz"))
|
|
44
44
|
orders = await info.open_orders(account_address, frontend=True)
|
|
45
45
|
fills = await info.user_fills(account_address, aggregate_by_time=True)
|
|
46
|
+
agents = await info.extra_agents(account_address)
|
|
46
47
|
status = await info.order_status(account_address, order_id)
|
|
47
48
|
|
|
48
49
|
``account_state()`` combines spot state, base perpetual state, and the requested
|
|
@@ -62,6 +63,21 @@ Timestamps are integer milliseconds. ``user_fills()`` requires ``start_time``
|
|
|
62
63
|
when ``end_time`` is supplied. Funding and non-funding ledger methods require a
|
|
63
64
|
start time and accept an optional end time.
|
|
64
65
|
|
|
66
|
+
Pass ``reversed=True`` with ``start_time`` to request the newest page of fills
|
|
67
|
+
within a time range. The client sends ``reversed`` to ``userFillsByTime`` and
|
|
68
|
+
preserves the upstream response order. Omitting it keeps the existing request
|
|
69
|
+
behavior:
|
|
70
|
+
|
|
71
|
+
.. code-block:: python
|
|
72
|
+
|
|
73
|
+
async with InfoClient() as info:
|
|
74
|
+
fills = await info.user_fills(
|
|
75
|
+
account_address,
|
|
76
|
+
start_time=0,
|
|
77
|
+
end_time=end_time_ms,
|
|
78
|
+
reversed=True,
|
|
79
|
+
)
|
|
80
|
+
|
|
65
81
|
Response handling
|
|
66
82
|
-----------------
|
|
67
83
|
|