# Hyperliquid Market Data Scraper (`zerobreak/hyperliquid-market-data-scraper`) Actor

Hyperliquid Market Data Scraper is a Python tool designed to extract real-time and historical order book depth, trade fills, mark prices, open interest, and funding rates across Hyperliquid perpetual and spot markets. It exports structured DEX analytics into clean CSV or JSON formate

- **URL**: https://apify.com/zerobreak/hyperliquid-market-data-scraper.md
- **Developed by:** [ZeroBreak](https://apify.com/zerobreak) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### Hyperliquid Market Data Scraper — Perpetual Market Prices and Asset Statistics

![Hyperliquid Market Data Scraper cover](https://images.bigibyte.com/cdn-cgi/image/width=1260,height=540,fit=cover,format=webp/apify-actors-covers/hyperliquid-market-data-scraper-cover.png)

### Overview

Collect Hyperliquid market data, including mid prices and perpetual market asset statistics. Choose a collection mode, filter by coin symbols, and limit the number of records saved. Export structured results in JSON, CSV, Excel, or other supported dataset formats.

### Features

- **Mid price collection:** Capture current mid prices for available coins.
- **Perpetual market statistics:** Collect funding rates, open interest, mark prices, oracle prices, and other available asset metrics.
- **Coin filtering:** Focus on specific symbols such as BTC and ETH.
- **Configurable record limits:** Control the maximum number of saved items.
- **Structured datasets:** Prepare market snapshots for spreadsheets, dashboards, and analysis.
- **Scheduled collection:** Refresh market data periodically using Apify scheduling.

### Collection Modes

#### 1. Mid Prices

Collect mid prices for available coins. Each record contains a coin symbol and its corresponding mid price.

#### 2. Perpetual Market Contexts

Collect perpetual market metadata alongside matching asset statistics. Depending on availability, records can include funding rates, open interest, previous-day prices, trading volume, mark prices, oracle prices, and leverage information.

### Use Cases

- **Mid price snapshots:** Export current prices for a selected watchlist.
- **Funding and open interest analysis:** Compare perpetual market metrics across assets.
- **Market research:** Examine differences between mid, mark, and oracle prices.
- **Market catalog monitoring:** Track assets available in the perpetual market.
- **Historical snapshots:** Collect recurring datasets for later comparisons and analysis.
- **Research pipelines:** Supply structured market data to spreadsheets and data-processing workflows.

### Input Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `mode` | String | `mids` | Selects the collection mode: `mids` or `contexts`. |
| `coins` | Array | `[]` | Coin symbols to include, such as `BTC` or `ETH`. Leave empty to include all available coins, subject to `maxItems`. |
| `maxItems` | Integer | `100` | Maximum number of records to save, up to 1000. |
| `requestDelaySecs` | Number | `1` | Configured delay between requests, where applicable. |
| `requestTimeoutSecs` | Integer | `30` | Maximum waiting time for a request, in seconds. |

### Example Input

```json id="h2j4wq"
{
  "mode": "mids",
  "coins": ["BTC", "ETH"],
  "maxItems": 50,
  "requestDelaySecs": 1,
  "requestTimeoutSecs": 30
}
```

This configuration collects mid prices for BTC and ETH, saving up to 50 matching records.

### What Data Does This Actor Extract?

The actor collects coin-level price information and, in perpetual market contexts mode, additional asset metadata and trading statistics.

### Extracted Data Fields

| Field | Description |
|---|---|
| `coin` | Coin or asset symbol. |
| `mid` | Mid-market price, available in mid prices mode. |
| `funding` | Perpetual funding rate, when available. |
| `openInterest` | Current open interest, when available. |
| `prevDayPx` | Previous-day price, when available. |
| `dayNtlVlm` | Daily notional trading volume, when available. |
| `premium` | Premium metric, when available. |
| `oraclePx` | Oracle price, when available. |
| `markPx` | Mark price, when available. |
| `szDecimals` | Asset size precision. |
| `maxLeverage` | Maximum leverage value reported for the asset. |
| `scraped_at` | Date and time when the record was collected. |

Fields depend on the selected mode and the information available for each asset. Context-specific fields may be absent from mid price records.

### Example Output

```json id="6p3n8k"
{
  "coin": "BTC",
  "mid": "84051.5",
  "funding": "0.0000067964",
  "openInterest": "38049.72006",
  "prevDayPx": "83020.0",
  "dayNtlVlm": "1474964057.0020473003",
  "premium": "-0.0004602174",
  "oraclePx": "84090.7",
  "markPx": "84051.0",
  "szDecimals": 5,
  "maxLeverage": 40,
  "scraped_at": "2026-10-26T00:00:00+00:00"
}
```

This example illustrates a perpetual market context record. Actual values and available fields may vary between assets and collection modes.

### Working with Your Dataset

After collection finishes, open the dataset in Apify to inspect records or export them for analysis.

- **JSON:** Use structured records in data-processing applications.
- **CSV:** Compare coin prices and market metrics in spreadsheet software.
- **Excel:** Create watchlists, tables, and market reports.
- **Other supported formats:** Select from the dataset export formats available in Apify.

### Important Notes

- Use `mode` to select mid prices or perpetual market contexts.
- Set `coins` to filter the results by symbol.
- Leave `coins` empty to include all available coins, subject to the configured record limit.
- `maxItems` limits the number of saved records; it does not determine how many assets exist in the market.
- Market values can change frequently. Each collection represents a snapshot rather than a guarantee of future prices.
- This actor provides market information for research and does not execute trades.

### FAQ

**Who is this actor for?**

It is designed for traders, market researchers, analysts, and developers who need structured Hyperliquid market data.

**What is the difference between the two modes?**

The `mids` mode collects coin mid prices. The `contexts` mode collects perpetual market metadata and corresponding asset statistics when available.

**How do I collect only BTC and ETH?**

Set `coins` to `["BTC", "ETH"]` to restrict the results to those symbols.

**Can I collect all available coins?**

Yes. Leave `coins` empty and configure `maxItems` to control the number of records saved.

**What export formats are supported?**

You can export JSON, CSV, Excel, and other formats supported by Apify datasets.

**Can I schedule recurring collections?**

Yes. Configure an Apify schedule to refresh the market dataset at your preferred interval.

### Disclaimer

This actor is an independent tool and is not affiliated with, endorsed by, sponsored by, or officially associated with Hyperliquid. Market information is provided for research and informational purposes only. Cryptocurrency trading involves substantial risk, and collected data should not be treated as financial advice or a guarantee of trading outcomes.

### Is Web Scraping Legal?

Collecting information that is already public is generally legal. and there is no single law that bans it. The limits are the usual ones: do not break into accounts, do not take private or confidential data, and be careful with personal data and copyrighted works. A site's terms can also restrict how you access it. Facts such as a public name, price, or rating are not the same thing as republishing someone's article or photo.

This actor collects information from public pages. It does not log in and it does not bypass access controls.

For a longer explanation, see Apify's article [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/).

# Actor input Schema

## `mode` (type: `string`):

What to scrape. Mids fetches all mid prices. Contexts fetches perp meta zipped with asset contexts.

## `coins` (type: `array`):

Optional coin filter (case-insensitive). Leave empty for all coins.

## `maxItems` (type: `integer`):

Stop after this many successful rows. Hard max is 1000.

## `requestDelaySecs` (type: `number`):

Seconds to wait between requests.

## `userAgent` (type: `string`):

User-Agent header sent with each request.

## `timeoutSecs` (type: `integer`):

Overall run budget in seconds.

## `requestTimeoutSecs` (type: `integer`):

Per-request timeout in seconds.

## `proxyConfiguration` (type: `object`):

Optional proxy. Leave off unless you need it.

## Actor input object example

```json
{
  "mode": "contexts",
  "coins": [],
  "maxItems": 100,
  "requestDelaySecs": 1,
  "userAgent": "ActorResearch/1.0",
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Dataset rows in the overview table.

## `dataset` (type: `string`):

Full dataset for this run.

## `items` (type: `string`):

Dataset items as JSON.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "coins": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("zerobreak/hyperliquid-market-data-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "coins": [] }

# Run the Actor and wait for it to finish
run = client.actor("zerobreak/hyperliquid-market-data-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "coins": []
}' |
apify call zerobreak/hyperliquid-market-data-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,zerobreak/hyperliquid-market-data-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/MtEcqWDiV7Cor7W89/builds/elpogU5RE7sc7ohEQ/openapi.json
