# Crypto Perp Funding Rate Scanner: 5 Exchanges + Spreads (`cryptoretirement/crypto-perp-funding-rate-scanner`) Actor

Live funding rates, annualised yield, open interest and cross-exchange funding spreads for every USDT/USDC perpetual on 5 exchanges in one run. No API keys. Built for funding-arb screens, carry trades and AI agents.

- **URL**: https://apify.com/cryptoretirement/crypto-perp-funding-rate-scanner.md
- **Developed by:** [Craig Armstrong](https://apify.com/cryptoretirement) (community)
- **Categories:** Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.40 / 1,000 result 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/running/actors-in-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

## Crypto Perp Funding Rate Scanner

One run returns the **current funding rate, annualised yield, open interest and next funding time for every USDT/USDC perpetual** on Binance, Bybit, OKX, Hyperliquid and Gate, plus a **cross-exchange spread row per asset** that shows where funding is highest and lowest. 3,500+ contracts in about 5 seconds. No API keys, no login.

Use it for funding-arbitrage screens, carry-trade monitoring, basis dashboards, or as a tool an AI agent calls before it sizes a perp position.

### What you get

**Rate rows** (`type: "rate"`), one per contract:

| Field | Example |
|---|---|
| `base` / `quote` | `BTC` / `USDT` |
| `exchange` | `binance`, `bybit`, `okx`, `hyperliquid`, `gate` |
| `symbol` | `BTCUSDT`, `BTC-USDT-SWAP`, `BTC-PERP` |
| `markPrice` | `74422.1` |
| `fundingRatePct` | `0.0076` (per funding interval) |
| `fundingIntervalHours` | `8` (Hyperliquid is `1`, some Binance/Bybit contracts `4`) |
| `annualizedPct` | `8.29` — the rate scaled to a year, so 1h and 8h venues compare directly |
| `nextFundingTime` | ISO timestamp |
| `openInterestUsd` | where the exchange publishes it |
| `snapshotTime` | when the run took its snapshot |

**Spread rows** (`type: "spread"`), one per asset listed on 2+ exchanges: highest and lowest annualised funding, which venue each is on, and `spreadAnnualizedPct` (the number a funding-arb trade earns before fees). Spread rows come first, biggest spread on top.

Example spread row:

```json
{ "type": "spread", "base": "SUI", "exchanges": 5, "highestExchange": "binance", "highestAnnualizedPct": 10.95,
  "lowestExchange": "bybit", "lowestAnnualizedPct": -17.0, "spreadAnnualizedPct": 27.95, "snapshotTime": "2026-11-10T14:52:11.000Z" }
```

### Input

| Field | Default | Notes |
|---|---|---|
| `exchanges` | all five | Any subset |
| `assets` | empty = everything | Base assets to keep, e.g. `["BTC","ETH","SOL"]` |
| `minAbsAnnualizedPct` | `0` | Keep only rates at least this far from zero (either sign); handy for "show me extreme funding" |
| `includeSpreads` | `true` | Add the per-asset spread rows |
| `maxResults` | `2000` | Cap on rows returned |
| `proxy` | Apify residential, country AU | Used **only** for Binance and Bybit, which refuse US datacenter IPs (HTTP 451 / 403). Datacenter proxies do not work for them; residential does (about 1 MB per run). OKX, Hyperliquid and Gate are fetched directly. |

A full scan with no filters is ~3,500 rate rows + ~900 spread rows. With `assets` set to a few coins it is a handful of rows and completes in a couple of seconds.

### How the numbers are built

- Funding rates are read from each exchange's public market-data endpoint at run time (Binance `premiumIndex`, Bybit `v5/market/tickers`, OKX `public/funding-rate`, Hyperliquid `metaAndAssetCtxs`, Gate `futures/usdt/contracts`).
- `annualizedPct = fundingRate × (24 / fundingIntervalHours) × 365 × 100`. Funding intervals come from the exchange (Binance `fundingInfo`, Bybit `instruments-info`, Gate `funding_interval`, OKX funding timestamps, Hyperliquid hourly).
- Open interest is converted to USD with the mark price where the exchange gives it in contracts.
- Nothing is cached: every run is a fresh snapshot.

### Scheduling and agents

Schedule it hourly to build a funding history dataset, or call it from an AI agent / MCP client when a question needs live funding. The output is flat JSON with stable field names.

### Limits

- Exchange APIs occasionally rate-limit; a failed exchange is logged and skipped, the others still return.
- Binance and Bybit geo-block US IPs. Keep the residential proxy on (default) or those two will return nothing; the run still succeeds with the other three.
- Data only, not financial advice. Funding-arb trades carry execution, basis and liquidation risk that this scanner does not measure.

### Cost

Pay per event, no subscription. You pay only for what a run returns.

| Event | Price |
|---|---|
| Scan start, once per run | $0.01 |
| Result row | $0.0004 |

A BTC, ETH and SOL check returns about 25 rows and costs about 2 cents. A scan at the default cap of 2,000 rows costs $0.81. Set `assets` or `maxResults` to control the bill.

### Run it from code

```bash
curl -X POST "https://api.apify.com/v2/acts/cryptoretirement~crypto-perp-funding-rate-scanner/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"assets":["BTC","ETH","SOL"],"includeSpreads":true}'
```

The response is the dataset as a JSON array. The API menu on this page has ready-made snippets for JavaScript, Python and MCP clients.

### More Actors for traders and bots

- [Crypto Exchange New Listing Announcements](https://apify.com/cryptoretirement/crypto-exchange-new-listings): new coin and perpetual listings from 6 exchanges, with an alert flag.
- [Crypto Signal Scanner](https://apify.com/cryptoretirement/crypto-perp-technical-signal-scanner): Donchian breakouts, golden and death crosses and Supertrend flips on the top Bybit perpetuals.
- [Crypto Session Box Levels & Liquidity Sweep Detector](https://apify.com/cryptoretirement/crypto-session-box-liquidity-sweep-detector): prior-day and session boxes, wick setups and liquidity sweeps.
- [Forex News Filter & Economic Calendar](https://apify.com/cryptoretirement/forex-news-filter-economic-calendar): this week's economic events and a high-impact news window check for bots.
- [Solana Token Rug Check + Coin Score](https://apify.com/cryptoretirement/solana-token-rug-check-and-score): rug gates, a honeypot sell test and a 0-100 score for any Solana token.
- [DEX Pool Health Score](https://apify.com/cryptoretirement/dex-pool-health-score): health and rug-risk score for any liquidity pool on 100+ networks.
- [YouTube Most Replayed Clip Finder](https://apify.com/cryptoretirement/youtube-most-replayed-clip-finder): the most replayed moments of any video as ready-to-cut clips.

# Actor input Schema

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

Which exchanges to scan. All are public endpoints, no keys needed.

## `assets` (type: `array`):

Base assets to include, e.g. BTC, ETH, SOL. Leave empty for every perpetual on the selected exchanges.

## `minAbsAnnualizedPct` (type: `integer`):

Only return rates whose annualised funding is at least this far from zero (either sign). 0 = everything.

## `includeSpreads` (type: `boolean`):

Adds one row per asset with the highest and lowest funding across exchanges and the spread between them (the funding-arb number).

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

Caps the number of rows pushed to the dataset (and charged).

## `proxy` (type: `object`):

Binance (HTTP 451) and Bybit (HTTP 403) refuse US datacenter IPs, which is where Apify runs, so those two exchanges are fetched through this proxy. Tested working: Apify residential proxy, country AU (about 1 MB of traffic per run). Datacenter proxies do NOT work for them. OKX, Hyperliquid and Gate never use the proxy.

## Actor input object example

```json
{
  "exchanges": [
    "binance",
    "bybit",
    "okx",
    "hyperliquid",
    "gate"
  ],
  "assets": [
    "BTC",
    "ETH",
    "SOL"
  ],
  "minAbsAnnualizedPct": 0,
  "includeSpreads": true,
  "maxResults": 2000,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "AU"
  }
}
```

# Actor output Schema

## `results` (type: `string`):

One item per perpetual contract (type=rate) with funding rate, annualised yield, open interest and next funding time, plus one item per asset (type=spread) with the best long/short exchange pair and the annualised spread.

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

snapshotTime, exchanges scanned, perpsScanned, rowsReturned, spreads and the top spread.

# 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 = {
    "exchanges": [
        "binance",
        "bybit",
        "okx",
        "hyperliquid",
        "gate"
    ],
    "assets": [
        "BTC",
        "ETH",
        "SOL"
    ],
    "proxy": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "AU"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("cryptoretirement/crypto-perp-funding-rate-scanner").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 = {
    "exchanges": [
        "binance",
        "bybit",
        "okx",
        "hyperliquid",
        "gate",
    ],
    "assets": [
        "BTC",
        "ETH",
        "SOL",
    ],
    "proxy": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "AU",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("cryptoretirement/crypto-perp-funding-rate-scanner").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 '{
  "exchanges": [
    "binance",
    "bybit",
    "okx",
    "hyperliquid",
    "gate"
  ],
  "assets": [
    "BTC",
    "ETH",
    "SOL"
  ],
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "AU"
  }
}' |
apify call cryptoretirement/crypto-perp-funding-rate-scanner --silent --output-dataset

```

## MCP server setup

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

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/TR9OwF8k9QwBZAb2o/builds/1weUlG227cxNOopEZ/openapi.json
