# Crypto On-Chain Data API - CryptoQuant Exchange Flows, MVRV (`nabeelbaghoor/crypto-onchain-data-exchange-flows-api`) Actor

Pull CryptoQuant on-chain and market data into a dataset: BTC, ETH, XRP, stablecoin and ERC20 exchange and miner flows, reserves, MVRV, SOPR, NUPL, whale ratio, funding rates, open interest, ETF fund data, mempool and Lightning stats. Bring your own API key.

- **URL**: https://apify.com/nabeelbaghoor/crypto-onchain-data-exchange-flows-api.md
- **Developed by:** [Nabeel Hassan](https://apify.com/nabeelbaghoor) (community)
- **Categories:** Business, Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 on-chain or market data point returneds

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 On-Chain Data API - CryptoQuant Exchange Flows, MVRV

Export Bitcoin, Ethereum, XRP, TRON, stablecoin and ERC20 on-chain flows, network data, valuation indicators and crypto market data from the CryptoQuant API into an Apify dataset with your own CryptoQuant API key.

This actor wraps the CryptoQuant REST API (v1 data endpoints and the v2 research indicators). It turns a list of endpoint paths and exchanges, miners, tokens or symbols into clean, deduplicated, dated rows you can download as JSON, CSV or Excel, schedule daily or hourly, or feed into trading models, research notebooks, dashboards, spreadsheets and AI agents. Bring your own API key.

### What it does

- **Exchange flows**: exchange reserve, inflow, outflow, netflow, transaction and address counts and in-house flows for BTC, ETH, XRP, stablecoins (USDT, USDC and others) and ERC20 tokens, per exchange (Binance, Coinbase Advanced, OKX, Bybit and more) or aggregated as all_exchange, spot_exchange or derivative_exchange.
- **Miner flows and mining companies**: miner reserve, inflow, outflow and netflow per mining pool, miner-to-exchange and other inter-entity flows, and on-chain rewards of listed miners such as MARA, RIOT and CleanSpark.
- **Flow indicators**: exchange whale ratio, fund flow ratio, exchange supply ratio, Miners' Position Index (MPI), exchange inflow CDD, inflow age and value bands, stablecoins ratio and exchange shutdown index.
- **Market and network indicators**: MVRV, SOPR, aSOPR, LTH and STH SOPR ratio, realized price, NUPL, NRPL, NVT, NVM, stock-to-flow, Puell multiple, CDD, dormancy, coin age, UTXO age and value bands, and the estimated leverage ratio.
- **Market data**: price OHLCV (index or per exchange, spot or perpetual), market capitalization, open interest, funding rates, liquidations, taker buy and sell volume and the Coinbase premium index.
- **Fund data**: price, volume, premium and digital asset holdings of bitcoin and ether funds and ETFs such as GBTC and IBIT.
- **Network data**: supply, velocity, transactions, active addresses, fees, block data, hashrate and difficulty, ETH 2.0 staking, BTC mempool and Lightning statistics, XRP DEX and AMM data and TRON SunSwap and SunPump DeFi activity.
- **Research indicators (v2)**: MVRV Z-score, PnL index, bull-bear market indicator, apparent demand, US ETF demand, trader realized price bands and more.
- **Data latency, entity and endpoint lists**: how fresh each endpoint is, every exchange, miner or bank an asset's flows cover, and every endpoint your key can call with its parameters.
- **Pay only for results**: empty answers are recorded as a free row that says why, never charged.

### Input

| Field | Used by | What it does |
| --- | --- | --- |
| `mode` | all | `metricSeries`, `researchIndicator`, `dataLatency`, `entityList` or `endpointList` |
| `endpoints` | series, latency | Endpoint paths below `/v1`, such as `btc/exchange-flows/netflow`, `btc/market-indicator/mvrv` or `eth/market-data/funding-rates` |
| `exchanges` | series | Exchanges for endpoints that take one, such as `binance` or `all_exchange`; one request each |
| `miners` | series | Mining pools such as `f2pool` or `all_miner`, or mining companies such as `mara` |
| `tokens` | series, entity list | Stablecoin, ERC20 or altcoin tokens such as `usdt_eth`, `usdc` or `link` |
| `symbols` | series | Pair symbols such as `btc_usdt` or `all_symbol`, or fund tickers such as `gbtc` |
| `amms` | series | XRP AMM pairs, for the XRP AMM endpoints |
| `market`, `metricType` | series | Spot or perpetual for price OHLCV; the mempool metric type |
| `fromEntity`, `toEntity` | series | Sender and receiver for BTC inter-entity flows |
| `indicators` | research indicator | The v2 bitcoin research indicators to read |
| `window` | series, indicator | `day`, `hour`, `10min`, `min` or `block`, where the endpoint and your plan offer it |
| `since`, `until` | series, indicator | A date, a UTC date and time, or a block height with the block window; leave empty for the newest rows |
| `entityAsset`, `entityType` | entity list | Which asset's exchanges, miners, banks or other entities to list |
| `maxResults` | all | Row ceiling for the run (default 200); each request asks only for the rows left |
| `requestsPerMinute` | all | Pacing to your plan's rate limit (default 20) |
| `apiKey` | all | Your CryptoQuant API key, stored as a secret |

An endpoint only receives the parameters the CryptoQuant documentation lists for it. An exchange set for an endpoint that takes none (such as MVRV) is left off it, and an endpoint that requires one (such as exchange reserve) asks you to set it before any request is made.

Example input, daily BTC exchange netflow on Binance and all exchanges plus MVRV for 2026:

```json
{
    "mode": "metricSeries",
    "endpoints": ["btc/exchange-flows/netflow", "btc/market-indicator/mvrv"],
    "exchanges": ["binance", "all_exchange"],
    "window": "day",
    "since": "2026-01-01",
    "maxResults": 1000
}
```

### How to get an API key

Subscribe to a CryptoQuant plan at cryptoquant.com/pricing; your access token then appears on the API tab of your settings (cryptoquant.com/settings/api). Market data endpoints are open on every plan, including the free Basic plan with its monthly credits. On-chain endpoints (exchange and miner flows, network data and the market, flow and network indicators) need the Professional plan or above, and finer windows and full history need Premium. Bring your own API key: paste it into the API key field or set the `DATA_API_KEY` environment secret.

### Example output

```json
{
    "mode": "metricSeries",
    "recordType": "datapoint",
    "identifier": "btc/exchange-flows/netflow binance",
    "found": true,
    "endpoint": "btc/exchange-flows/netflow",
    "metricName": "Netflow",
    "category": "BTC Exchange Flows",
    "date": "2026-06-14",
    "blockheight": null,
    "value": -1532.41,
    "window": "day",
    "exchange": "binance",
    "netflow_total": -1532.41,
    "id": "btc/exchange-flows/netflow|binance|day|2026-06-14|",
    "note": null
}
```

Every field the provider returns for a data point is kept as its own column (for example `reserve` and `reserve_usd`, `inflow_total`, `inflow_top10` and `inflow_mean`, `mvrv`, `sopr`, `funding_rates`, or `open`, `high`, `low`, `close` and `volume`). `value` repeats the endpoint's headline field so mixed runs sort and chart in one column.

### FAQ

#### What is the CryptoQuant API?

CryptoQuant is an on-chain and crypto market data provider. Its REST API serves exchange and miner flows, network data, valuation indicators such as MVRV, SOPR and NUPL, derivatives and fund data for Bitcoin, Ethereum, XRP, TRON, stablecoins, ERC20 tokens and altcoins.

#### Do I need my own API key?

Yes. This actor reads the CryptoQuant API with your own access token and never ships a shared key. A run without a key ends straight away with a message that says where to get one, and nothing is charged.

#### How do I download Bitcoin exchange inflows, outflows and netflow?

Use the metric time series mode with `btc/exchange-flows/inflow`, `btc/exchange-flows/outflow` and `btc/exchange-flows/netflow`, and list the exchanges you want, such as `binance`, `coinbase_advanced` or `all_exchange`. Each exchange is read as its own series.

#### How do I get Bitcoin MVRV, SOPR or NUPL history?

Use the metric time series mode with `btc/market-indicator/mvrv`, `btc/market-indicator/sopr` or `btc/network-indicator/nupl`. Set `since` for a fixed start date, or leave it empty for the newest rows up to the maximum results.

#### Which exchanges and miners are covered?

Run the entity list mode for an asset and type (for example BTC and exchange, or BTC and miner). The endpoint list mode shows every endpoint your key can call with its accepted parameters.

#### Which plan do I need?

Market data (prices, open interest, funding rates, liquidations, fund data) works on every plan, from daily on Basic to minute data on Professional. On-chain data needs Professional (daily) or Premium (all windows). A request your plan does not cover becomes a free row saying so, and the run moves on.

#### What do I pay?

Pay per result: 0.005 USD per on-chain or market data point, entity, endpoint or latency record, and 0.008 USD per research indicator point. Empty answers and refusals are never charged. Your CryptoQuant plan's own API credits are used separately, by rows returned, so the actor asks the provider only for the rows still left under your maximum.

#### What happens if my key is wrong or my credits run out?

A rejected key (HTTP 401) or spent API credits (HTTP 402) end the run cleanly with a status message that explains what to change. Rate limits (HTTP 429) are waited out and retried.

### Keyword map

crypto on-chain data API, CryptoQuant API, bitcoin exchange flows, exchange netflow, exchange reserve, miner flows, whale ratio, MVRV API, SOPR API, NUPL, funding rates API, open interest, liquidations, stablecoin exchange flows, ERC20 on-chain data, XRP on-chain data, bitcoin ETF fund data, mempool statistics, Lightning network stats, crypto market data export.

### Terms and data use

CryptoQuant's Terms of Service license API data for your internal, non-commercial business purposes under CC BY-NC 4.0, with attribution ("Source: CryptoQuant"). Without a separate written licence you may not resell or redistribute raw data or endpoints to third parties or to other teams in your company, build a commercial product, fund or trading strategy on the data, or use a retail plan (Basic, Advanced, Professional, Premium) for corporate or institutional use. Keep your datasets private to your own use, and contact CryptoQuant sales for a commercial or redistribution licence. This actor is not affiliated with or endorsed by CryptoQuant.

# Actor input Schema

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

Metric time series reads each CryptoQuant v1 endpoint (exchange flows, miner flows, network data, market data, flow, market and network indicators, fund, ETH staking, mempool, Lightning, XRP DEX and AMM, TRON DeFi) once per exchange, miner, token or symbol you list, newest data first. Research indicator reads the curated v2 bitcoin indicators. Data latency shows how long after a block each endpoint's data is ready. Entity list reads the exchanges, miners and banks an asset's flow data covers. Endpoint list returns every endpoint your key can call with its parameters.

## `endpoints` (type: `array`):

Endpoint paths as the CryptoQuant docs list them below /v1, one per line, for example btc/exchange-flows/reserve, btc/exchange-flows/netflow, btc/miner-flows/outflow, btc/market-indicator/mvrv, btc/market-indicator/sopr, btc/network-indicator/nupl, btc/flow-indicator/exchange-whale-ratio, eth/market-data/funding-rates, stablecoin/exchange-flows/inflow or btc/lightning/stats-in-total. The endpoint list mode lists all 236.

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

For endpoints that take an exchange: exchange flows, flow indicators, open interest, funding rates, liquidations, taker volume and leverage ratio. Names such as binance, coinbase_advanced, okx, bybit, or the aggregates all_exchange, spot_exchange and derivative_exchange, one per line. Each exchange is its own request. Left off endpoints that take none.

## `miners` (type: `array`):

For miner flow endpoints and miner supply ratio: mining pools such as f2pool, antpool, viabtc or all_miner. For btc/miner-data/companies: listed mining companies such as mara, riot, clsk, core or iren. One per line; each is its own request.

## `tokens` (type: `array`):

For stablecoin, ERC20 and altcoin endpoints: tokens such as usdt_eth, usdc, all_token, link, uni or aave, one per line; each is its own request. The stablecoin and ERC20 entity lists read the first token.

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

For price OHLCV and liquidations: pair symbols such as btc_usd, btc_usdt or all_symbol. For fund data: fund tickers such as gbtc, ibit or ethe. One per line; each is its own request.

## `amms` (type: `array`):

For XRP AMM endpoints only: AMM pairs from the XRP AMM table in the CryptoQuant docs, one per line.

## `market` (type: `string`):

For price OHLCV only. Spot or perpetual prices; the provider defaults to spot.

## `metricType` (type: `string`):

For the two BTC mempool endpoints only. The provider defaults to the transaction count.

## `fromEntity` (type: `string`):

For BTC inter-entity flows only: the sending exchange or mining pool, such as binance or f2pool (for exchange-to-exchange, exchange-to-miner, miner-to-exchange and miner-to-miner).

## `toEntity` (type: `string`):

For BTC inter-entity flows only: the receiving exchange or mining pool. For exchange-to-exchange it must differ from the from entity.

## `indicators` (type: `array`):

Research indicator mode. The curated v2 (beta) bitcoin indicators to read.

## `window` (type: `string`):

Aggregation interval. Every endpoint offers day; hour, 10min, min and block depend on the endpoint and on your plan (on-chain data is daily on Professional, all windows on Premium).

## `since` (type: `string`):

Start of the window, UTC: a date such as 2025-01-01 or 20250101, a date and time such as 2025-01-01T12:00:00Z, or a block height with the block window. Leave empty to read the newest rows up to the maximum results.

## `until` (type: `string`):

End of the window, in the same forms as Since. Leave empty for the latest data point.

## `entityAsset` (type: `string`):

Entity list mode. Which asset's supported entities to list.

## `entityType` (type: `string`):

Entity list mode. BTC lists exchanges, miners and banks; ETH, stablecoins and ERC20 list exchanges; XRP lists exchanges, builders, teams, foundations, custody, OTC desks, banks and bridges.

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

The most rows this run returns and charges for, across all endpoints and entities. Each request asks the provider only for the rows still left, which also limits the API credits used.

## `requestsPerMinute` (type: `integer`):

Pacing. CryptoQuant allows 10 requests a minute on Basic, 60 on Advanced, 120 on Professional and 800 on Premium, and answers 429 above it, which the actor waits out and retries.

## `apiKey` (type: `string`):

Your own CryptoQuant API key (access token), from the API tab of your settings at cryptoquant.com/settings/api. Stored as a secret and sent only in the Authorization header; it is never logged. You can instead set the DATA_API_KEY environment secret.

## Actor input object example

```json
{
  "mode": "metricSeries",
  "endpoints": [
    "btc/exchange-flows/netflow",
    "btc/market-indicator/mvrv"
  ],
  "exchanges": [
    "all_exchange"
  ],
  "window": "day",
  "entityAsset": "btc",
  "entityType": "exchange",
  "maxResults": 200,
  "requestsPerMinute": 20
}
```

# Actor output Schema

## `records` (type: `string`):

One row per data point, latency statistic, entity or endpoint.

# 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 = {
    "endpoints": [
        "btc/exchange-flows/netflow",
        "btc/market-indicator/mvrv"
    ],
    "exchanges": [
        "all_exchange"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("nabeelbaghoor/crypto-onchain-data-exchange-flows-api").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 = {
    "endpoints": [
        "btc/exchange-flows/netflow",
        "btc/market-indicator/mvrv",
    ],
    "exchanges": ["all_exchange"],
}

# Run the Actor and wait for it to finish
run = client.actor("nabeelbaghoor/crypto-onchain-data-exchange-flows-api").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 '{
  "endpoints": [
    "btc/exchange-flows/netflow",
    "btc/market-indicator/mvrv"
  ],
  "exchanges": [
    "all_exchange"
  ]
}' |
apify call nabeelbaghoor/crypto-onchain-data-exchange-flows-api --silent --output-dataset

```

## MCP server setup

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

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/g77CcoTvZkSHHwomg/builds/QoxfkIpOVG25QOUfx/openapi.json
