# Funding Rate Arbitrage Scanner (`0xgollum/funding-rate-arbitrage`) Actor

Compares perpetual futures funding rates for BTC, ETH, SOL and more across 7 exchanges — OKX, Bybit, Gate.io, KuCoin, Bitget, MEXC and Binance — and flags delta-neutral arbitrage spreads and crowded-positioning extremes.

- **URL**: https://apify.com/0xgollum/funding-rate-arbitrage.md
- **Developed by:** [0xGollum](https://apify.com/0xgollum) (community)
- **Categories:** Automation, Developer tools, Agents
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.40 / 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/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

## Funding Rate Arbitrage Scanner ⚖️

**Find risk-free-ish funding spreads between exchanges before you scan them by hand.**

Perpetual futures charge a funding fee every 8 hours between longs and shorts. That fee is never quite the same on OKX, Bybit, Gate.io, KuCoin, Bitget, MEXC and Binance for the same asset — and when the gap is wide enough, traders go long on the cheap side and short on the expensive side: a delta-neutral position that pockets the spread regardless of which way the market moves.

This actor watches that spread for you, across **7 exchanges**, continuously — including Binance, which most scrapers skip because its API geo-blocks datacenter IPs (this actor routes around that automatically, see Sources below).

Searches this actor ranks for: crypto funding rate arbitrage, perpetual futures funding scanner, delta-neutral arbitrage bot, cross-exchange funding rate comparison, Binance funding rate API, OKX Bybit KuCoin funding arbitrage, crowded positioning signal.

### Why this actor exists

Checking funding rates by hand means opening four tabs, converting four different rate conventions to a comparable annualized number, and doing the long/short math yourself — every time you want to know if there's an edge right now. This actor does that comparison continuously and only surfaces a row when there's actually something to act on.

It doesn't stop at "here's a spread" — every `arbitrage_opportunity` also ships a `confidence_score` and `execution_risk` so you can tell a comfortable edge from one that's barely above the actionable threshold and could vanish before you get filled.

### What you get

Two row types:

- **Snapshot** — current funding rate (raw + annualized %) per symbol per exchange
- **Signal** — a named, fired condition:

| Signal | Meaning |
|--------|---------|
| `arbitrage_opportunity` | Cross-exchange funding spread wide enough to be worth a delta-neutral position — tells you exactly which exchange to long and which to short, plus a confidence score and execution-risk tier |
| `extreme_funding` | A single exchange's funding rate is unusually hot — crowded positioning, useful context even without a counterparty |

No history needed: the spread is actionable the moment it's observed.

#### Confidence & execution risk

A spread that just barely clears the minimum threshold can slip back under it — or get eaten by fees and slippage — before you actually place the trade. The further above the threshold, the safer the edge:

| `execution_risk` | Meaning |
|---|---|
| `low` | Spread is 3x+ the minimum threshold — comfortable room |
| `medium` | Spread is 1.5x–3x the threshold |
| `high` | Spread just cleared the threshold — thin margin, act fast or skip |

`confidence_score` (0–1) is the same signal on a continuous scale, for anyone who wants to threshold it themselves rather than use the three tiers.

### Sources (all public, no API key from you)

**OKX, Gate.io, KuCoin, Bitget, MEXC** — direct, key-less perpetual-futures endpoints. **Binance and Bybit** both block requests from datacenter IPs — this actor routes just those two calls through Apify's residential proxy automatically. Nothing to configure on your end, no proxy plan required, no API key anywhere.

### Who this is for

| You are a... | You use this to... |
|---|---|
| Funding arbitrageur | Scan 7 exchanges at once for a spread wide enough to run a delta-neutral position, with a confidence score so you know which ones are worth acting on |
| Perp trader | Spot crowded/extreme funding on a single exchange before opening a position |
| Bot builder | Feed clean, normalized JSON signals into your own execution pipeline — no per-exchange parsing to write |
| Researcher / model builder | Backtest funding-rate divergence across CEXs without stitching 7 different APIs yourself |

### Input (all optional)

| Field | Default | Description |
|-------|---------|--------------|
| `symbols` | `["BTC","ETH","SOL"]` | Assets to compare (also supports XRP, DOGE) |
| `exchanges` | all 7 | Which exchanges to include: okx, bybit, gateio, kucoin, bitget, mexc, binance |
| `min_spread_apr_pct` | `32.85` | Minimum annualized spread between two exchanges to fire `arbitrage_opportunity` |
| `extreme_funding_apr_pct` | `54.75` | Single-exchange annualized funding to fire `extreme_funding` |

### Output

```json
{
  "type": "signal",
  "signal": "arbitrage_opportunity",
  "symbol": "BTC",
  "long_exchange": "bybit",
  "short_exchange": "kucoin",
  "spread_annualized_pct": 41.2,
  "confidence_score": 0.87,
  "execution_risk": "low",
  "message": "BTC: go long on bybit (funding 0.0100%), short on kucoin (funding 0.0550%) — spread 41.2% APR (confidence 0.87, low execution risk)."
}
```

### Pricing

**Pay per result:** **$0.002 per row** (snapshots + signals). Scanning 3 symbols × 7 exchanges is still a fraction of a cent per run.

### Tips

- **Schedule it** every 15–30 min to catch spreads as they open and close.
- Widen `symbols` to cover more assets — more comparisons, more chances at a spread.
- Remember: funding-rate arbitrage is delta-neutral but not risk-free (execution slippage, exchange risk, margin requirements). This actor surfaces the spread — you manage the trade.

### Roadmap

- More symbols beyond the current five, on request
- Considering: a rolling history mode for spreads that persist across multiple runs, not just instant snapshots
- Evaluating a couple more exchanges (Hyperliquid, Bitfinex) if there's demand

***

*⚠️ Not financial advice. Perpetual futures involve leverage and real risk. This actor surfaces market data — it does not execute trades or guarantee profit. All data from public exchange APIs.*

# Actor input Schema

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

Base assets to compare across exchanges (e.g. BTC, ETH, SOL, XRP, DOGE).

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

Which exchanges to include: okx, bybit, gateio, kucoin, bitget, mexc, binance. Default is all seven. Binance is routed through a residential proxy automatically (it geo-blocks datacenter IPs) — no setup needed on your end.

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

Minimum annualized funding-rate spread between two exchanges to fire an arbitrage\_opportunity signal.

## `extreme_funding_apr_pct` (type: `number`):

Single-exchange funding rate (annualized) at/above which extreme\_funding fires, signalling crowded positioning.

## Actor input object example

```json
{
  "symbols": [
    "BTC",
    "ETH",
    "SOL"
  ],
  "exchanges": [
    "okx",
    "bybit",
    "gateio",
    "kucoin",
    "bitget",
    "mexc",
    "binance"
  ],
  "min_spread_apr_pct": 32.85,
  "extreme_funding_apr_pct": 54.75
}
```

# 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("0xgollum/funding-rate-arbitrage").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("0xgollum/funding-rate-arbitrage").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 '{}' |
apify call 0xgollum/funding-rate-arbitrage --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=0xgollum/funding-rate-arbitrage",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

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