A high-performance, extensible data collector and storage engine for HyperLiquid's BTC perpetual swap market.
- Collects real-time and historical BTC perp trade, funding, and order book data using HyperLiquid API.
- Stores all records efficiently in QuestDB for analytics, trading algos, and research.
- 🚀 HyperLiquid BTC Perp Data Collector
- About
- Architecture
- Prerequisites
- Config Example
- Setup & Usage
- Support
- License
HyperLiquid BTC Perp Collector is a mini-project for real-time, reliable collection of BTC perpetual contract data and fast time-series database storage using QuestDB.
- Seamless collection of trade, funding, order book, and BBO data.
- Pluggable and async-friendly architecture.
- Local analytics-ready storage in QuestDB.
- Runs with a single command.
HyperLiquid API -> Data Collector (this repo) -> QuestDB (Local)
- 🟢 QuestDB: Running locally (
localhost:9000) - 🟢
config.jsoninsrc/hyperliquidwith mandatorysecret_keyandaccount_addressfields
{
"comments": "api wallet",
"secret_key": "0x00000000000000000000000000000000000000000000000000000000",
"account_address": "0x0000000000000000000000000000000",
"multi_sig": {
"authorized_users": [
{ "comment": "signer 1", "secret_key": "", "account_address": "" },
{ "comment": "signer 2", "secret_key": "", "account_address": "" }
]
}
}-
Clone this repo & install requirements (Python 3.12+):
poetry install
-
Set poll duration in
src/hyperliquid/main.py:DURATION = 600 # (seconds)
-
Run the collector:
poetry run python src/hyperliquid/main.py
To consume HyperLiquid Mainnet data, update this line in src/hyperliquid/common/__init__.py:
hl_setup = setup(base_url=constants.MAINNET_API_URL, skip_ws=False)This project is licensed under the MIT License. See LICENSE for details.
