# Binance Scraper (`publicmoney/binance-scraper`) Actor

Extract live Binance spot prices for any pair with no API key or signed request: last, best bid and ask, 24h high, low, volume and change, plus the perpetual funding rate and mark price. Export data, run via API, schedule and monitor runs, or integrate with other tools.

- **URL**: https://apify.com/publicmoney/binance-scraper.md
- **Developed by:** [Public Money](https://apify.com/publicmoney) (Apify)
- **Categories:** Business
- **Stats:** 4 total users, 3 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $1.00 / 1,000 records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

Binance's REST API needs a key for most endpoints and blocks requests from several countries outright. This Actor reads the public ticker for any spot pair and returns one structured record: last price, best bid and ask, 24h high, low, volume and change. Turn on funding and it adds the perpetual futures funding rate and mark price for the same pair.

### What it does

- Returns **one record per requested pair**, in order. A pair Binance does not list comes back with `status: "failed"` and a reason, so a batch never fails silently.
- Keeps both names: `requested` is what you asked for (`BTC/USDT`) and `symbol` is Binance's own (`BTCUSDT`), so you can join back to your watchlist.
- Adds the **perpetual funding rate and mark price** when **Include funding** is on, which is how you see whether the market is paying longs or shorts.
- Routes through Germany because Binance refuses US datacenter addresses. The egress the source needs is handled for you and there is nothing to configure.
- Stamps every record with `validFrom`, Binance's own exchange time for that tick, so you always know how stale a price is.
- Needs **no API key and no signed request**. Nothing to register, nothing to rotate.

### Use cases

| You need to | How this Actor does it |
| --- | --- |
| Price a portfolio every minute | Pass every pair you hold and schedule the run |
| Watch the spread on a pair | Subtract `bid` from `ask` on each run and alert on a widening book |
| Compare venues for the same pair | Run this next to the Bybit, OKX, Kraken or Coinbase Actor and diff `value` at `validFrom` |
| See who is paying to hold a position | Turn on funding and read `fundingRate` against `markPrice` |
| Feed a trading agent | Call the Actor over MCP and let the model ask for the pair it needs |
| Build your own candles | Schedule the run and let the dataset accumulate one row per pair per run |

### Quick start

1. Click **Try for free**.
2. Add your pairs, one per line, as `BASE/QUOTE`: `BTC/USDT`, `ETH/USDT`, `SOL/USDT`. Binance quotes most pairs in USDT rather than USD.
3. Turn on **Include funding** if you also want the perpetual funding rate and mark price.
4. Click **Start**. Rows appear within seconds.
5. Export as JSON, CSV, Excel or XML, or read the dataset over the API.

### Input

| Field | Type | Default | What it controls |
| --- | --- | --- | --- |
| `pairs` | array | `BTC/USDT, ETH/USDT` | Trading pairs to read, written BASE/QUOTE. Slashes are optional and case does not matter. |
| `includeFunding` | boolean | `false` | Adds `fundingRate` and `markPrice` from the perpetual futures market |
| `maxItems` | integer | `0` | Caps how many pairs are read. `0` reads them all |

```json
{
    "pairs": [
        "BTC/USDT",
        "ETH/USDT",
        "SOL/USDT"
    ],
    "includeFunding": true,
    "maxItems": 0
}
```

### Output

One dataset item per pair. Funding fields appear only when **Include funding** is on and Binance lists a perpetual contract for that pair.

| Field group | Fields |
| --- | --- |
| Identity | `status`, `requested`, `symbol`, `currency`, `url` |
| Price | `value`, `bid`, `ask` |
| 24 hour window | `high24h`, `low24h`, `baseVolume24h` |
| Timing | `validFrom`, `scrapedAt` |
| Perpetual futures | `fundingRate`, `markPrice`, `nextFundingTime` |

```json
{
    "status": "ok",
    "requested": "BTC/USDT",
    "symbol": "BTCUSDT",
    "currency": "USDT",
    "value": 104238.61,
    "bid": 104238.6,
    "ask": 104238.61,
    "high24h": 106540.0,
    "low24h": 103112.45,
    "baseVolume24h": 18422.31,
    "fundingRate": 0.0001,
    "markPrice": 104240.12,
    "validFrom": "2026-09-04T20:00:01.000Z"
}
```

### Integrations

Run it over the API and get the rows back in one call:

```bash
curl -X POST "https://api.apify.com/v2/acts/publicmoney~binance-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"pairs": ["BTC/USDT", "ETH/USDT", "SOL/USDT"], "includeFunding": true, "maxItems": 0}'
```

From Python:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_TOKEN")
run = client.actor("publicmoney/binance-scraper").call(run_input={"pairs": ["BTC/USDT", "ETH/USDT", "SOL/USDT"], "includeFunding": true, "maxItems": 0})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["symbol"], item["value"], item["validFrom"])
```

Give an AI agent the Actor over MCP:

```json
{
    "mcpServers": {
        "apify": {
            "url": "https://mcp.apify.com/?actors=publicmoney/binance-scraper"
        }
    }
}
```

Schedules run it on any cron, webhooks fire when a run finishes, and platform integrations push the
dataset to Google Sheets, Slack, Airtable, Zapier or your own endpoint.

### Cost

Pay per event, so you pay for records rather than compute time.

| Event | Free tier | Top volume tier |
| --- | --- | --- |
| Record with data | $0.002 | $0.0007 |
| Actor start | $0.00005 per GB | Same |

A record that returned no data is published as a failure row and is **never charged**. Six volume tiers apply, so the per-record price falls with monthly volume.

### Troubleshooting

| Issue | Solution |
| --- | --- |
| Every pair returns `failed` | Binance is refusing the egress this Actor uses. It is not settable from the input, so open an issue on the Issues tab and we will move it. |
| One pair returns `failed`, the rest are fine | That pair is not listed on this exchange, or the quote asset is wrong. Check it on the exchange first. |
| A pair works but funding fields are missing | Binance lists no perpetual contract for it. Spot-only pairs carry no funding rate. |
| `symbol` does not match what I sent | By design. `requested` is your input and `symbol` is Binance's own form, so `BTC/USDT` becomes `BTCUSDT`. |
| `value` looks behind another exchange | Read `validFrom`. It is the exchange's own timestamp for that tick, so two venues legitimately differ. Prices are spot, not aggregated. |

### FAQ

#### Does the Binance API need an API key?

For most endpoints yes, and several need a signed HMAC request on top. The public ticker does not, which is what this Actor reads, so there is nothing to register and nothing to rotate.

#### Why does Binance block my requests?

Binance restricts access from a number of countries, including the US, and returns an error rather than data. This Actor routes through Germany for that reason, and the egress is not exposed in the input, so there is nothing you can misconfigure.

#### Is this the real-time Binance price?

It is the last trade Binance published at `validFrom`, read live on each run. It is not a stream, so for tick-by-tick data use a websocket. For a price every minute or every hour, schedule the Actor.

#### Does it return Binance candles or historical prices?

No. Each record is the current ticker. To build a series, schedule the Actor and let the dataset accumulate one row per pair per run, each stamped with `validFrom`.

#### What is the funding rate for?

On perpetual futures it is the periodic payment between longs and shorts that keeps the contract near spot. A positive rate means longs pay shorts. `nextFundingTime` says when the next payment lands.

#### Do I need a Binance API key?

No. You need an Apify token to call the Actor over the API. No Binance credential is involved anywhere.

#### Can I get this data in Python?

Yes, with the `apify-client` package as shown above. It returns parsed JSON, so there is no HTML or response handling on your side.

#### Can I get the data into Excel or Google Sheets?

Yes. Export the dataset as XLSX or CSV, or connect the Google Sheets integration so each run appends to a sheet.

#### Can an AI agent call this Actor?

Yes. Add it to an MCP client with the config above and the model can request what it needs on its own. Every record is flat JSON with named fields, so no post-processing is needed.

#### Is it legal to scrape Binance?

This Actor reads public Binance data that needs no login and collects no personal data. Scraping public data is generally lawful, and how you store, redistribute or act on market data is governed by your own agreements and local rules. Take your own legal advice for your use case.

### Changelog

- **0.0.2** Added the perpetual funding rate, mark price and next funding time.
- **0.0.1** First release. Spot ticker for any listed pair.

### Feedback

Found a field Binance publishes that this Actor misses, or an input it rejects? Open an issue on the Issues tab with the input and what you expected. A daily test runs every Actor in the fleet against live sources, so parser fixes ship fast.

# Actor input Schema

## `pairs` (type: `array`):

Binance spot trading pairs to read, one per line, written BASE/QUOTE. Slashes are optional and case does not matter, so 'btcusdt' and 'BTC/USDT' both work. Binance quotes most pairs in USDT rather than USD. Examples: 'BTC/USDT', 'ETH/USDT', 'SOL/USDT'. Default is 'BTC/USDT', 'ETH/USDT'.

## `includeFunding` (type: `boolean`):

Adds the perpetual futures funding rate, mark price and next funding time for the same pair. A positive funding rate means longs are paying shorts. Pairs with no perpetual contract return the spot fields only. Examples: true to see funding, false for spot only. Default is off.

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

Maximum number of pairs to read, counted from the top of the list. Use it to cap spend on a long list without editing the list itself. Examples: 10, 50, 200. Default is 0, which reads every pair given.

## Actor input object example

```json
{
  "pairs": [
    "BTC/USDT",
    "ETH/USDT"
  ],
  "includeFunding": false,
  "maxItems": 0
}
```

# Actor output Schema

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

One item per requested input, in the default dataset.

# 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 = {
    "pairs": [
        "BTC/USDT",
        "ETH/USDT"
    ],
    "includeFunding": false,
    "maxItems": 0
};

// Run the Actor and wait for it to finish
const run = await client.actor("publicmoney/binance-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 = {
    "pairs": [
        "BTC/USDT",
        "ETH/USDT",
    ],
    "includeFunding": False,
    "maxItems": 0,
}

# Run the Actor and wait for it to finish
run = client.actor("publicmoney/binance-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 '{
  "pairs": [
    "BTC/USDT",
    "ETH/USDT"
  ],
  "includeFunding": false,
  "maxItems": 0
}' |
apify call publicmoney/binance-scraper --silent --output-dataset

```

## MCP server setup

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