# Binance Futures & Funding Rates Scraper (`ninhothedev/binance-futures-scraper`) Actor

$0.5/1K 🔥 Crypto futures scraper! Perpetual prices, funding rates & open interest across Gate, KuCoin, MEXC, Hyperliquid & more. No key. JSON, CSV, Excel or API in seconds. Fuel trading bots ⚡

- **URL**: https://apify.com/ninhothedev/binance-futures-scraper.md
- **Developed by:** [ninhothedev](https://apify.com/ninhothedev) (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 $0.50 / 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.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#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

## Multi-Exchange Perpetual Futures & Funding Rates Scraper

Scrape **perpetual futures** from six venues without an API key: live perp prices, mark and index price, **funding rates**, next funding time, **open interest**, 24h stats and **long/short account ratios**. Export to JSON, CSV, Excel or push straight into your trading bot, spreadsheet or database.

Supported venues: **gate.io · KuCoin · MEXC · Hyperliquid · BitMEX · Binance**

No login. No API key. No secrets. Just run it.

***

### Important: Binance blocks datacenter IPs — `auto` handles it

Binance answers **HTTP 451 "Service unavailable from a restricted location"** to most datacenter IP ranges, including the ones Apify runs on. A Binance-only scraper simply cannot return data from the Apify cloud, no matter how well it is written.

This actor solves that with a **source chain**. With the default `exchange: "auto"` it tries venues in this order and keeps the **first one that actually returns rows**, logging which source won:

```
gate.io  →  KuCoin  →  MEXC  →  Hyperliquid  →  BitMEX  →  Binance
```

Binance is deliberately **last**, because it is the one known to be blocked. Every other source in that chain was verified returning **HTTP 200 with real data from a US datacenter IP**, so a normal run needs no proxy at all.

If you specifically want Binance data (or `longshort` mode, which only Binance publishes), add a **residential** proxy under *Proxy configuration* — see below.

***

### What it scrapes

#### Mode `tickers` — every perpetual, with its funding rate

The full contract table from the winning venue: symbol, last price, mark price, index price, 24h change %, high/low, volume, quote volume, **funding rate**, **funding rate %**, funding interval, **next funding time** and **open interest**. Leave `symbols` empty to get every perpetual on that venue (860 on gate.io, 1,036 on MEXC, 674 on KuCoin, 177 on Hyperliquid, 45 on BitMEX at time of writing).

#### Mode `funding` — funding rate history

Historical funding settlements per symbol. Supported on **all six venues** — the chain falls through exactly as it does for tickers.

#### Mode `longshort` — retail positioning sentiment

Global long/short account ratios at 5m / 15m / 1h / 4h / 1d granularity. **This is a Binance-only dataset** — no other venue here publishes an equivalent keyless endpoint. On Apify it therefore **requires a residential proxy**; without one the run fails with an error that says exactly that, rather than a generic "no items".

#### Support matrix

| Mode | gate.io | KuCoin | MEXC | Hyperliquid | BitMEX | Binance |
|---|---|---|---|---|---|---|
| `tickers` | ✅ | ✅ | ✅ | ✅ | ✅ | ⚠️ proxy |
| `funding` | ✅ | ✅ | ✅ | ✅ | ✅ | ⚠️ proxy |
| `longshort` | ❌ | ❌ | ❌ | ❌ | ❌ | ⚠️ proxy |

⚠️ = works, but needs a residential proxy from an Apify datacenter IP.

***

### Field coverage per venue — what is real, what is `null`

Fields a venue does not publish are **`null`**. This actor never fabricates a number and never cross-fills one field from another.

| Field | gate.io | KuCoin | MEXC | Hyperliquid | BitMEX | Binance |
|---|---|---|---|---|---|---|
| `last_price` | ✅ | ✅ | ✅ | **`null`** ¹ | ✅ | ✅ |
| `mark_price` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| `index_price` | ✅ | ✅ | ✅ | ✅ (oracle) | ✅ | ✅ |
| `mid_price` | – | – | – | ✅ | – | – |
| `funding_rate` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| `funding_interval_hours` | 8 | 8 | **`null`** ² | **1** ³ | 8 | 8 |
| `open_interest` (base units) | ✅ | ✅ | **`null`** ⁴ | ✅ | ✅ ⁵ | ✅ ⁶ |
| `volume_24h` (base units) | ✅ | ✅ | **`null`** ⁴ | ✅ | ✅ | ✅ |
| `quote_volume_24h` (USD) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| `high_24h` / `low_24h` | ✅ | ✅ | ✅ | **`null`** | ✅ | ✅ |
| `trade_count` | – | – | – | – | – | ✅ |

1. Hyperliquid publishes no last-trade price in this endpoint. It gives a **mid price**, exposed as its own `mid_price` field — it is never passed off as `last_price`. `price_change_pct_24h` is *derived* from Hyperliquid's `prevDayPx`.
2. MEXC's ticker payload carries no funding interval (its history endpoint reports an 8h `collectCycle`).
3. **Hyperliquid settles funding every hour**, not every 8 hours like the CEXs. Do not compare its raw rate to an 8h venue without annualising first.
4. MEXC reports volume and open interest **in contracts** with no contract size in the payload, so the base-unit fields stay `null`. The raw value is still available in `open_interest_contracts`.
5. BitMEX inverse contracts (e.g. `XBTUSD`) have no position multiplier, so their `open_interest` is `null` while `open_interest_contracts` is populated.
6. Binance open interest costs one request per symbol, so it is filled only when you pass an explicit short `symbols` list.

**Units are normalised for you:** `funding_rate` is always a fraction (`0.000045`) and `funding_rate_pct` always a percent (`0.0045`), regardless of whether the venue published a fraction or an already-percent string. `open_interest` is always base units (BTC, ETH, …) with `open_interest_contracts` + `open_interest_unit` alongside it for full transparency.

***

### What are funding rates? (and why traders pay for this data)

A perpetual futures contract never expires, so there's nothing forcing its price to converge with spot. **Funding rates** are the mechanism that does it: every few hours, longs and shorts pay each other a small fee.

- **Positive funding rate** → the perp trades *above* spot; **longs pay shorts**. The crowd is bullish and leveraged.
- **Negative funding rate** → the perp trades *below* spot; **shorts pay longs**. The crowd is bearish.

Because the rate is paid ~3× per day (24× per day on Hyperliquid), small numbers compound hard. A funding rate of `0.01%` per 8 hours is roughly **11% APR**. That is the entire basis of the **cash-and-carry / funding-rate arbitrage** trade: hold spot, short the perpetual, collect funding, stay market-neutral.

Because this actor covers six venues, it is also the raw material for **cross-exchange funding spreads** — the same contract can pay very different rates on gate.io, KuCoin and Hyperliquid at the same moment.

**Open interest** is the total size of contracts currently open. Rising OI + rising price = new money entering a trend. Rising OI + flat price = a squeeze building.

***

### Use cases

- **Funding-rate arbitrage** — scan every perpetual on a venue for the highest positive funding, hedge with spot, harvest a market-neutral yield.
- **Cross-exchange funding spreads** — run the actor once per `exchange` and compare the same symbol across six venues.
- **Derivatives research** — mark vs index spread, basis monitoring, open-interest trends.
- **Market sentiment** — funding extremes and long/short ratios to spot over-leveraged crowds before squeezes.
- **Trading bots & alerting** — schedule every few minutes, feed clean JSON to your bot, webhook on a funding threshold.
- **Backtesting** — pull funding settlement history per symbol to model carry-strategy returns.

***

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | select | `tickers` | `tickers`, `funding` or `longshort` |
| `exchange` | select | `auto` | `auto`, `gate`, `kucoin`, `mexc`, `hyperliquid`, `bitmex`, `binance` |
| `symbols` | array | `["BTCUSDT","ETHUSDT"]` | Binance-style symbols, auto-translated per venue. **Empty in `tickers` mode = all perpetuals.** |
| `period` | select | `1h` | `5m` / `15m` / `1h` / `4h` / `1d` — long/short granularity |
| `symbolFilter` | string | – | Substring filter, e.g. `USDT` |
| `maxItems` | integer | `500` | Cap on rows (max 5000) |
| `proxyConfiguration` | object | – | **Optional.** See below. |

You always write symbols the familiar way — `BTCUSDT` — and the actor translates them:

| You write | gate.io | KuCoin | MEXC | Hyperliquid | BitMEX | Binance |
|---|---|---|---|---|---|---|
| `BTCUSDT` | `BTC_USDT` | `XBTUSDTM` | `BTC_USDT` | `BTC` | `XBTUSDT` | `BTCUSDT` |

```json
{
  "mode": "tickers",
  "exchange": "auto",
  "symbols": [],
  "symbolFilter": "USDT",
  "maxItems": 500
}
```

#### Proxy configuration (optional)

**You do not need a proxy for normal runs.** gate.io, KuCoin, MEXC, Hyperliquid and BitMEX all answer a plain Apify datacenter IP, and `auto` uses them first.

Add a proxy only if you want Binance specifically, or `longshort` mode. Binance blocks datacenter IPs, so a **residential** proxy in a Binance-permitted country is required:

```json
{
  "mode": "longshort",
  "symbols": ["BTCUSDT"],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"],
    "apifyProxyCountry": "DE"
  }
}
```

### Output

Every row carries an **`exchange`** field so you can merge runs from different venues into one dataset.

**Ticker** (real row, gate.io via `auto`):

```json
{
  "type": "ticker",
  "exchange": "gate",
  "symbol": "BTC_USDT",
  "base_asset": "BTC",
  "quote_asset": "USDT",
  "last_price": 63385.0,
  "mark_price": 63386.6,
  "index_price": 63390.11,
  "mid_price": null,
  "price_change_pct_24h": -1.98,
  "high_24h": 65063.8,
  "low_24h": 62712.6,
  "volume_24h": 55490.0,
  "quote_volume_24h": 3536355656.0,
  "trade_count": null,
  "funding_rate": 0.000044,
  "funding_rate_pct": 0.0044,
  "funding_interval_hours": 8.0,
  "next_funding_time": "2026-07-28T16:00:00+00:00",
  "open_interest": 63402.9136,
  "open_interest_contracts": 634029136.0,
  "open_interest_unit": "base",
  "source": "gate-futures",
  "scraped_at": "2026-07-28T14:22:31+00:00"
}
```

**Funding history:**

```json
{
  "type": "funding",
  "exchange": "gate",
  "symbol": "BTC_USDT",
  "funding_rate": -0.000003,
  "funding_rate_pct": -0.0003,
  "funding_interval_hours": 8.0,
  "funding_time": "2026-07-28T08:00:01+00:00",
  "mark_price": null,
  "source": "gate-futures",
  "scraped_at": "2026-07-28T14:22:31+00:00"
}
```

**Long/short ratio** (Binance only):

```json
{
  "type": "longshort",
  "exchange": "binance",
  "symbol": "BTCUSDT",
  "long_short_ratio": 1.8637,
  "long_account_pct": 65.08,
  "short_account_pct": 34.92,
  "timestamp": "2026-07-28T13:00:00+00:00",
  "period": "1h",
  "source": "binance-futures",
  "scraped_at": "2026-07-28T14:22:31+00:00"
}
```

All timestamps are ISO-8601 UTC. All numeric fields are real numbers, not strings. Every field is nullable — a missing value is `null`, never a crash.

***

### Pricing

Roughly **$0.5 per 1,000 items**, plus Apify platform compute. A full `tickers` run covering every perpetual on a venue is a single-digit-cent job and finishes in seconds — it uses one or two bulk API calls.

### Notes & limits

- Uses only **public, unauthenticated** endpoints. No API key, no account.
- **Binance returns HTTP 451 on datacenter IPs.** Leave `exchange` on `auto` (the default) and the actor routes around it automatically; pick `binance` explicitly only together with a residential proxy.
- Long/short ratios exist **only on Binance**. If that mode returns nothing, the error message names the reason rather than failing generically.
- Venue quirks (Hyperliquid's hourly funding and missing last price, MEXC's contract-denominated volume) are documented in the coverage table above and encoded in the field values as `null`.
- Open interest on Binance is fetched only when you pass an explicit short `symbols` list (one request per symbol).

### Related actors

- [Binance Crypto Scraper](https://apify.com/ninhothedev/binance-crypto-scraper) — **spot** market prices and 24h stats
- [Deribit Scraper](https://apify.com/ninhothedev/deribit-scraper) — options and futures on Deribit
- [OKX Scraper](https://apify.com/ninhothedev/okx-scraper) — OKX market data
- [Bybit Crypto Scraper](https://apify.com/ninhothedev/bybit-crypto-scraper) — Bybit spot and derivatives

### Disclaimer

Collects publicly available market data only. Not financial advice. Trading leveraged perpetual futures carries substantial risk of loss.

# Actor input Schema

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

What to scrape. 'tickers' = 24h stats for every perpetual contract joined with its live funding rate, mark price and open interest. 'funding' = historical funding-rate settlements for the symbols you list. 'longshort' = global long/short account ratios (retail positioning sentiment) — a BINANCE-ONLY dataset that needs a proxy on Apify, see the README.

## `exchange` (type: `string`):

Which venue to scrape. Leave on 'auto' (recommended): the actor tries gate.io → KuCoin → MEXC → Hyperliquid → BitMEX → Binance and keeps the first one that answers, logging which source won. Binance is tried LAST on purpose — it returns HTTP 451 to most datacenter IPs, including Apify's, so pick it only together with a residential proxy. 'longshort' mode always uses Binance because no other venue publishes that data.

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

Perpetual symbols to scrape, written in the usual Binance style: BTCUSDT, ETHUSDT, SOLUSDT. They are translated automatically to each venue's own notation (BTC\_USDT on gate.io/MEXC, XBTUSDTM on KuCoin, XBTUSDT on BitMEX, BTC on Hyperliquid). Required for 'funding' and 'longshort' (defaults to BTCUSDT + ETHUSDT if left empty). In 'tickers' mode leave EMPTY to get every perpetual contract on the winning venue.

## `period` (type: `string`):

Candle interval for the long/short account ratio series in 'longshort' mode. Shorter periods give more granular sentiment, longer ones cover more history. Ignored in 'tickers' and 'funding' modes.

## `symbolFilter` (type: `string`):

Optional case-insensitive substring filter applied to symbol, base asset and quote asset in 'tickers' mode. Use 'USDT' for USDT-margined perpetuals only, 'USDC' for USDC pairs, or 'BTC' for every Bitcoin-related contract. Leave empty for no filtering.

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

Hard cap on how many dataset rows this run produces. In 'tickers' mode the highest-quote-volume contracts are kept first. Use a low value for quick test runs to save compute units.

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

OPTIONAL. Every default source (gate.io, KuCoin, MEXC, Hyperliquid, BitMEX) answers a plain Apify datacenter IP, so you do not need a proxy for normal runs. Add one only if you specifically want Binance data or 'longshort' mode — Binance blocks datacenter IPs with HTTP 451, and a RESIDENTIAL proxy in a Binance-permitted country routes around it.

## Actor input object example

```json
{
  "mode": "tickers",
  "exchange": "auto",
  "symbols": [
    "BTCUSDT",
    "ETHUSDT"
  ],
  "period": "1h",
  "symbolFilter": "USDT",
  "maxItems": 500,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# 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": [
        "BTCUSDT",
        "ETHUSDT"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("ninhothedev/binance-futures-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": [
        "BTCUSDT",
        "ETHUSDT",
    ],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("ninhothedev/binance-futures-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": [
    "BTCUSDT",
    "ETHUSDT"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call ninhothedev/binance-futures-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=ninhothedev/binance-futures-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/cgTs1oPrXNlog0XNR/builds/5Eq32ZPE6xaNP9e5S/openapi.json
