Skip to content

frogansol/hyperliquid_data_fetcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 HyperLiquid BTC Perp Data Collector

Python Version License: MIT QuestDB


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 Perps


📑 Table of Contents

About

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.

Features

  • 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.

Architecture

HyperLiquid API  ->  Data Collector (this repo)  ->  QuestDB (Local)

Prerequisites

  • 🟢 QuestDB: Running locally (localhost:9000)
  • 🟢 config.json in src/hyperliquid with mandatory secret_key and account_address fields

Config Example

{
    "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": "" }
        ]
    }
}

Setup & Usage

  1. Clone this repo & install requirements (Python 3.12+):

    poetry install
  2. Set poll duration in src/hyperliquid/main.py:

    DURATION = 600  # (seconds)
  3. Run the collector:

    poetry run python src/hyperliquid/main.py

Switching to Mainnet

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)

Support

  • For technical questions, feature requests, or to connect with the developer community: Telegram

License

This project is licensed under the MIT License. See LICENSE for details.


About

Hyperliquid Data Fetcher

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages