# Crypto Exchange Market Data — Spot, Perps, Futures & Options (`teodor_banea/crypto-exchange-market-data`) Actor

Public market data from 11 crypto exchanges (Binance, Bybit, OKX, Bitget, Gate, KuCoin, MEXC, Coinbase, Kraken, Deribit, Hyperliquid) in one row shape: tickers, funding, open interest, candles, order books, options greeks, tokenized stocks and TradFi perps.

- **URL**: https://apify.com/teodor_banea/crypto-exchange-market-data.md
- **Developed by:** [Banea Teodor](https://apify.com/teodor_banea) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

## Crypto Exchange Market Data — Spot, Perps, Futures & Options

### What does Crypto Exchange Market Data do?

It reads public market data from **11 crypto exchanges** — Binance, Bybit, OKX, Bitget, Gate, KuCoin, MEXC, Coinbase,
Kraken, Deribit and Hyperliquid — and returns it in **one aligned row shape** for every instrument type: spot,
perpetual swaps (linear and inverse), OKX **X Perps** (5-year contracts that pay funding), dated futures and options.
Tokenized stocks (xStocks, Ondo, Bitget `r…` tokens) and TradFi perps (stocks, ETFs, indices, commodities, FX,
pre-IPO, rates) are classified by `underlyingType` and matched across venues by `underlyingTicker`.

Six modes: **tickers** (a live snapshot of every market), **instruments** (contract specs), **funding-rate history**,
**candles**, **order books** and **open-interest history**. No API keys, no login — public data only.

### Why use this Actor?

- **One schema for 11 venues.** CCXT-style unified symbols (`BTC/USDT:USDT`, `BTC/USD:BTC-261225-100000-C`), the same
  units everywhere and every field present on every row (null when a venue does not give it).
- **Comparable numbers.** 24h volume in base, quote and USD; one-sided open interest in base units and USD (the 2×
  long + short figures that Bybit's API and Gate publish are halved); funding per interval, per 8 hours and annualised; implied volatility in percent.
- **Arbitrage and basis scans.** Every ticker row carries the cross-exchange median price, its deviation from that
  median and the number of venues listing the asset — spot and perpetuals separately.
- **TradFi on crypto venues.** Filter `underlyingTypes: ["stock"]` and get every AAPL, TSLA, NVDA… perp and tokenized
  stock on all venues side by side, matched by `underlyingTicker`.
- **History where venues keep it.** Funding back to listing on Binance/Bybit/Deribit/Hyperliquid, candles with
  automatic paging, order books up to 500 levels, open-interest history on the five venues that publish it.

### How much does it cost?

Pay per result: **$0.50 per 1,000 rows + $0.01 per run**.

| Run | Rows | Cost |
|---|---|---|
| Prefilled example (BTC and ETH perpetuals on 4 venues) | ≈ 25 | ≈ $0.02 |
| Every BTC spot and perpetual market on all 11 venues | ≈ 115 | ≈ $0.07 |
| Full snapshot: all markets incl. options on all venues | ≈ 36,000 | ≈ $18.01 |
| 90 days of funding for 20 BTC perpetuals | ≈ 15,000 | ≈ $7.51 |
| 1-hour candles, 7 days, 16 BTC perpetuals | ≈ 2,700 | ≈ $1.36 |
| Order books, 50 levels, 24 BTC perpetuals | ≈ 2,300 | ≈ $1.16 |

Keep first runs small with **Maximum results** (prefilled at 200) and the market filters.

### Input

| Field | What it does | Example |
|---|---|---|
| `mode` | tickers, instruments, fundingHistory, candles, orderBook, openInterestHistory | `"tickers"` |
| `exchanges` | Venues to read (default: all 11) | `["binance","okx","bybit","hyperliquid"]` |
| `marketTypes` | spot, perpetual, xperp, future, option (options are opt-in) | `["perpetual"]` |
| `underlyingTypes` | crypto, stock, etf, index, commodity, fx, preipo, rates, other | `["stock"]` |
| `baseAssets` | Base asset **or** underlying ticker (AAPL matches AAPLX, rAAPL, xyz:AAPL) | `["BTC","AAPL","XAU"]` |
| `quoteAssets` | Quote assets | `["USDT","USDC"]` |
| `symbols` | Native or unified symbols, added on top of the filters (alone: only these) | `["BTC/USDT:USDT","PF_XBTUSD"]` |
| `minVolume24hUsd` | Minimum 24h USD volume | `1000000` |
| `interval` | Candle / open-interest interval: 1m 5m 15m 30m 1h 4h 1d 1w | `"1h"` |
| `startDate` / `endDate` | History window (date or period such as "90 days"; default last 30 days) | `"90 days"` |
| `orderBookDepth` | Levels per side (1–500) | `50` |
| `maxMarkets` | Markets read in the history modes (default 10) | `20` |
| `enrichPerMarket` | Per-market details (see below) | `true` |
| `includeCrossExchangeStats` | Cross-exchange median / deviation / venue count | `true` |
| `maxResults` | Row limit (0 = up to 200,000) | `200` |

**How the limits pick markets.** Each exchange's matching markets are sorted by 24h USD volume. Maximum results
(tickers, instruments) and Maximum markets (history modes) then take the most traded market of every exchange, then the
second of every exchange, and so on — one big venue cannot use up the whole limit.

**Per-market details** (`enrichPerMarket`) are fields the venues only publish market by market: Binance futures and
options open interest, Deribit option greeks / bid-ask IV / bid-ask sizes, Hyperliquid best bid/ask with sizes and
Coinbase best bid/ask with sizes. They are read for the most traded matching markets, up to 500 calls per exchange per
run; beyond that the fields are null and the log says so. Narrow the filters to cover every market.

### Output

Every row has a `dataType` (ticker, instrument, fundingRate, candle, orderBookLevel, openInterestPoint). Example ticker:

```json
{
    "dataType": "ticker",
    "exchange": "okx",
    "marketType": "perpetual",
    "contractType": "linear",
    "symbol": "BTC-USDT-SWAP",
    "unifiedSymbol": "BTC/USDT:USDT",
    "base": "BTC",
    "quote": "USDT",
    "settle": "USDT",
    "underlyingType": "crypto",
    "underlyingTicker": null,
    "dex": null,
    "expiry": null,
    "strike": null,
    "optionType": null,
    "contractSize": 0.01,
    "priceCurrency": "USDT",
    "lastPrice": 80520.9,
    "bidPrice": 80520.8,
    "bidSize": 5.2062,
    "askPrice": 80520.9,
    "askSize": 12.2366,
    "spreadPct": 0.000124,
    "markPrice": 80519.9,
    "indexPrice": 80550.8,
    "underlyingPrice": null,
    "open24h": 80608.8,
    "high24h": 81786.9,
    "low24h": 80350,
    "change24hPct": -0.109,
    "volume24hBase": 54817.917,
    "volume24hQuote": null,
    "volume24hUsd": 4413933195.05,
    "openInterest": 31319.1468,
    "openInterestContracts": 3131914.68,
    "openInterestUsd": 2521814568.42,
    "fundingRate": 0.0000706,
    "fundingIntervalHours": 8,
    "fundingRate8h": 0.0000706,
    "fundingRateAnnualizedPct": 7.7358,
    "nextFundingTime": "2026-10-29T00:00:00.000Z",
    "markIvPct": null,
    "bidIvPct": null,
    "askIvPct": null,
    "delta": null,
    "gamma": null,
    "vega": null,
    "theta": null,
    "crossExchangeMedianPrice": 80528.5,
    "deviationFromMedianPct": -0.0094,
    "listedOnExchanges": 11,
    "status": "trading",
    "marketUrl": "https://www.okx.com/trade-swap/btc-usdt-swap",
    "exchangeTimestamp": "2026-10-28T16:31:20.664Z",
    "scrapedAt": "2026-10-28T16:31:20.630Z"
}
```

The dataset has one table view per mode (Tickers, Instruments, Funding history, Candles, Order books, Open-interest
history); each field is described in the Output tab.

#### Coverage (markets on 2026-10-28)

| Exchange | Spot | Perpetual | X Perp | Future | Option |
|---|---|---|---|---|---|
| Binance | 1,385 | 815 | – | 14 | 1,520 |
| Bybit | 523 | 903 | – | 44 | 2,500 |
| OKX | 1,211 | 526 | 257 | 28 | 2,834 |
| Bitget | 3,594 | 915 | – | – | – |
| Gate | 2,182 | 1,066 | – | 30 | 3,029 |
| KuCoin | 970 | 711 | – | 1 | – |
| MEXC | 1,768 | 1,184 | – | – | – |
| Coinbase | 517 | 29 | – | 24 | – |
| Kraken | 1,602 | 213 | – | 18 | – |
| Deribit | 56 | 144 | – | 62 | 4,682 |
| Hyperliquid | 347 | 348 | – | – | – |

Hyperliquid perpetuals include the HIP-3 dexes (xyz, para, io, mkts…; `dex` column). Coinbase "perpetual" rows are
its perp-style futures (hourly funding, long-dated expiry kept in `expiry`). Combos, Hyperliquid outcome markets,
demo products and delisted or expired markets are left out.

#### Units

- **Sizes** (bid/ask sizes, order-book sizes, volumes, open interest) are in **base units**; contracts are converted
  with the contract size (inverse USD contracts ÷ price). `openInterestContracts` keeps the venue's contract count.
- **Open interest is one-sided** (Bybit `singleOpenInterest`, Gate position size). Bybit's API field
  `openInterest` and Gate's website count long + short (2×); Bybit's website shows one side, as this Actor does.
- **OKX daily open-interest points** are stamped 16:00 UTC (OKX's UTC+8 day).
- **Bitget `r…` tokenized-stock volumes** are taken as the venue reports them; they can be large enough to lead the
  volume sort and the Maximum results selection.
- **Funding intervals in history rows** follow each settlement: the interval is the gap to the previous settlement
  (rounded to 1, 2, 4 or 8 h) when a venue does not state it, so markets that moved from 8 h to 4 h or 1 h funding
  are labelled correctly over time.
- **USD values**: USD, USDT, USDC, FDUSD, USD1, USDE, USDH, USDT0, DAI, PYUSD and RLUSD count as 1 USD; other quotes are
  converted with the same run's spot prices (same exchange first, then the cross-exchange median). Unknown → null.
  Option `volume24hUsd` and `openInterestUsd` are notional (base × underlying price).
- **Funding**: `fundingRate` is per interval (`fundingIntervalHours`); `fundingRate8h` = rate × 8 / interval;
  `fundingRateAnnualizedPct` = rate × payments per year × 100. Deribit funding is continuous: its 8-hour rate is shown
  with an 8 h interval (history rows are hourly). Kraken Futures rates are relative rates per hour.
- **Implied volatility** in percent. Greeks as each venue reports them (OKX: Black-Scholes values).
- **24h open**: Kraken spot gives today's 00:00 UTC open, MEXC contracts the 16:00 UTC (UTC+8 day) open, Gate spot has
  none (derived from the 24h change). Deribit daily candles open at 08:00 UTC.
- **Times** are ISO 8601 UTC. `lotSize` / `minOrderSize` are in `contractSizeCurrency` units.

#### Fields some venues do not publish

| Venue | Not available (null) |
|---|---|
| Binance | option bid/ask sizes; max leverage; spot listing time |
| Bybit | option candles; option 24h open; USD value in open-interest history |
| OKX | quote volume of linear contracts |
| Bitget | open-interest history; options and dated futures (none listed); books beyond 150 levels (spot) or 100 (perpetuals) |
| Gate | option 24h volume / high / low; tickers' exchange time |
| KuCoin | open-interest history; full-depth books (100 levels max) |
| MEXC | perpetual bid/ask sizes; open-interest history |
| Coinbase | funding and open-interest history; mark price; candle quote volume |
| Kraken | spot candles beyond the latest 720; spot book depth beyond 500; options (none listed) |
| Deribit | open-interest history; option greeks beyond the 500 most traded (per run); 4h and 1w candles |
| Hyperliquid | 24h high/low; open-interest history; books beyond 20 levels |

#### History depth

| Venue | Funding history | Candles | Open-interest history |
|---|---|---|---|
| Binance | full (since listing) | full | last 30 days |
| Bybit | full | full | since 2020 |
| OKX | ≈ 3 months | full (spot 2017+) | ≈ 6 months+ (5m/1H/1D) |
| Bitget | ≈ 100 days | full | – |
| Gate | 180 days | spot full; contracts latest 10,000 bars | 180 days |
| KuCoin | full (paged) | full | – |
| MEXC | ≈ 18 months | full | – |
| Coinbase | – | full | – |
| Kraken | ≈ 1 year | spot latest 720 bars; futures full | since 2023 |
| Deribit | full | full | – |
| Hyperliquid | full (since 2023) | latest ≈ 5,000 bars per interval | – |

Kraken's inverse contracts (`PI_` perpetuals and `FI_` futures) are delisted by Kraken on 30 October 2026; they
disappear from the results when the venue stops listing them.

When a window reaches further back than a venue keeps, the run returns what exists and logs one warning per venue.

### Tips and tricks

- **Cheapest snapshot of a few coins:** `baseAssets: ["BTC","ETH"]` keeps the run short; on Bybit only the matching
  markets (and option chains of those coins) are read.
- **Funding arbitrage:** mode tickers, `marketTypes: ["perpetual","xperp"]`, sort by `fundingRate8h`.
- **Tokenized stocks vs stock perps:** `underlyingTypes: ["stock"]`, `baseAssets: ["AAPL","TSLA"]`, compare
  `deviationFromMedianPct`.
- **Options chains:** `marketTypes: ["option"]`, `baseAssets: ["BTC"]`; set `exchanges` to Deribit for greeks on every
  strike (≤ 500 per run with per-market details on).
- **Long candle histories:** 1-minute candles are ≈ 525,000 rows per market per year — set Maximum results accordingly.

### Scheduling

Every run is a fresh snapshot; the Actor keeps nothing between runs and creates no storage in your account. For a
time series of tickers, schedule the Actor (e.g. every 15 minutes) and append the datasets — `exchange` + `symbol` +
`marketType` + `scrapedAt` identify a row. For history modes, set **From** to a relative period that matches the
schedule (e.g. "1 day" for a daily schedule) and de-duplicate by `exchange` + `symbol` + time field downstream.

### Integrations

Use the dataset API (JSON, CSV, Excel) or Apify integrations to send rows to Google Sheets, Slack, Zapier, Make,
webhooks or your database. Problems (an exchange that could not be read, a market that failed) are listed under the
**ERRORS** key of the run's key-value store; the run continues with the other exchanges.

# Changelog

This Actor's version history is a separate document: https://apify.com/teodor_banea/crypto-exchange-market-data/changelog.md

# Actor input Schema

## `mode` (type: `string`):

Choose the data to return. Tickers = a price/volume/open-interest/funding snapshot of every selected market. Instruments = contract specs. The other modes read history for up to Maximum markets markets.

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

Select the exchanges to read. Leave empty for all 11.

## `marketTypes` (type: `array`):

Select the market types. Options are left out by default (about 15,000 markets across venues) — add them when you need them. X Perps are OKX's 5-year contracts that pay funding.

## `underlyingTypes` (type: `array`):

Keep only markets on these underlyings, e.g. Stocks for tokenized stocks and stock perps on every venue. Leave empty for all.

## `baseAssets` (type: `array`):

Keep only markets whose base asset or underlying ticker is one of these (case-insensitive). AAPL matches AAPLX, rAAPL, xyz:AAPL and AAPL stock perps. Leave empty for all.

## `quoteAssets` (type: `array`):

Keep only markets quoted in these assets, e.g. USDT, USDC or USD. Leave empty for all.

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

Add specific markets by native symbol (BTC-USDT-SWAP, BTCUSDT, PF_XBTUSD) or unified symbol (BTC/USDT:USDT). With no other filter set, only these markets are read.

## `minVolume24hUsd` (type: `integer`):

Keep only markets that traded at least this much in the last 24 hours (USD). Leave empty for no minimum.

## `interval` (type: `string`):

Choose the candle interval (Candles) or the sampling interval (Open-interest history). Venues that lack an interval skip it with a warning.

## `startDate` (type: `string`):

Enter the start of the history window (UTC date) or a period such as "90 days". Default: 30 days ago.

## `endDate` (type: `string`):

Enter the end of the history window (UTC date). Leave empty for now.

## `orderBookDepth` (type: `integer`):

Set the levels per side for Order books. Hyperliquid always publishes 20.

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

Limit the markets read in the history modes (taken by 24h volume, in turn from each exchange).

## `enrichPerMarket` (type: `boolean`):

Read details that venues only publish per market: Binance futures open interest, Deribit option greeks and bid/ask sizes, Hyperliquid best bid/ask and Coinbase spot bid/ask. Up to 500 extra calls per exchange — narrow the filters to cover every market.

## `includeCrossExchangeStats` (type: `boolean`):

Add the cross-exchange median price, each market's deviation from it and the number of exchanges listing the asset (tickers only).

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

Limit the rows returned. Tickers and Instruments keep the most traded markets of each exchange in turn. 0 = unlimited (capped at 200,000).

## Actor input object example

```json
{
  "mode": "tickers",
  "exchanges": [
    "binance",
    "okx",
    "bybit",
    "hyperliquid"
  ],
  "marketTypes": [
    "perpetual"
  ],
  "baseAssets": [
    "BTC",
    "AAPL",
    "XAU"
  ],
  "quoteAssets": [
    "USDT",
    "USDC"
  ],
  "symbols": [
    "BTC/USDT:USDT",
    "BTC-PERPETUAL"
  ],
  "interval": "1d",
  "orderBookDepth": 20,
  "maxMarkets": 10,
  "enrichPerMarket": true,
  "includeCrossExchangeStats": true,
  "maxResults": 200
}
```

# Actor output Schema

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

Every row of the run as JSON.

## `overview` (type: `string`):

Tickers rows.

## `instruments` (type: `string`):

Instruments rows.

## `fundingRates` (type: `string`):

Funding history rows.

## `candles` (type: `string`):

Candles rows.

## `orderBook` (type: `string`):

Order books rows.

## `openInterest` (type: `string`):

Open-interest history rows.

## `resultsCsv` (type: `string`):

The same rows as a CSV download.

## `errors` (type: `string`):

Exchanges or markets that could not be read. Only present when something went wrong.

# 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",
        "okx",
        "bybit",
        "hyperliquid"
    ],
    "marketTypes": [
        "perpetual"
    ],
    "baseAssets": [
        "BTC",
        "ETH"
    ],
    "maxResults": 200
};

// Run the Actor and wait for it to finish
const run = await client.actor("teodor_banea/crypto-exchange-market-data").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",
        "okx",
        "bybit",
        "hyperliquid",
    ],
    "marketTypes": ["perpetual"],
    "baseAssets": [
        "BTC",
        "ETH",
    ],
    "maxResults": 200,
}

# Run the Actor and wait for it to finish
run = client.actor("teodor_banea/crypto-exchange-market-data").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",
    "okx",
    "bybit",
    "hyperliquid"
  ],
  "marketTypes": [
    "perpetual"
  ],
  "baseAssets": [
    "BTC",
    "ETH"
  ],
  "maxResults": 200
}' |
apify call teodor_banea/crypto-exchange-market-data --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,teodor_banea/crypto-exchange-market-data"
        }
    }
}
```

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/5ndzOQGVKl60TuwQ3/builds/AbfRRG3bXYWPISGUO/openapi.json
