Off-chain HIP-2 Hyperliquidity market maker for Hyperliquid spot markets
Project description
pyperliquidity
A Python implementation of HIP-2 "Hyperliquidity" market-making algorithm. While HIP-2's logic runs fully on-chain, certain spot markets (especially bridged assets) are unable to use this feature. pyperliquidity recovers HIP-2 behavior using an off-chain market maker.
Core concept: Uniswap V2 / infinite-range liquidity pools, but on an order book.
Installation
pip install -e ".[dev]"
Usage
pyperliquidity run --config config.toml
Architecture
WebSocket Feeds ──► StateManager ──► QuotingEngine ──► OrderDiffer ──► BatchEmitter ──► API
▲ (single source (pure math, (dead zone + (budget-aware, │
│ of truth) no I/O) level-index prioritized) │
└──────────── orderUpdates / userFills / webData2 ──────────────────────────────────────┘
Configuration
See config.example.toml for all available parameters.
Development
This project uses OpenSpec for spec-driven development. Domain specs live in openspec/specs/. Read them before implementing.
pytest # Run tests
mypy src/ # Type check
ruff check src/ # Lint
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyperliquidity-0.1.0.tar.gz.
File metadata
- Download URL: pyperliquidity-0.1.0.tar.gz
- Upload date:
- Size: 133.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
540b79e6ffbab035f29e3b58cdab2736cd554edf5b2f94135e63ee420efe10ad
|
|
| MD5 |
7fabc192f657ba81935d604e4eb709f1
|
|
| BLAKE2b-256 |
213a6ef79c41e375841f882998cec7ef8f97b46e5a00e25f62fd09b29a823749
|
File details
Details for the file pyperliquidity-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pyperliquidity-0.1.0-py3-none-any.whl
- Upload date:
- Size: 23.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19b95a0c3a5a3772cc2776b3109a2862fc46f4711586228b82450c0f37828dcf
|
|
| MD5 |
16f0280e644894e5e7e36a55c6478671
|
|
| BLAKE2b-256 |
e2a682e849d342ea254e14bb9bda5d1551885a209b286d2d636c7a2468e02f24
|