# Crypto Funding Rates Tracker - Binance & Hyperliquid (`automatic/crypto-funding-rates`) Actor

Perpetual funding-rate board across Binance and Hyperliquid for a symbol watchlist or the top perps by 24h turnover: rate, timestamp, mark price and annualized funding per symbol. Optional Telegram alert when funding crosses your threshold. No API keys needed. Live snapshot per run.

- **URL**: https://apify.com/automatic/crypto-funding-rates.md
- **Developed by:** [Philip Kirkbride](https://apify.com/automatic) (community)
- **Categories:** Business
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.50 / 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 Funding Rates Tracker

Collect perpetual futures funding rates for Binance USD-M and Hyperliquid perps: the latest rate, settlement time, mark price, funding cadence and annualized funding per symbol. Each run returns one record per symbol and venue, with a shared `coin` field to compare venues side by side. Use it for perp positioning analysis, funding arbitrage research and threshold alerts on Telegram.

### Quick Start

```json
{"symbols": ["BTC", "ETH", "SOL", "HYPE"], "venue": "both"}
```

With no watchlist, the run tracks the top perps by 24-hour turnover on each selected venue.

### Input

| Name | Type | Default | Meaning |
| --- | --- | --- | --- |
| `symbols` | array | `[]` | Optional watchlist of up to 100 entries, case-insensitive (`"BTC"`, `"btc"`, `"BTCUSDT"` all work). Empty tracks the top perps by 24h turnover. |
| `topSymbols` | integer | `20` | Board size per venue when no watchlist is given (5–100). |
| `venue` | string | `binance` | `binance`, `hyperliquid` or `both`. |
| `alertAbsFundingPct` | number | `0` | When above 0, each symbol whose funding magnitude reaches this percent per period sends one Telegram alert. The threshold is symmetric, so deeply negative funding counts too. `0` turns alerts off. |
| `telegramBotToken` | string | empty | Secret Telegram bot token for alerts; the `TELEGRAM_BOT_TOKEN` secret environment variable also works. |
| `telegramChatId` | string | empty | Chat that receives the alerts. |
| `requestDelaySecs` | number | `0.15` | Pause between symbols. |

### What it returns

One dataset row per symbol and venue:

| Field | Meaning |
| --- | --- |
| `recordKey` | Stable key, `funding:{venue}:{symbol}`. |
| `source`, `kind` | Record source and type. |
| `venue`, `symbol` | Venue and its symbol for the perp. |
| `coin` | Base coin, the join key across venues. |
| `fundingRate`, `fundingRatePct` | Latest funding rate, as a fraction and in percent. |
| `fundingTime` | Time of the latest funding settlement. |
| `fundingIntervalHours` | Funding cadence in hours (8, 4 or 1). |
| `fundingIntervalBasis` | How the cadence is known: `event-spacing` (observed), `venue-default` or `stale-spacing`. |
| `fundingHistoryStale` | `true` when recent settlements are too old to confirm the cadence. |
| `annualizedFundingPct` | Annualized funding in percent; `null` unless the cadence is observed. |
| `markPrice` | Mark price at the latest settlement. |
| `rateType` | Venue rate type label where provided, otherwise `null`. |
| `quoteVolume24h` | 24-hour quote turnover used for ranking. |
| `sourceUrl` | Link to the perp's trading page. |
| `collectedAt` | UTC time the snapshot was taken. |

The run summary (`OUTPUT`) reports coverage counters, the alert result and warnings such as unmatched watchlist entries. `records` counts only the rows stored in the dataset; if your maximum charge per run stops the run early, `stoppedBy` is `chargeLimit` and the summary line says how many funding records were stored.

### Output example

A real record from a run with the Quick Start input:

```json
{"recordKey":"funding:binance:BTCUSDT","source":"binance-fapi","kind":"funding_rate","venue":"binance","symbol":"BTCUSDT","coin":"BTC","fundingRate":6.542e-05,"fundingRatePct":0.006542,"fundingTime":"2026-10-21T00:00:00+00:00","fundingIntervalHours":8,"fundingIntervalBasis":"event-spacing","fundingHistoryStale":false,"annualizedFundingPct":7.1635,"markPrice":82984.7,"rateType":"Regular","quoteVolume24h":10412086707.75,"sourceUrl":"https://www.binance.com/en/futures/BTCUSDT","collectedAt":"2026-10-21T06:06:59.241744+00:00"}
```

### FAQ

**How is annualized funding computed?** From each symbol's own observed settlement cadence (8h, 4h or 1h). When the cadence cannot be confirmed from recent settlements, `fundingIntervalBasis` says so (`venue-default` or `stale-spacing`) and `annualizedFundingPct` stays `null` rather than guessing. The raw rate is always included.

**Which venues are supported?** Binance USD-M perpetuals and Hyperliquid perps. Set `venue: "both"` and join records across venues on `coin`.

**How many symbols can I track?** Up to 100 watchlist entries, or the top 20 (configurable up to 100) per venue by turnover.

**What happens if a symbol has no funding history?** It is named in the run warnings; the rest of the run continues.

### Price

**$0.0025 per result row** (one symbol on one venue), plus **$0.005 per run start**. The run-start event is charged per GB of memory; the default 512 MB run is one start event. The start is charged even if the run saves no rows. You are charged only for result rows that are actually saved to the dataset; if fetching or validation fails, no rows are saved and none are charged. Platform usage is included in these prices.

For support, contact Apify support and include the Actor run ID.

# Actor input Schema

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

Optional symbol entries (case-insensitive; 'BTC', 'btc', 'BTCUSDT' all accepted and normalized per venue). Empty tracks the top perps by 24h quote turnover.

## `topSymbols` (type: `integer`):

How many top perps (by 24h quote turnover) the board tracks per venue when no watchlist is given.

## `venue` (type: `string`):

Binance (default), Hyperliquid, or both.

## `alertAbsFundingPct` (type: `number`):

When > 0, every symbol whose funding-rate magnitude per period is at or above this percent sends one inline Telegram alert ('SYM funding x% (annualized y%) — mark z'). The threshold is symmetric: deeply negative funding counts too. 0 (the default) disables alerts entirely.

## `telegramBotToken` (type: `string`):

Bot token for the funding alerts — a secret: never share runs or datasets that expose it. Falls back to the TELEGRAM_BOT_TOKEN secret environment variable when empty. Never printed; masked in any warning line.

## `telegramChatId` (type: `string`):

Telegram chat id for the funding alerts. With telegramBotToken (or TELEGRAM_BOT_TOKEN) and alertAbsFundingPct > 0, each threshold-crossing symbol sends one inline message. A failed or skipped send is a warning, never a failed run.

## `requestDelaySecs` (type: `number`):

Pause between the per-symbol funding requests.

## Actor input object example

```json
{
  "symbols": [],
  "topSymbols": 20,
  "venue": "binance",
  "alertAbsFundingPct": 0,
  "telegramBotToken": "",
  "telegramChatId": "",
  "requestDelaySecs": 0.15
}
```

# Actor output Schema

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

No description

## `summary` (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": [],
    "topSymbols": 20,
    "venue": "binance",
    "alertAbsFundingPct": 0,
    "telegramBotToken": "",
    "telegramChatId": "",
    "requestDelaySecs": 0.15
};

// Run the Actor and wait for it to finish
const run = await client.actor("automatic/crypto-funding-rates").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": [],
    "topSymbols": 20,
    "venue": "binance",
    "alertAbsFundingPct": 0,
    "telegramBotToken": "",
    "telegramChatId": "",
    "requestDelaySecs": 0.15,
}

# Run the Actor and wait for it to finish
run = client.actor("automatic/crypto-funding-rates").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": [],
  "topSymbols": 20,
  "venue": "binance",
  "alertAbsFundingPct": 0,
  "telegramBotToken": "",
  "telegramChatId": "",
  "requestDelaySecs": 0.15
}' |
apify call automatic/crypto-funding-rates --silent --output-dataset

```

## MCP server setup

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

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/fWkTNWa0Iug0dZvtM/builds/HpRbUaYahfHgLGBwV/openapi.json
