# Crypto Perpetual Funding Rate APR & Cross-Venue Spread Feed (`quantforge_data/crypto-perp-funding-arb`) Actor

Prebuilt multi-venue (Hyperliquid, OKX, Bybit) perpetual funding rate APR, mark-vs-oracle basis, open interest, and cross-venue delta-neutral carry spread snapshots with Pay-Per-Event pricing and Standby MCP support.

- **URL**: https://apify.com/quantforge_data/crypto-perp-funding-arb.md
- **Developed by:** [QuantForge Data](https://apify.com/quantforge_data) (community)
- **Categories:** Business, Automation, MCP servers
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.60 / 1,000 funding snapshot items

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

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

Published by **QuantForge Data** (`quantforge_data`).

A low-latency, prebuilt **crypto perpetual funding rate APR & cross-venue carry spread feed** for delta-neutral arbitrage bots, quantitative researchers, DeFi/CeFi trading systems, and AI trading agents. Instead of spending cloud compute polling exchange APIs on every run, this Actor streams hourly pre-normalized snapshots aggregated across **Hyperliquid, OKX, and Bybit** public market endpoints — surfacing annualized funding APR, mark-vs-oracle basis (bps), combined open interest, unit-price-verified cross-venue carry spreads, and ready-to-trade long/short venue pairs.

### What can Crypto Perpetual Funding Rate APR & Cross-Venue Spread Feed do?

- **Multi-Venue Carry Spread Detection**: Automatically normalizes tickers across perpetual venues (`1000PEPE`, `kPEPE`, `PEPE-USDT-SWAP` → `PEPE`), computes annualized funding APR (%) across venues, and outputs `cross_venue_spread_apr_pct`, `long_venue`, `short_venue`, and `gross_carry_apr_pct`.
- **Unit-Price Collision Guard**: Enforces a strict mark-price sanity ratio (`0.80 <= ratio <= 1.25`) during cross-venue matching so different underlying tokens sharing the same ticker symbol never generate false carry signals.
- **Mark-vs-Oracle Basis & Open Interest Filtering**: Filter high-conviction liquid opportunities with `min_oi_usd`, `min_abs_apr_pct`, `min_spread_apr_pct`, `cross_venue_only`, and multi-ticker `symbol` queries.
- **Batch Runs, Standby REST API, and Native MCP Server**: Schedule automated Apify dataset pulls, query the low-latency Standby REST endpoint (`GET`/`POST /v1/funding`), or connect AI agents directly via JSON-RPC 2.0 MCP (`POST /mcp`).

### Output data fields

Each dataset item (and Standby REST / MCP record) contains:

| Field | Type | Description |
|---|---|---|
| `record_id` | `string` | Deterministic snapshot record identifier |
| `snapshot_at` | `string` | Snapshot generation UTC timestamp (ISO 8601) |
| `symbol` | `string` | Canonical normalized ticker symbol (e.g., `BTC`, `ETH`, `SOL`, `PEPE`) |
| `primary_venue` | `string` | Venue with highest liquidity/coverage for the symbol |
| `venue_count` | `integer` | Number of matched perpetual venues (`1` to `3`) |
| `venues_matched` | `array<string>` | Matched exchange names (e.g., `["hyperliquid", "okx"]`) |
| `cross_venue_matched` | `boolean` | `true` when matched across 2+ venues with verified price alignment |
| `funding_apr_pct` | `number` | Primary venue annualized funding rate APR (%) |
| `max_abs_funding_apr_pct` | `number` | Maximum absolute annualized funding APR (%) across matched venues |
| `basis_bps` | `number` | Mark-vs-oracle (or mark-vs-index) basis in basis points |
| `open_interest_usd` | `number` | Combined open interest across matched venues in USD |
| `cross_venue_spread_apr_pct` | `number \| null` | Gross annualized funding APR spread between highest and lowest venue |
| `long_venue` | `string \| null` | Recommended long leg venue for positive carry |
| `short_venue` | `string \| null` | Recommended short leg venue for positive carry |
| `gross_carry_apr_pct` | `number \| null` | Estimated gross delta-neutral annualized carry APR (%) |
| `carry_signal` | `string \| null` | Human-readable carry direction (e.g., `long_hyperliquid_short_okx`) |

### Filter inputs & example

| Input Field | Type | Default | Description |
|---|---|---|---|
| `min_abs_apr_pct` | `number` | `null` | Minimum absolute annualized funding APR (%) |
| `min_spread_apr_pct` | `number` | `null` | Minimum cross-venue funding spread APR (%) |
| `min_oi_usd` | `number` | `null` | Minimum combined open interest in USD |
| `cross_venue_only` | `boolean` | `false` | Return only symbols matched across 2+ verified venues |
| `symbol` | `string` | `null` | Single canonical symbol or comma-separated list (e.g., `BTC,ETH,SOL`) |
| `sort_by` | `string` | `"snapshot"` | Sort order: `snapshot`, `spread`, `apr`, `oi`, `basis` |
| `limit` | `integer` | `50` | Maximum records returned (`1` to `1000`) |
| `snapshot_url` | `string` | env default | Optional HTTPS URL override pointing to a custom `snapshot.jsonl` |

#### Example batch input

```json
{
  "cross_venue_only": true,
  "min_oi_usd": 5000000,
  "min_spread_apr_pct": 5,
  "sort_by": "spread",
  "limit": 25
}
```

#### Example output record

```json
{
  "record_id": "crypto-perp-btc-20261206",
  "snapshot_at": "2026-12-06T12:05:50Z",
  "symbol": "BTC",
  "primary_venue": "hyperliquid",
  "venue_count": 2,
  "venues_matched": ["hyperliquid", "okx"],
  "cross_venue_matched": true,
  "funding_apr_pct": 10.95,
  "max_abs_funding_apr_pct": 14.6,
  "basis_bps": -1.8,
  "open_interest_usd": 1425000000,
  "cross_venue_spread_apr_pct": 3.65,
  "long_venue": "hyperliquid",
  "short_venue": "okx",
  "gross_carry_apr_pct": 3.65,
  "carry_signal": "long_hyperliquid_short_okx"
}
```

### Standby REST API & MCP server

When running in Apify Standby mode, this Actor serves instant REST and MCP endpoints:

- `GET /` — Service metadata and Apify readiness probe
- `GET /health` — Health status JSON
- `GET /v1/funding` — Query filtered funding snapshots via query parameters (e.g., `?cross_venue_only=true&min_oi_usd=5000000&limit=20`)
- `POST /v1/funding` — Query filtered funding snapshots with a JSON filter body
- `POST /mcp` — JSON-RPC 2.0 MCP endpoint (`initialize`, `ping`, `tools/list`, `tools/call`)

#### MCP tool: `query_perp_funding_arb`

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "query_perp_funding_arb",
    "arguments": {
      "cross_venue_only": true,
      "min_oi_usd": 10000000,
      "sort_by": "spread",
      "limit": 10
    }
  }
}
```

### How much does it cost? (Pay-Per-Event pricing)

This Actor uses transparent **Pay-Per-Event (PPE)** pricing so you pay only for the filtered records you retrieve:

| Event Name | Price (USD) | Description |
|---|---|---|
| `apify-actor-start` | `$0.00005` | Standard Apify startup event per run (covers first 5 seconds of compute) |
| `funding-snapshot-item` | `$0.002` | Per filtered perpetual funding snapshot record returned (`$2.00 / 1,000 items`) |

With the default `limit: 25` filter, a single scheduled run costs approximately **$0.05** (`$0.00005 + 25 × $0.002`).

### More feeds & MCP servers by QuantForge Data

- [**Polymarket Probability Inefficiency & Liquidity Scanner Feed**](https://apify.com/quantforge_data/polymarket-inefficiency-scanner) — Multi-outcome NegRisk overround/underround and bid-ask spread scanner (Kalshi excluded).
- [**U.S. SEC Form 4 Open-Market Insider & Cluster Buy Signal Feed**](https://apify.com/quantforge_data/sec-form4-cluster-insider) — Strictly PII-free open-market insider buys/sales, Rule 10b5-1 flags, and multi-insider clusters.
- [**U.S. SEC Form D Startup & Private Funding Leads Feed**](https://apify.com/quantforge_data/sec-form-d-funding-leads) — Daily PII-free Regulation D private placement & startup fundraising leads from SEC EDGAR.
- [**Doc-to-LLM Markdown, Table JSON, RAG Chunker & PII Redactor MCP**](https://apify.com/quantforge_data/doc-to-llm-markdown-mcp) — Zero-scraping deterministic HTML-to-Markdown, CSV/HTML table parser, semantic RAG chunker, and PII redactor.

### FAQ, data sources & disclaimer

#### How fresh are the snapshots?

Snapshots are automatically refreshed every hour via edge scheduled jobs and cached for sub-second delivery. If an individual upstream venue rate-limits a poll, the pipeline gracefully degrades to remaining active venues without dropping snapshots.

#### What data sources are used?

Exclusively public, unauthenticated market-data endpoints from Hyperliquid, OKX, and Bybit. No private user data, wallet addresses, or PII is collected or emitted.

#### Is this financial advice?

No. This feed is provided strictly as an informational quantitative data product. Gross funding carry spreads do not include trading fees, slippage, borrow costs, or liquidation risk.

# Actor input Schema

## `min_abs_apr_pct` (type: `number`):

Filter symbols whose absolute annualized funding APR (%) across matched venues is at least this value.

## `min_oi_usd` (type: `number`):

Filter symbols with combined open interest (USD) greater than or equal to this threshold.

## `cross_venue_only` (type: `boolean`):

When enabled, only return symbols matched across 2 or more perpetual venues with verified unit-price alignment.

## `symbol` (type: `string`):

Optional canonical ticker symbol or comma-separated list (e.g., BTC,ETH,SOL,PEPE).

## `min_spread_apr_pct` (type: `number`):

Filter cross-venue opportunities whose gross carry APR spread (%) is at least this threshold.

## `sort_by` (type: `string`):

Ordering of returned snapshot records.

## `limit` (type: `integer`):

Maximum number of filtered snapshot records to return (1..1000).

## `snapshot_url` (type: `string`):

Optional HTTPS URL to a prebuilt snapshot.jsonl on Cloudflare R2. Overrides the Actor SNAPSHOT_URL environment variable when provided.

## Actor input object example

```json
{
  "cross_venue_only": false,
  "sort_by": "snapshot",
  "limit": 50
}
```

# Actor output Schema

## `resultsDataset` (type: `string`):

Normalized multi-venue perpetual funding records sorted by spread/APR.

## `summaryOutput` (type: `string`):

Matched count, delivered count, and active query filter metadata.

# 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("quantforge_data/crypto-perp-funding-arb").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("quantforge_data/crypto-perp-funding-arb").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 quantforge_data/crypto-perp-funding-arb --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,quantforge_data/crypto-perp-funding-arb"
        }
    }
}
```

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/qm1extv09hVUvFeu7/builds/ADApP5o45eYmhjLUp/openapi.json
