# Binance Market Data - 24h Tickers & Klines (`superslowsloth/binance-market-data`) Actor

Binance spot 24-hour tickers and OHLCV candles (klines) as flat, typed rows: prices and volumes as numbers, ISO-8601 UTC times, base and quote asset on every row. All USDT pairs, any symbol list, any interval from 1s to 1M.

- **URL**: https://apify.com/superslowsloth/binance-market-data.md
- **Developed by:** [Superslow Sloth](https://apify.com/superslowsloth) (community)
- **Categories:** Developer tools, Business
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.25 / 1,000 market data row scrapeds

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

## Binance Market Data - 24h Tickers & Klines

Binance spot market data as flat, typed dataset rows: the rolling 24-hour
ticker for any set of symbols (or every trading symbol on the exchange), and
OHLCV candles ("klines") at any interval from one second to one month.

### What you are paying for, honestly

The data comes from Binance's **free, public market-data API**
(`data-api.binance.vision`, Binance's own mirror of the `api.binance.com`
market endpoints). Nothing here is exclusive, and anyone with `curl` can read
the same numbers. What this actor adds is the plumbing between that API and a
table:

- **Typed, flat rows.** Binance sends every price and quantity as a string
  (`"85443.26000000"`) and every candle as a positional array. Here each one
  is a named number column, times come as epoch milliseconds *and* ISO-8601
  UTC, and every row carries its `base_asset`, `quote_asset` and `status`.
- **Scheduled feeds into anything Apify connects to.** Run it every five
  minutes or every day and send the dataset to Google Sheets, a webhook, S3,
  Make, Zapier or your warehouse without writing a client.
- **The awkward parts handled.** Halted symbols filtered out, a correct
  quote-asset filter, candle paging past Binance's 1,000-per-request cap,
  request-weight budgeting, retries from a fresh address on a rate limit.

If you already run code against the Binance API, you probably do not need
this. If you want the numbers in a spreadsheet or a pipeline on a schedule,
this is the short way there.

### Modes

**`tickers`** - one row per symbol: last price, 24h change and change %,
open/high/low, volume-weighted average price, previous close, best bid and
ask with their sizes, base and quote volume, trade count and the window's
open and close times.

- Give `symbols` for specific pairs, or leave it empty for the **whole
  exchange** (about 1,370 trading symbols).
- `quoteAsset` keeps only pairs quoted in that asset - `USDT` gives every USDT
  pair (about 500). It is matched against the quote asset Binance publishes
  for each symbol, not against the end of the name: Binance lists quote
  assets called `U`, `USD`, `USD1` and `FDUSD` beside `USDT`, so "ends in USD"
  would be wrong.

**`klines`** - one row per symbol per candle: open, high, low, close, base and
quote volume, trade count, taker-buy base and quote volume, open and close
time.

- `interval`: `1s 1m 3m 5m 15m 30m 1h 2h 4h 6h 8h 12h 1d 3d 1w 1M`.
- `limit` candles per symbol, up to 10,000 (paged 1,000 at a time).
- With `startTime`, the first `limit` candles from that moment. Without it,
  the most recent `limit` candles up to `endTime`, or up to now. Either way a
  symbol's rows come out oldest first.

### Input

| Field | Type | Default | What it does |
|---|---|---|---|
| `mode` | select | `tickers` | `tickers` or `klines`. |
| `symbols` | array | `BTCUSDT, ETHUSDT` | Spot symbols. `BTC/USDT`, `btc-usdt` are normalised. Checked against Binance's symbol list first; unknown ones are reported by name and skipped. Required for klines. |
| `quoteAsset` | string | - | Tickers mode only. Exact quote asset, e.g. `USDT`, `BTC`, `FDUSD`, `EUR`. |
| `includeNonTrading` | boolean | `false` | Include halted/delisted (`BREAK`) symbols. See below. |
| `interval` | select | `1d` | Klines mode. `1m` is a minute, `1M` a month. |
| `limit` | integer | `100` | Klines mode. Candles per symbol, 1-10,000. |
| `startTime` | string | - | Klines mode. `YYYY-MM-DD` (midnight UTC), ISO-8601 datetime, or epoch ms. |
| `endTime` | string | - | Klines mode. Same formats; inclusive. |
| `maxItems` | integer | `1000` | Cap on rows for the whole run, and so on spend. |
| `proxyConfiguration` | proxy | Apify datacenter | The mirror serves datacenter addresses. |

### Output

Both record types share one dataset; `record_type` (`ticker` or `kline`)
tells them apart, and the shared columns have the same name and type in
both, so one table holds both. Dataset views: **All rows**, **24h tickers**,
**Klines**.

Ticker row:

```
record_type            "ticker"
symbol                 e.g. "BTCUSDT"
base_asset             e.g. "BTC"           (from Binance's symbol list)
quote_asset            e.g. "USDT"
status                 "TRADING", or "BREAK" with includeNonTrading
last_price, last_qty
price_change           absolute change over the 24h window
price_change_percent   e.g. 0.763 means +0.763 %
weighted_avg_price     24h volume-weighted average price
prev_close_price
open_price, high_price, low_price
bid_price, bid_qty, ask_price, ask_qty
volume                 base-asset volume
quote_volume           quote-asset volume
open_time, close_time              epoch ms - the rolling window
open_time_iso, close_time_iso      ISO-8601 UTC
first_trade_id, last_trade_id
trade_count
```

Kline row:

```
record_type            "kline"
symbol, base_asset, quote_asset, status
interval               e.g. "1h"
open_time, close_time, open_time_iso, close_time_iso
open_price, high_price, low_price, close_price
volume, quote_volume, trade_count
taker_buy_base_volume, taker_buy_quote_volume
```

#### Nulls mean "Binance reported none", never zero

Binance writes `0` where there is nothing to report, and a zero in a price
column reads as a measurement. This actor writes `null` instead, in exactly
these cases:

- **Any price that Binance reports as exactly 0** (`last_price`, `open_price`,
  `high_price`, `low_price`, `close_price`, `weighted_avg_price`,
  `prev_close_price`, `bid_price`, `ask_price`). No market trades at zero;
  Binance sends 0 for "no trade in the window" and for an empty side of the
  order book. Measured 2026-10-05: the trading pair `UIDR` had no trades in
  its window and was reported with `lastPrice "0.00"` while its order book
  showed a bid of 17,783.
- **`price_change`, `price_change_percent` and `last_qty` when the window had
  no trades** (`trade_count` 0). Binance reports a 0% change there, which
  would read as "the price held" when nothing traded at all.
- **`first_trade_id` / `last_trade_id`** when Binance sends its `-1` sentinel
  for "no trades".
- **`base_asset`, `quote_asset`, `status`** only if Binance's own symbol list
  omits a symbol, which has not been observed for any symbol this actor
  requests.

Volumes, quantities and `trade_count` stay as sent, zeros included: zero
volume traded is a measurement.

#### Halted and delisted symbols

Binance still lists far more dead spot symbols than live ones: on 2026-10-05,
2,348 of 3,720 had status `BREAK`. Their 24-hour statistics describe a window
that closed weeks or years ago, so they are left out by default - the
whole-exchange ticker request asks Binance for `TRADING` symbols only. Turn
on `includeNonTrading` to get them, each row marked `status: "BREAK"`; check
`close_time_iso` before trusting any of their numbers.

#### Things this data is not

- **Not real-time to the millisecond.** Each run reads the REST API once; the
  ticker is a rolling 24h window as of the moment of the request.
- **The newest candle may still be forming.** A klines request that reaches
  the present includes the current, unfinished candle; its `close_time` is in
  the future and its prices will still move.
- **Spot only.** Futures, options, funding rates and order-book depth are not
  included.

### Rate limits and reliability

Binance counts "request weight" per address per minute (6,000). Measured
2026-10-05: a ticker request for 1-20 symbols costs 2, for 21-100 costs 40,
for more or for the whole exchange 80; a klines request costs 2; the symbol
list costs 20. The actor sends explicit symbol lists twenty at a time,
tracks the weight Binance reports on every response, and pauses for the
window to reset before it would go past 4,800. HTTP 429 (rate limited), 418
(Binance's automatic ban after ignored 429s), 403 and 5xx are retried with
backoff from a fresh proxy address. An invalid symbol or interval is
permanent and is reported, never retried.

A typical run is small: 100 symbols' tickers is 1 symbol-list request plus 5
ticker requests; 100 daily candles for 10 symbols is 11 requests.

### Pricing

Pay per event:

- **$0.000245 per row** (`quote-scraped`) - one ticker row or one candle row,
  charged after the row is written. Rows are de-duplicated before charging.
- **$0.002 per run** (`actor-start`).

So 500 USDT-pair tickers cost $0.1245 per run; 1,000 hourly candles $0.247.
Symbols that are skipped (unknown, halted, filtered out) are not charged, and
`maxItems` caps both rows and spend - the actor never requests more symbols
or candles than `maxItems` allows.

### Source

`https://data-api.binance.vision/api/v3/` - `exchangeInfo`, `ticker/24hr`,
`klines`, unauthenticated. On 2026-10-05 the ticker endpoint was verified from
an Apify datacenter address and all three from outside the platform.
`api.binance.com` itself answers HTTP 451 from Apify datacenter addresses and
is not used.

# Actor input Schema

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

tickers: one row per symbol with Binance's rolling 24-hour statistics (last price, change, high, low, volume, best bid and ask). klines: OHLCV candles for each symbol at the chosen interval.

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

Binance spot symbols such as BTCUSDT or ETHBTC. BTC/USDT, btc-usdt and btc_usdt are accepted and normalised. Every symbol is checked against Binance's own symbol list before any data is requested, so a typo is reported by name instead of failing the batch it sits in. Required in klines mode. In tickers mode, leave empty to get every trading symbol on the exchange (narrow it with Quote asset).

## `quoteAsset` (type: `string`):

Optional, tickers mode only. Keep only pairs quoted in this asset, e.g. USDT for all USDT pairs, or BTC, FDUSD, USDC, EUR, TRY, JPY. Matched exactly against the quote asset Binance publishes for each symbol, not against the end of the symbol name, so USD does not pick up FDUSD pairs. Ignored in klines mode.

## `includeNonTrading` (type: `boolean`):

Off by default. Binance still lists about 2,300 spot symbols whose status is BREAK (halted or delisted); their 24-hour statistics describe a window that closed weeks or years ago. Leave this off to get only symbols that are trading now. Turn it on to include them, each row marked with status BREAK.

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

Candle size, klines mode only. Case matters: 1m is one minute, 1M is one month.

## `limit` (type: `integer`):

How many candles to return for each symbol, klines mode only. Binance serves at most 1000 per request; larger numbers are paged automatically, up to 10,000 per symbol. With a start time the candles are the first ones from that moment; without one they are the most recent ones up to the end time (or now).

## `startTime` (type: `string`):

Optional, klines mode only. First candle to return: a date (YYYY-MM-DD, read as midnight UTC), an ISO-8601 datetime, or epoch milliseconds. Leave empty to get the most recent candles.

## `endTime` (type: `string`):

Optional, klines mode only. Last candle to return, inclusive of a candle that opens at exactly this time. Same formats as the start time. Leave empty for now.

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

Upper bound on rows across the whole run, tickers and candles alike. Each row is one billable event, so this is also a spending cap. The run never requests more symbols or candles than this allows.

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

Apify datacenter proxy by default, which Binance's public market-data mirror serves. Binance counts request weight per exit address per minute; the run tracks it and pauses before the limit, and a refused request (HTTP 429 or 418) is retried from a fresh address.

## Actor input object example

```json
{
  "mode": "tickers",
  "symbols": [
    "BTCUSDT",
    "ETHUSDT"
  ],
  "includeNonTrading": false,
  "interval": "1d",
  "limit": 100,
  "maxItems": 1000,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `rows` (type: `string`):

No description

## `tickers` (type: `string`):

No description

## `klines` (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": [
        "BTCUSDT",
        "ETHUSDT"
    ],
    "maxItems": 1000,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("superslowsloth/binance-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 = {
    "symbols": [
        "BTCUSDT",
        "ETHUSDT",
    ],
    "maxItems": 1000,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("superslowsloth/binance-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 '{
  "symbols": [
    "BTCUSDT",
    "ETHUSDT"
  ],
  "maxItems": 1000,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call superslowsloth/binance-market-data --silent --output-dataset

```

## MCP server setup

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