# Hyperliquid Funding Rate API + Tokenized Stock Spreads (`cipherhouse/hyperliquid-funding-and-stock-spread`) Actor

Hyperliquid perpetual funding rates (APR, open interest, 24h volume) and Base tokenized stock DEX prices vs Chainlink NAV spreads as JSON. No exchange API key. $0.002 per market row, $0.01 per stock.

- **URL**: https://apify.com/cipherhouse/hyperliquid-funding-and-stock-spread.md
- **Developed by:** [CipherHouse Labs](https://apify.com/cipherhouse) (community)
- **Categories:** Developer tools, AI, Business
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 hyperliquid perp market rows

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/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 Funding Rate API & Tokenized Stock Spreads (Base)

**Hyperliquid funding rate** screener for perpetual markets (funding APR, open interest, 24h volume) plus **tokenized stock prices on Base** compared with Chainlink NAV (premium / discount and slippage), as JSON for bots, dashboards and AI agents. No exchange API key. Read-only data; not financial advice.

### Predictable Pay-Per-Event (PPE) Pricing & Hard Budget-Cap Safety

| Event | Price (USD) | Charged when |
|---|---|---|
| `actor-start` | `$0.005` | Once per Actor run start |
| `hyperliquid-market-row` | `$0.002` | Per Hyperliquid perp market row pushed (`$2.00 / 1,000 rows`, 33–50% below legacy scrapers) |
| `base-stock-spread-row` | `$0.010` | Per Base Coinbase B20 tokenized stock evaluated against Chainlink NAV & live Base DEX pools |

- **Hard Spending Cap (`maxTotalChargeUsd`) Built In**: Pass `maxTotalChargeUsd` in Apify Console, REST API, or MCP calls. Every row checks `Actor.charge()` before being pushed and exits cleanly the instant your spending limit is hit — **zero surprise bills, zero over-charging**.
- **Few-Cent Test Run on Apify Free Monthly Credits (`$5/mo`)**: Run a compact 5-pair Hyperliquid JSON feed (`BTC, ETH, SOL, HYPE, SUI`) for **`$0.015` (1.5¢ — 330+ free runs/month)**, top 20 extreme funding pairs for **`$0.045`**, or all 13 Base Coinbase B20 tokenized stocks for **`$0.135`** (`128 MB` RAM pure Node.js 22, ~3–5s runtime).

### Copy-Paste JSON Input (Run in 5 Seconds)

```json
{
  "mode": "both",
  "hyperliquidLimit": 25,
  "minAbsFundingAprPct": 10,
  "minVolume24hUsd": 1000000,
  "stockLimit": 25,
  "tradeSizeUsd": 10000,
  "maxSlippageBps": 50,
  "onlyAlerts": false
}
```

### Exact Output Schema & Sample Rows

#### 1. Hyperliquid Perp Row (`recordType: "hyperliquid_perp_funding"`)

| Field | Type | Description |
|---|---|---|
| `symbol` / `priceUsd` / `change24hPct` | `string` / `number` | Hyperliquid perp ticker, mark price USD, and 24h change % |
| `fundingRateHourly` / `fundingRate8hPct` / `fundingAnnualizedPct` | `number` | Live hourly rate, 8h %, and annualized funding APR % |
| `direction` / `carryBias` | `string` | `longs_pay_shorts \| shorts_pay_longs` and `short_perp_collect \| long_perp_collect` |
| `verdict` | `string` | Signal label (`EXTREME_CARRY`, `ELEVATED_CARRY`, `NEUTRAL`) |
| `openInterestUsd` / `volume24hUsd` | `number` | Live open interest and 24h notional volume in USD |

```json
{
  "recordType": "hyperliquid_perp_funding",
  "venue": "hyperliquid",
  "symbol": "HYPE",
  "priceUsd": 24.5,
  "change24hPct": 4.12,
  "fundingRateHourly": 0.0000625,
  "fundingRate8hPct": 0.05,
  "fundingAnnualizedPct": 54.75,
  "direction": "longs_pay_shorts",
  "carryBias": "short_perp_collect",
  "verdict": "EXTREME_CARRY",
  "openInterestUsd": 310000000,
  "volume24hUsd": 420000000
}
```

#### 2. Base Coinbase B20 Stock Spread Row (`recordType: "base_b20_stock_spread"`)

| Field | Type | Description |
|---|---|---|
| `symbol` / `underlyingTicker` / `venue` | `string` | Base B20 ticker (e.g., `NVDAc`), equity ticker (`NVDA`), and top Base DEX pool |
| `priceUsd` / `navPriceUsd` | `number` | Live Base DEX pool price vs official Coinbase B20 Chainlink NAV price |
| `spreadBps` / `spreadDirection` / `netArbEdgeBps` | `number` / `string` | DEX-vs-NAV basis-point dislocation, `DISCOUNT_VS_NAV \| PREMIUM_VS_NAV`, and net edge after slippage |
| `estSlippageBps` / `safeMaxTradeAtLimitUsd` | `number` | Constant-product slippage at `tradeSizeUsd` and max single swap under `maxSlippageBps` |
| `verdict` / `agentAction` / `wallStreetSession` | `string` | PoolGuard verdict (`ARB_OPPORTUNITY`, `SLIPPAGE_TRAP`, `FAIR_VALUE`), action & US market session |

```json
{
  "recordType": "base_b20_stock_spread",
  "venue": "base:aerodrome",
  "symbol": "NVDAc",
  "underlyingTicker": "NVDA",
  "priceUsd": 138.2,
  "navPriceUsd": 139.0,
  "spreadBps": -57.6,
  "spreadDirection": "DISCOUNT_VS_NAV",
  "netArbEdgeBps": 39.2,
  "estSlippageBps": 13.4,
  "safeMaxTradeAtLimitUsd": 37400,
  "verdict": "ARB_OPPORTUNITY",
  "agentAction": "SIGNAL_ARB_EDGE",
  "wallStreetSession": "AFTER_HOURS",
  "alertCount": 2
}
```

### Ready-to-Run Public Task Examples

Launch live pre-configured snapshots in 1 click on Apify free monthly credits:

| Use Case | Public Example Preset | Est. Cost |
|---|---|---|
| Combined Hyperliquid + Base B20 Monitor | [Hyperliquid Funding Carry & Base Tokenized Stock Spread Monitor](https://apify.com/cipherhouse/hyperliquid-funding-and-stock-spread/examples/hyperliquid-funding-base-stock-spread-monitor) | `~$0.185` |
| Extreme Funding Carry Scanner (`>=10% APR`, `>=$1M Vol`) | [Hyperliquid Extreme Funding Rate Arbitrage Scanner](https://apify.com/cipherhouse/hyperliquid-funding-and-stock-spread/examples/hyperliquid-extreme-funding-arb-scanner) | `~$0.045` |
| Base Coinbase B20 Tokenized Stocks Only | [Base Coinbase B20 Tokenized Stock NAV Spread & Slippage Tracker](https://apify.com/cipherhouse/hyperliquid-funding-and-stock-spread/examples/base-coinbase-b20-tokenized-stock-spreads) | `~$0.135` |
| Ultra-Cheap AI-Agent 5-Pair JSON/MCP Feed | [AI-Agent Compact 5-Pair Hyperliquid Funding JSON Feed](https://apify.com/cipherhouse/hyperliquid-funding-and-stock-spread/examples/ai-agent-compact-5pair-hyperliquid-feed) | `$0.015` |

### Use via Apify MCP Server (`mcp.apify.com`)

```json
{
  "mcpServers": {
    "apify-cipherhouse-market-monitor": {
      "url": "https://mcp.apify.com/?actors=cipherhouse/hyperliquid-funding-and-stock-spread",
      "headers": {
        "Authorization": "Bearer YOUR_APIFY_TOKEN"
      }
    }
  }
}
```

Example agent prompt:

> *"Run `hyperliquid-funding-and-stock-spread` in `both` mode with `minAbsFundingAprPct: 25`, `tradeSizeUsd: 25000`, and `maxTotalChargeUsd: 0.25`, then report the top 5 Hyperliquid carry yields and any Base B20 tokenized stocks trading at a >40 bps discount to Chainlink NAV without a `SLIPPAGE_TRAP` verdict."*

### Why use this Actor?

- **Undercuts legacy Hyperliquid scrapers** (`$0.002/row` = `$2.00 / 1,000 rows` vs `$3–$4/1k`) while adding OI-weighted funding, carry direction, and APR/volume filters.
- **First-on-Store Base Tokenized Stock NAV Spread + Slippage Guard**: Detect off-hours/weekend equity depegs and thin-pool slippage traps on Base Coinbase B20 equities (`NVDAc`, `AAPLc`, `SPCXc`, `ANTc`, etc.) before routing capital.
- **Zero API keys, 128 MB RAM pure Node.js 22**: Finishes full snapshots in seconds with negligible Apify Compute Unit overhead.

### Disclaimer

Read-only market analytics and slippage telemetry for informational and research use only. CipherHouse does not execute trades, route orders, or offer securities.

# Actor input Schema

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

Choose whether to fetch both Hyperliquid perps + Base B20 tokenized stocks, or only one feed.

## `hyperliquidLimit` (type: `integer`):

Maximum Hyperliquid perp markets to return, ranked by absolute annualized funding rate descending.

## `minAbsFundingAprPct` (type: `number`):

Filter Hyperliquid markets to only those with |annualized funding APR %| >= this value (0 = all).

## `minVolume24hUsd` (type: `number`):

Exclude illiquid Hyperliquid perps with 24h notional volume below this USD threshold.

## `hyperliquidSymbols` (type: `array`):

Optional list of Hyperliquid tickers (e.g., \["BTC", "ETH", "SOL", "HYPE"]). Leave empty for top markets.

## `stockSymbol` (type: `string`):

Optional Base Coinbase B20 symbol or underlying ticker (e.g., "NVDAc", "AAPL", "SPCXc"). Leave blank for all active NAV-backed B20 stocks.

## `stockLimit` (type: `integer`):

Maximum number of Base Coinbase B20 tokenized stocks to return.

## `tradeSizeUsd` (type: `number`):

Simulated swap notional in USD used to model Base DEX slippage and safe split-order chunks.

## `maxSlippageBps` (type: `integer`):

Maximum acceptable constant-product slippage in basis points (50 = 0.50%).

## `onlyAlerts` (type: `boolean`):

When true, only push Base B20 stock rows that have at least one active depeg, slippage-trap, multiplier, or cross-pool dislocation alert.

## Actor input object example

```json
{
  "mode": "both",
  "hyperliquidLimit": 25,
  "minAbsFundingAprPct": 0,
  "minVolume24hUsd": 0,
  "hyperliquidSymbols": [],
  "stockSymbol": "",
  "stockLimit": 25,
  "tradeSizeUsd": 10000,
  "maxSlippageBps": 50,
  "onlyAlerts": false
}
```

# Actor output Schema

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

No description

## `summary` (type: `string`):

No description

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("cipherhouse/hyperliquid-funding-and-stock-spread").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("cipherhouse/hyperliquid-funding-and-stock-spread").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 '{}' |
apify call cipherhouse/hyperliquid-funding-and-stock-spread --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,cipherhouse/hyperliquid-funding-and-stock-spread"
        }
    }
}
```

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/av7CNm5P4MbvoI5zi/builds/NGYGE9fgt3FyINzHl/openapi.json
