# Crypto Perpetual Funding Rate & Open Interest Scraper (`scrapers_lat/crypto-perp-funding-oi-scraper`) Actor

Aggregate perpetual-futures funding rates, open interest and long/short ratio across Bybit, OKX and Binance. Get annualized funding, cross-exchange funding spread and total OI per coin. Export to JSON, CSV or Excel.

- **URL**: https://apify.com/scrapers\_lat/crypto-perp-funding-oi-scraper.md
- **Developed by:** [Scrapers Lat](https://apify.com/scrapers_lat) (community)
- **Categories:** Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $11.28 / 1,000 perp snapshots

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

[![Crypto Perpetual Funding Rate & Open Interest Scraper](https://scrapers.lat/banners/crypto-perp-funding-oi-scraper.png)](https://console.apify.com/actors/Hv2xxjDE7nGhRaoKd/input)

## Crypto Perpetual Funding Rate & Open Interest Scraper

Here is one real result, with every field the actor returns:

```json
{
  "exchange": "binance",
  "symbol": "BTC",
  "instrument": "BTCUSDT",
  "markPrice": 77721,
  "indexPrice": 77739.16934783,
  "lastPrice": 77710,
  "price24hChangePct": 8.013,
  "fundingRate": 0.0001,
  "fundingIntervalHours": 8,
  "fundingRateAnnualizedPct": 10.95,
  "nextFundingTime": "2026-08-21T16:00:00.000Z",
  "openInterestBase": 109406.315,
  "openInterestUsd": 8503168208.12,
  "volume24hUsd": 31614402369.37,
  "longShortRatio": 1.0555,
  "xAvgFundingAnnualizedPct": 10.95,
  "xFundingSpreadAnnualizedPct": 0,
  "xTotalOpenInterestUsd": 14764534312.98,
  "xExchangesCovered": ["bybit", "okx", "binance"],
  "fundingHistoryPoints": 100,
  "fundingHistoryStart": "2026-07-19T08:00:00.000Z",
  "fundingHistoryEnd": "2026-08-21T08:00:00.000Z",
  "fundingRateAvg": 5.585e-05,
  "fundingRateAvgAnnualizedPct": 6.116,
  "cumulativeFundingPct": 0.5585,
  "fundingRegimeVsAvg": "above average",
  "fundingTrend": "rising",
  "aiPositioningBias": "long-crowded",
  "aiSqueezeRisk": "medium",
  "aiFundingRegime": "mildly positive carry",
  "aiArbNote": "the spread is negligible",
  "aiSummary": "The market shows a long-crowded positioning with a mildly positive funding rate, indicating potential squeeze risk.",
  "source": "binance",
  "observedAt": "2026-08-21T11:07:40.077Z",
  "error": null
}
```

The most complete cross-exchange perpetual-futures market-data scraper available. It returns every core field the exchanges expose for each USDT perpetual (funding rate, mark and index price, open interest in coin and USD, 24h volume, long/short account ratio), plus derived fields single-exchange scrapers cannot give you: annualized funding, the cross-exchange funding spread (the funding-arbitrage edge), and aggregated open interest across Bybit, OKX and Binance.

**📥 [Input](https://apify.com/scrapers_lat/crypto-perp-funding-oi-scraper/input-schema) · 📤 [Output](https://apify.com/scrapers_lat/crypto-perp-funding-oi-scraper/output-schema) · 💰 [Pricing](https://apify.com/scrapers_lat/crypto-perp-funding-oi-scraper/pricing) · ▶️ [Examples](https://apify.com/scrapers_lat/crypto-perp-funding-oi-scraper/examples)**

![Apify](https://img.shields.io/badge/Platform-Apify-1CE1CE?logo=apify\&logoColor=white)
![Coverage](https://img.shields.io/badge/Coverage-Bybit%20%7C%20OKX%20%7C%20Binance-blue)
![Output](https://img.shields.io/badge/Output-JSON%20%7C%20CSV%20%7C%20Excel-orange)
![Billing](https://img.shields.io/badge/Billing-Pay%20per%20result-brightgreen)

### Table of contents

- [What it does](#what-it-does)
- [Quickstart](#quickstart)
- [Input reference](#input-reference)
- [Output reference](#output-reference)
- [Example output record](#example-output-record)
- [Run via API and CLI](#run-via-api-and-cli)
- [Fetch results](#fetch-results)
- [Use cases](#use-cases)
- [Billing and limits](#billing-and-limits)
- [FAQ and troubleshooting](#faq-and-troubleshooting)

### What it does

You pass a list of base coins (for example `BTC`, `ETH`, `SOL`) and the exchanges you want. For every coin the actor pulls the live USDT perpetual snapshot from each exchange, normalizes it into one flat row per `(symbol, exchange)`, and computes a cross-exchange summary for the coin that is attached to every row.

Each row carries:

- The current funding rate as a per-interval decimal and annualized to a percent.
- Mark price, index price, last price and 24h price change.
- Open interest in coin units and in USD, plus 24h USD volume.
- The long/short account ratio where the exchange exposes it.
- A cross-exchange block for the coin: average annualized funding, the funding spread (max minus min annualized funding across the exchanges that responded), aggregated total open interest in USD, and the list of exchanges covered.

The cross-exchange funding spread is the core value. When one venue pays a very different funding rate than another, that gap is a cash-and-carry / funding-arbitrage edge that a single-exchange feed cannot show you. Two optional add-ons deepen each row: a funding-history summary (average funding, cumulative funding, regime and trend over the recent window) and an AI funding signal (positioning bias, squeeze risk, funding regime and an arbitrage note).

Coverage is Bybit, OKX and Binance USDT-margined linear perpetuals. Bybit and OKX are the reliable core; Binance is included and returned whenever it is reachable. All anti-block handling is internal, so you never configure a proxy.

### Quickstart

Open the actor, paste this into the input, and press Run. It returns the funding, open interest and cross-exchange spread for BTC and ETH on all three exchanges.

```json
{
  "symbols": ["BTC", "ETH"],
  "exchanges": ["bybit", "okx", "binance"],
  "sortBy": "openInterest",
  "maxResults": 10
}
```

Leave `symbols` empty to default to BTC, ETH and SOL. Every input field is optional.

### Input reference

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `symbols` | array of strings | no | `["BTC","ETH","SOL"]` | Base coin symbols. Each is mapped to that coin's USDT perpetual on every selected exchange (`BTC` becomes `BTCUSDT` on Bybit/Binance and `BTC-USDT-SWAP` on OKX). A single string is accepted and wrapped to a one-item list. |
| `exchanges` | array of strings | no | `["bybit","okx","binance"]` | Which exchanges to query. Any subset of `bybit`, `okx`, `binance`. |
| `minOpenInterestUsd` | integer | no | `0` | Only return per-exchange rows whose open interest is at least this many USD. Use to skip thin markets. |
| `sortBy` | enum | no | `openInterest` | Sort rows before the result cap. One of `openInterest`, `fundingRate`, `annualizedFunding` (all descending). |
| `includeFundingHistory` | boolean | no | `false` | Paid add-on. Fetch each exchange's funding-rate history and attach average funding (annualized), cumulative funding, current-vs-average regime and trend direction. Charged only when a real series returns. Disabled on free plans. |
| `aiFundingSignal` | boolean | no | `false` | Paid add-on. Add an AI read: positioning bias, squeeze risk, funding regime, cross-exchange arbitrage note and a one-line summary. Charged only when usable output returns. Disabled on free plans. |
| `maxResults` | integer | no | `10` | Maximum per-exchange rows to return across the run, after filtering and sorting. Free Apify plans are capped at 10. |

### Output reference

One dataset item per `(symbol, exchange)`. Types are `string`, `number`, `boolean`, `string[]`, or `null` when a value is absent.

| Field | Type | Description |
|---|---|---|
| `exchange` | string | Exchange the row is from: `bybit`, `okx` or `binance`. |
| `symbol` | string | Base coin symbol, for example `BTC`. |
| `instrument` | string | Exchange-native perpetual id, for example `BTCUSDT` or `BTC-USDT-SWAP`. |
| `markPrice` | number | Perpetual mark price. `null` on OKX, which does not expose it on this endpoint. |
| `indexPrice` | number | Underlying index price. `null` on OKX. |
| `lastPrice` | number | Last traded price of the perpetual. |
| `price24hChangePct` | number | 24h price change, percent. |
| `fundingRate` | number | Current funding rate as a per-interval decimal (`0.0001` = 0.01% per interval). |
| `fundingIntervalHours` | number | Funding interval in hours (8 on all three exchanges). |
| `fundingRateAnnualizedPct` | number | Funding annualized to a percent: `fundingRate * (24 / interval) * 365 * 100`. |
| `nextFundingTime` | string | ISO 8601 timestamp of the next funding settlement. |
| `openInterestBase` | number | Open interest in base coin units. |
| `openInterestUsd` | number | Open interest in USD. |
| `volume24hUsd` | number | 24h traded volume in USD. |
| `longShortRatio` | number | Long/short account ratio (above 1 means more longs), where exposed, else `null`. |
| `xAvgFundingAnnualizedPct` | number | Cross-exchange average annualized funding for this coin. |
| `xFundingSpreadAnnualizedPct` | number | Cross-exchange funding spread: max minus min annualized funding across the exchanges that responded. The funding-arbitrage edge. |
| `xTotalOpenInterestUsd` | number | Cross-exchange total open interest in USD for this coin. |
| `xExchangesCovered` | string\[] | Exchanges that returned data for this coin. |
| `fundingHistoryPoints` | number | Funding-history points returned (funding history add-on). |
| `fundingHistoryStart` | string | First timestamp of the history window (funding history add-on). |
| `fundingHistoryEnd` | string | Last timestamp of the history window (funding history add-on). |
| `fundingRateAvg` | number | Average funding over the window, decimal (funding history add-on). |
| `fundingRateAvgAnnualizedPct` | number | Average funding over the window, annualized percent (funding history add-on). |
| `cumulativeFundingPct` | number | Sum of per-interval funding over the window, percent (funding history add-on). |
| `fundingRegimeVsAvg` | string | Current funding vs the window average: `above average`, `near average` or `below average` (funding history add-on). |
| `fundingTrend` | string | Funding trend across the window: `rising`, `falling` or `flat` (funding history add-on). |
| `aiPositioningBias` | string | AI bias: `long-crowded`, `short-crowded` or `neutral` (AI add-on). |
| `aiSqueezeRisk` | string | AI squeeze risk: `low`, `medium` or `high` (AI add-on). |
| `aiFundingRegime` | string | AI one-phrase funding-regime read (AI add-on). |
| `aiArbNote` | string | AI note on the cross-exchange funding-spread arbitrage edge (AI add-on). |
| `aiSummary` | string | AI one-line trader summary (AI add-on). |
| `source` | string | Data source for the row (the exchange). |
| `observedAt` | string | ISO 8601 timestamp when the record was collected. |
| `error` | string | `null` on success. On a failed run a single item with a populated `error` field is written instead. |

### Example output record

Real record from a live run (input `{"symbols":["BTC"],"exchanges":["bybit","okx","binance"]}`), OKX row:

```json
{
  "exchange": "okx",
  "symbol": "BTC",
  "instrument": "BTC-USDT-SWAP",
  "markPrice": null,
  "indexPrice": null,
  "lastPrice": 77719.9,
  "price24hChangePct": 7.32,
  "fundingRate": 0.0001,
  "fundingIntervalHours": 8,
  "fundingRateAnnualizedPct": 10.95,
  "nextFundingTime": "2026-08-21T16:00:00.000Z",
  "openInterestBase": 30528.6,
  "openInterestUsd": 2372799466.44,
  "volume24hUsd": 18053441897.97,
  "longShortRatio": 1.16,
  "xAvgFundingAnnualizedPct": 10.95,
  "xFundingSpreadAnnualizedPct": 0,
  "xTotalOpenInterestUsd": 14787163125.23,
  "xExchangesCovered": ["bybit", "okx", "binance"],
  "source": "okx",
  "observedAt": "2026-08-21T11:05:12.000Z",
  "error": null
}
```

### Run via API and CLI

Start a run and read the dataset. Replace `<TOKEN>` with your Apify API token.

Run synchronously and get dataset items in one call:

```bash
curl -X POST "https://api.apify.com/v2/acts/scrapers_lat~crypto-perp-funding-oi-scraper/run-sync-get-dataset-items?token=<TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"symbols":["BTC","ETH","SOL"],"exchanges":["bybit","okx","binance"],"sortBy":"annualizedFunding"}'
```

Start a run asynchronously:

```bash
curl -X POST "https://api.apify.com/v2/acts/scrapers_lat~crypto-perp-funding-oi-scraper/runs?token=<TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"symbols":["BTC"],"includeFundingHistory":true,"aiFundingSignal":true,"maxResults":3}'
```

Apify CLI:

```bash
apify call scrapers_lat/crypto-perp-funding-oi-scraper \
  --input '{"symbols":["BTC","ETH"],"minOpenInterestUsd":100000000}'
```

### Fetch results

Every run writes to a dataset. Fetch items as JSON, CSV, or Excel by changing `format`:

```bash
## JSON
curl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?token=<TOKEN>&clean=true&format=json"

## CSV
curl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?token=<TOKEN>&clean=true&format=csv"
```

`<DATASET_ID>` is returned as `defaultDatasetId` in the run object. `clean=true` drops empty and internal fields.

### Use cases

- **Funding-rate arbitrage.** Compare `fundingRateAnnualizedPct` across exchanges and read `xFundingSpreadAnnualizedPct` to spot the venue paying you to hold one leg while shorting the other.
- **Perp basis and carry trading.** Track annualized funding and the mark-to-index gap to size and time basis positions.
- **Open-interest monitoring.** Watch `openInterestUsd` per exchange and `xTotalOpenInterestUsd` per coin to see leverage building or unwinding.
- **Long/short positioning.** Use `longShortRatio` per exchange to gauge how one-sided the crowd is.
- **Liquidation-risk and squeeze detection.** Combine crowded positioning, rising funding and concentrated open interest to flag squeeze conditions; the AI add-on scores this directly.
- **Crypto quant research and market-making.** Pull a clean, flat, cross-exchange funding and OI panel for backtests, signals and inventory models.

### Billing and limits

This actor uses pay-per-event billing. See the [pricing tab](https://apify.com/scrapers_lat/crypto-perp-funding-oi-scraper/pricing) for current prices.

- **`apify-actor-start`** is charged once per run to cover initialization.
- **`result`** is charged once per `(symbol, exchange)` snapshot returned, including its cross-exchange summary. This is the primary event.
- **`funding_history`** is an opt-in add-on (`includeFundingHistory`, off by default). It is charged only when a real funding-rate history series is fetched and the derived average, cumulative, regime and trend fields are attached.
- **`ai_funding_signal`** is an opt-in add-on (`aiFundingSignal`, off by default). It is charged only when the AI returns usable JSON.
- **No charge on failure.** Unknown symbols or a run where no exchange responds write a single item with a populated `error` field and are not charged.
- **Add-ons are paying-only.** Both add-ons are disabled for free Apify plans, which are also capped at 10 results per run.
- **Spend cap respected.** Set `maxTotalChargeUsd` on the run; once reached, the actor stops emitting and charging further billable results.

### FAQ and troubleshooting

**Why is `xFundingSpreadAnnualizedPct` zero?**
All the exchanges that responded currently pay the same funding rate for that coin, so the spread is genuinely zero. It widens as soon as funding diverges across venues, which is exactly the arbitrage signal to watch.

**Why is `markPrice` null on OKX rows?**
OKX does not return a mark or index price on the public endpoints used here, so those fields are `null` for OKX. Bybit and Binance return them. Missing source values are never invented.

**A run returned only some exchanges. Why?**
Each exchange is fetched independently and a coin that does not list on a given venue, or a venue that is momentarily unreachable, is simply omitted from that coin's rows. `xExchangesCovered` always tells you which exchanges are included in the cross-exchange summary.

**What does a positive funding rate mean?**
Positive funding means longs pay shorts, which usually signals a long-crowded market; negative funding means shorts pay longs. The AI add-on translates this into a positioning bias and squeeze risk.

**How is annualized funding computed?**
`fundingRate * (24 / fundingIntervalHours) * 365 * 100`. All three exchanges settle funding every 8 hours, so a 0.01% per-interval rate annualizes to about 10.95%.

**Is this an official exchange tool?**
No. This actor is independent and not affiliated with Bybit, OKX or Binance. It reads only publicly available market data.

### Related scrapers

- [CoinGecko Crypto Market Scraper](https://apify.com/scrapers_lat/coingecko-crypto-scraper): spot prices, market cap and volume by coin.
- [DEX Screener Pairs Scraper](https://apify.com/scrapers_lat/dexscreener-pairs-scraper): on-chain DEX pair prices and liquidity.
- [DeFi Yield Pools Scraper](https://apify.com/scrapers_lat/defi-yield-pools-scraper): APY, TVL and IL risk across DeFi pools.
- [CFTC Commitments of Traders Scraper](https://apify.com/scrapers_lat/cftc-cot-scraper): TradFi futures positioning by reporting group.

### More scrapers at scrapers.lat

Built and maintained by [scrapers.lat](https://scrapers.lat), where we publish scrapers for public platforms: company registries, government data, finance, e-commerce and more. Browse the catalog or request a custom scraper at [scrapers.lat](https://scrapers.lat).

***

> Independent tool, not affiliated with Bybit, OKX or Binance. Accesses only publicly available market data.

# Actor input Schema

## `symbols` (type: `array`):

Base coin symbols to fetch perpetual-futures data for, e.g. BTC, ETH, SOL. Each is mapped to the USDT-margined linear perpetual on every selected exchange (BTC -> BTCUSDT / BTC-USDT-SWAP). Leave empty for BTC, ETH, SOL.

## `exchanges` (type: `array`):

Which exchanges to query. Any subset of bybit, okx, binance. Bybit and OKX are the reliable core; Binance is best-effort and skipped automatically if it is geo-blocked from the run's IP. Leave empty for all three.

## `minOpenInterestUsd` (type: `integer`):

Only return per-exchange rows whose open interest is at least this many USD. Use to skip thin markets, e.g. 10000000. Set 0 for no filter.

## `sortBy` (type: `string`):

Sort the per-exchange rows before applying the result cap. openInterest = largest open interest first. fundingRate = highest current funding first. annualizedFunding = highest annualized funding first.

## `includeFundingHistory` (type: `boolean`):

For each row, fetch that exchange's funding-rate history and attach average funding (annualized), cumulative funding over the window, current-vs-average regime and funding trend direction. Charged only when a real history series is returned. Disabled on free plans.

## `aiFundingSignal` (type: `boolean`):

Use AI to add a positioning bias (long/short crowded), squeeze risk, funding regime, cross-exchange arbitrage note and a one-line trader summary from the funding, open interest, long/short and cross-exchange spread. Charged only when a usable analysis is returned. Disabled on free plans.

## `maxResults` (type: `integer`):

Maximum number of per-exchange perp snapshots to return across the run, after filtering and sorting. Free Apify plans are capped at 10 per run.

## Actor input object example

```json
{
  "symbols": [
    "BTC",
    "ETH",
    "SOL"
  ],
  "exchanges": [
    "bybit",
    "okx",
    "binance"
  ],
  "minOpenInterestUsd": 0,
  "sortBy": "openInterest",
  "includeFundingHistory": false,
  "aiFundingSignal": false,
  "maxResults": 10
}
```

# Actor output Schema

## `results` (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 = {
    "symbols": [
        "BTC",
        "ETH",
        "SOL"
    ],
    "maxResults": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapers_lat/crypto-perp-funding-oi-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 = {
    "symbols": [
        "BTC",
        "ETH",
        "SOL",
    ],
    "maxResults": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("scrapers_lat/crypto-perp-funding-oi-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 '{
  "symbols": [
    "BTC",
    "ETH",
    "SOL"
  ],
  "maxResults": 10
}' |
apify call scrapers_lat/crypto-perp-funding-oi-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapers_lat/crypto-perp-funding-oi-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/Hv2xxjDE7nGhRaoKd/builds/l9kxdoBUu3zACCllh/openapi.json
