# Crypto Funding Rates, Open Interest & Liquidations Scraper (`yugenox/crypto-derivatives-scraper`) Actor

Perpetual futures data from OKX, Gate, Bitget, MEXC, Hyperliquid and Deribit in one table: funding rates (current, 8 h, yearly, history), open interest, volume, mark/index price, liquidations and Deribit options (put/call, ATM IV, max pain). No API key.

- **URL**: https://apify.com/yugenox/crypto-derivatives-scraper.md
- **Developed by:** [Yugenox Corp](https://apify.com/yugenox) (community)
- **Categories:** Business, Developer tools
- **Features:** Limited permissions
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 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, Open Interest & Liquidations Scraper

Get **perpetual futures data from six exchanges in one table**: OKX, Gate, Bitget, MEXC, Hyperliquid and Deribit. For every perpetual market you get the **current funding rate** (as published, scaled to 8 hours and as a yearly %), the **next funding time**, **open interest** and **24 h volume** in coins and in US dollars, mark / index / last price, best bid and ask, 24 h change and maximum leverage. Add **funding-rate history** (up to 90 days back), **recent liquidations** (OKX and Gate) and **Deribit options** (open interest by expiry, put/call ratio, at-the-money implied volatility, max pain, and every option contract with its mark IV). Pick coins like `BTC`, `ETH`, `SOL`, `PEPE`, or leave Coins empty to get every market sorted by open interest. No API key, no account, no login.

### What you get

| Data type | One row per | Main columns |
|---|---|---|
| **Perpetual markets** | market per exchange (≈ 4,000 in total) | mark, index, last, bid, ask, 24 h change / high / low, funding rate + interval + 8 h rate + yearly %, next funding time, open interest (coins, USD), 24 h volume (coins, USD), max leverage |
| **Funding-rate history** | past funding payment | time, funding rate, interval, 8 h rate, yearly % |
| **Liquidations** | liquidation order (OKX, Gate) | time, side (long / short), price, size in coins and USD |
| **Options by expiry** | Deribit underlying × expiry | call and put open interest, put/call ratio, 24 h call / put volume, ATM implied volatility, max-pain strike, underlying price, days to expiry |
| **Option contracts** | Deribit option | call / put, strike, expiry, premium (also in USD), mark IV, bid / ask, open interest, volume |

Every row has the same columns, so one dataset can hold all five types (`type` tells them apart). The same coin lines up across exchanges in `asset`: `1000PEPE` (MEXC, Bitget …) and `kPEPE` (Hyperliquid) both become `PEPE`, with `unitMultiplier` = 1000.

### How to use it

1. Enter **Coins**, e.g. `BTC`, `ETH`, `SOL`. Market names work too (`BTCUSDT`, `BTC-USDT-SWAP`, `BTC_USDT`). Leave it empty for every market.
2. Choose **Data to include**: perpetual markets (the default), funding-rate history, liquidations, options by expiry, option contracts.
3. Optionally narrow **Exchanges**, **Margin type** (linear USDT/USDC or inverse coin-margined) and **Minimum open interest (USD)**.
4. Set **Max rows** and run. A snapshot of BTC on all six exchanges takes a few seconds.

#### Input examples

BTC on all six exchanges, funding rate and open interest side by side (12 rows):

```json
{
  "symbols": ["BTC"],
  "maxItems": 20
}
```

Every perpetual market with at least $10M open interest, for a funding-arbitrage screen (schedule it hourly):

```json
{
  "minOpenInterestUsd": 10000000,
  "maxItems": 0
}
```

30 days of funding-rate history for ETH and SOL on every exchange:

```json
{
  "symbols": ["ETH", "SOL"],
  "include": ["fundingHistory"],
  "fundingHistoryDays": 30,
  "maxItems": 0
}
```

Recent liquidations for the 20 largest markets on OKX and Gate:

```json
{
  "include": ["liquidations"],
  "exchanges": ["okx", "gate"],
  "maxMarkets": 20,
  "maxItems": 2000
}
```

Deribit BTC and ETH options: one summary row per expiry plus every contract:

```json
{
  "symbols": ["BTC", "ETH"],
  "include": ["options", "optionContracts"],
  "exchanges": ["deribit"],
  "maxItems": 0
}
```

### Output examples

A perpetual market (OKX, 2026-11-02):

```json
{
  "type": "perpetual",
  "exchange": "okx",
  "symbol": "BTC-USDT-SWAP",
  "asset": "BTC",
  "quoteAsset": "USDT",
  "settleAsset": "USDT",
  "contractType": "linear",
  "unitMultiplier": 1,
  "markPrice": 77496.7,
  "lastPrice": 77500,
  "bidPrice": 77500,
  "askPrice": 77500.1,
  "priceChange24hPct": -0.7642,
  "fundingRate": 0.0001,
  "fundingIntervalHours": 8,
  "fundingRate8h": 0.0001,
  "fundingRateAnnualizedPct": 10.95,
  "nextFundingTime": "2026-11-03T00:00:00.000Z",
  "openInterest": 33643.7449,
  "openInterestUsd": 2607844420.31,
  "volume24h": 55183.0806,
  "volume24hUsd": 4276688746.5,
  "maxLeverage": 100,
  "time": "2026-11-02T17:01:51.368Z",
  "url": "https://www.okx.com/trade-swap/btc-usdt-swap"
}
```

A funding payment (Hyperliquid pays every hour; `fundingRate8h` makes it comparable with 8-hour exchanges):

```json
{ "type": "fundingHistory", "exchange": "hyperliquid", "symbol": "BTC", "asset": "BTC", "fundingRate": 0.0000125, "fundingIntervalHours": 1, "fundingRate8h": 0.0001, "fundingRateAnnualizedPct": 10.95, "time": "2026-11-02T08:00:00.051Z" }
```

A liquidation:

```json
{ "type": "liquidation", "exchange": "okx", "symbol": "BTC-USDT-SWAP", "asset": "BTC", "liquidationSide": "long", "liquidationPrice": 77889.6, "liquidationSize": 0.0025, "liquidationUsd": 194.72, "time": "2026-11-02T07:47:46.258Z" }
```

An options expiry (Deribit):

```json
{ "type": "optionsExpiry", "exchange": "deribit", "symbol": "BTC-6NOV26", "asset": "BTC", "expiry": "2026-11-06T08:00:00.000Z", "daysToExpiry": 3.978, "underlyingPrice": 78146.5, "callOpenInterest": 20321.1, "putOpenInterest": 6863.7, "putCallRatio": 0.3378, "openInterestUsd": 2122666116.96, "atmIv": 37.92, "maxPainStrike": 80000, "contracts": 54 }
```

A value an exchange doesn't publish is `null` (for example Deribit has no next funding time because it funds continuously).

### Pricing

Pay per event, nothing else:

- **$2.00 per 1,000 rows** ($0.002 per row) — any row type.
- **$0.002 per run** (Actor start).
- **$0.10 per 1,000 market lookups that find nothing** ($0.0001 each) — only with funding-rate history or liquidations, for a market that had no records in the window. Lookups that fail are never charged.

A BTC snapshot on all six exchanges (12 rows) costs about $0.026. Every perpetual market on all six exchanges (≈ 4,000 rows) costs about $8. Duplicates, rows over your **Max rows** and anything over the run's maximum cost are never saved or charged.

### Use cases

- **Funding-rate arbitrage**: compare the same coin's funding across six exchanges (use `fundingRate8h` or `fundingRateAnnualizedPct` — intervals differ: 1 h on Hyperliquid, 4 h or 8 h elsewhere).
- **Open interest and leverage monitoring**: track OI in USD per coin and per exchange on a schedule.
- **Liquidation alerts**: recent long / short liquidations with size in USD.
- **Options positioning**: put/call ratio, ATM IV and max pain per Deribit expiry.
- **Research and backtesting**: up to 90 days of funding-rate history per market.

### Tips

- Funding rates are decimals: `0.0001` = 0.01 % per funding period. `fundingRateAnnualizedPct` is a simple yearly figure (rate × payments per year × 100).
- With Coins empty, rows come sorted by open interest (largest first), so **Max rows** keeps the most important markets.
- Funding history and liquidations are fetched market by market; **Markets for history and liquidations** (default 50) caps how many, starting with the largest open interest.
- Liquidations come from OKX (its latest liquidation orders) and Gate (its recent ones, usually the last hour). The other four exchanges are not read for liquidations.
- Each run reads every exchange's full market list in a few requests, so one run with ten coins is cheaper and faster than ten runs with one coin each.

### FAQ

**Do I need exchange accounts or API keys?** No. Everything comes from the exchanges' public market data, the same numbers their trading pages show to any visitor.

**Why is an exchange missing from my results?** If an exchange refuses a run's connections, doesn't answer, or answers too slowly (no market list within 20 seconds), the run skips it, keeps the others and says so in the status message; nothing is charged for the missing exchange. Run again later.

**How fresh is the data?** It is read live at run time. `time` is the exchange's own timestamp for the value (snapshot, funding payment or liquidation); `scrapedAt` is when the row was saved.

**Why are Binance and Bybit not included?** This version covers OKX, Gate, Bitget, MEXC, Hyperliquid and Deribit.

**Which proxy should I use?** Keep the default (Apify Proxy, datacenter). It comes with every Apify plan, including the free one.

**Is it legal to scrape OKX, Gate, Bitget, MEXC, Hyperliquid and Deribit?** This Actor only collects publicly available market data — prices, funding rates, open interest, volumes, anonymous liquidation orders and option quotes — that the exchanges publish to anyone without an account. Collecting publicly available data is generally legal, but you're responsible for how you use it, including each exchange's terms. If you're unsure, check with a lawyer. More on this: [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

**Does it access any private data?** No. It never logs in, never uses API keys and never touches accounts, balances or orders. Liquidation orders are anonymous (no trader names or account IDs). It follows each exchange's robots.txt.

*This Actor is not affiliated with, endorsed by or sponsored by OKX, Gate, Bitget, MEXC, Hyperliquid or Deribit.*

# Actor input Schema

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

Coins to collect, e.g. BTC, ETH, SOL, PEPE. Market names work too (BTCUSDT, BTC-USDT-SWAP, BTC_USDT, 1000PEPE, kPEPE) — they are matched by coin, so every exchange's markets for that coin come back. Leave empty for every perpetual market (sorted by open interest).

## `include` (type: `array`):

Perpetual markets = one snapshot row per market: mark/index/last price, current funding rate (+ 8 h and yearly), next funding time, open interest and 24 h volume in coins and USD. Funding-rate history = one row per past funding payment. Liquidations = recent liquidation orders (OKX and Gate publish them). Options by expiry = Deribit open interest, put/call ratio, ATM IV and max pain per expiry. Option contracts = every Deribit option with mark IV.

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

Exchanges to read. All six by default. Options come from Deribit; liquidations from OKX and Gate.

## `fundingHistoryDays` (type: `integer`):

For "Funding-rate history": how many days of past funding payments to collect per market (1–90).

## `maxMarkets` (type: `integer`):

Funding history and liquidations are looked up market by market. This caps how many markets (the matching ones with the largest open interest first). Each market that turns out to have no records in the window counts as one market lookup.

## `marginTypes` (type: `array`):

Linear = stablecoin-margined (USDT/USDC) contracts, inverse = coin-margined contracts. Both by default.

## `minOpenInterestUsd` (type: `integer`):

Skip markets whose open interest is below this many US dollars (0 = keep all). Handy with empty Coins to get only the liquid markets.

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

Maximum rows for the whole run (all data types together). 0 = no limit.

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

Apify Proxy (datacenter) is the default and comes with every Apify plan. An exchange that refuses this run's connections is skipped for the run and nothing is charged for it.

## `_noResidential` (type: `boolean`):

Internal (canaries): behave exactly like an account without the RESIDENTIAL proxy group. This actor never uses residential proxies.

## Actor input object example

```json
{
  "symbols": [
    "BTC"
  ],
  "include": [
    "perpetuals"
  ],
  "exchanges": [
    "okx",
    "gate",
    "bitget",
    "mexc",
    "hyperliquid",
    "deribit"
  ],
  "fundingHistoryDays": 7,
  "maxMarkets": 50,
  "marginTypes": [
    "linear",
    "inverse"
  ],
  "minOpenInterestUsd": 0,
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "_noResidential": false
}
```

# Actor output Schema

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

All collected rows.

## `run` (type: `string`):

Status and statistics for this run.

## `report` (type: `string`):

RUN_REPORT: how the run ended, rows per exchange and type, requests per exchange and proxy use.

# 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": [
        "BTC"
    ],
    "include": [
        "perpetuals"
    ],
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("yugenox/crypto-derivatives-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": ["BTC"],
    "include": ["perpetuals"],
    "maxItems": 20,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("yugenox/crypto-derivatives-scraper").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": [
    "BTC"
  ],
  "include": [
    "perpetuals"
  ],
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call yugenox/crypto-derivatives-scraper --silent --output-dataset

```

## MCP server setup

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

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/jjrhNsTkxdvuGZAk6/builds/caSiB6me0QetKh6c2/openapi.json
