# Funding Rate Scanner (`agent_muse/funding-rate-scanner`) Actor

Scan perp funding rates on Gate.io, KuCoin and Hyperliquid in one run — funding rate, annualized APR, mark price and next funding time per symbol, biggest payouts on top. Built for funding-rate arbitrage and carry trades. Official exchange APIs, no keys.

- **URL**: https://apify.com/agent\_muse/funding-rate-scanner.md
- **Developed by:** [John Israel Lofamia](https://apify.com/agent_muse) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

## Funding Rate Scanner — crypto perp funding rates across exchanges

Every 8 hours (or every hour on Hyperliquid), perpetual-futures traders pay
each other a **funding rate** — and when a coin's funding spikes to ±1% or
more, someone is getting paid handsomely to hold the other side. This Actor
scans the perpetual markets of **Gate.io, KuCoin and Hyperliquid** in one run
and returns every symbol's funding rate, annualized APR, mark price and next
funding time — sorted by |funding rate| so the biggest payouts are on top.

### The trade it hunts

- **Funding-rate arbitrage**: when the same coin pays 0.5% funding on one
  exchange and 0.01% on another, long the cheap-funding venue and short the
  expensive one — delta-neutral, pocket the spread every funding interval.
- **Carry harvesting**: a deeply negative funding rate means shorts *pay you*
  to stay short; a high positive rate pays you to stay long on spot + short
  the perp.
- **Crowding radar**: extreme funding = crowded, overheated positioning —
  often the other side of the next squeeze.

`fundingRateApr` annualizes each rate (rate × intervals/day × 365), so an
hourly Hyperliquid rate and an 8-hour KuCoin rate compare apples-to-apples.

### Sources (official, keyless, no scraping)

- **Gate.io** — USDT-M perpetuals (per-contract funding interval + next
  funding time from the official contracts API; intervals vary 1h/4h/8h).
- **KuCoin** — USDT-M perpetuals (funding rate, 8h schedule, next funding
  time from the contracts API).
- **Hyperliquid** — perpetuals (hourly funding rate + mark price from the
  public info API).

Binance and Bybit perp APIs geo-block US-based IPs (including Apify cloud),
so they are excluded rather than shipped broken. OKX's funding endpoint is
per-instrument and throttled — full coverage would take ~15 minutes per run.

### Input

- **Exchanges** (required, default all three) — pick any of `gate`,
  `kucoin`, `hyperliquid`.
- **Minimum |funding rate|** (default 0.0001 = 0.01% per interval) — ignore
  the noise, keep only symbols paying or charging real money.
- **Max symbols** (default 50) — top-N by |funding rate|.

### Output

One dataset row per symbol per exchange: symbol, exchange, fundingRate
(positive = longs pay shorts), fundingRateApr, markPrice, nextFundingTime
(UTC) and intervalHours — sorted by |fundingRate| descending.

### Pricing

Pay-per-event: **$0.02 per run** + **$0.005 per funding-rate row** saved.
Run it on a schedule and pay only for the rows it returns.

# Actor input Schema

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

Exchanges to scan: "gate" (Gate.io USDT-M perps), "kucoin" (KuCoin USDT-M perps), "hyperliquid" (Hyperliquid perps). Unknown names are skipped with a warning.

## `maxSymbols` (type: `integer`):

Maximum funding-rate rows to return (highest |funding rate| first).

## `minAbsFundingRate` (type: `number`):

Skip symbols whose |funding rate| is below this per-interval rate (0.0001 = 0.01% per funding interval). 0 = no minimum.

## Actor input object example

```json
{
  "exchanges": [
    "gate",
    "kucoin",
    "hyperliquid"
  ],
  "maxSymbols": 50,
  "minAbsFundingRate": 0.0001
}
```

# Actor output Schema

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

Link to the dataset with all funding-rate rows, sorted by |funding rate| descending.

# 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": [
        "gate",
        "kucoin",
        "hyperliquid"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("agent_muse/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": [
        "gate",
        "kucoin",
        "hyperliquid",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("agent_muse/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": [
    "gate",
    "kucoin",
    "hyperliquid"
  ]
}' |
apify call agent_muse/funding-rate-scanner --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,agent_muse/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/BVwnH4TBogQNR02Up/builds/p84M7aHoRQalHszWC/openapi.json
