Unified Crypto Orderbook Scraper avatar
Unified Crypto Orderbook Scraper

Pricing

$9.00 / 1,000 results

Go to Apify Store
Unified Crypto Orderbook Scraper

Unified Crypto Orderbook Scraper

Instant Level 2 order books from 7 top exchanges (Binance, Coinbase, Kraken, KuCoin, Bybit, OKX, Gate.io). Pick any symbols, custom exchange list, or get a synthetic aggregated book. Built for arbitrage bots, market-making & real-time analysis.

Pricing

$9.00 / 1,000 results

Rating

0.0

(0)

Developer

David Kulhánek

David Kulhánek

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

8 days ago

Last modified

Share

Unified Orderbook Scraper

Overview

Unified Orderbook Scraper is an Apify Actor that fetches Level 2 (orderbook) data from multiple cryptocurrency exchanges and can optionally create a “synthetic” (aggregated) orderbook across all successfully fetched exchanges. Supported exchanges: Binance, Coinbase, Kraken, KuCoin, Bybit, OKX, Gate.io.

Features

  • Parallel fetching of L2 orderbooks from multiple exchanges
  • Choose symbols and exchanges via the Actor input
  • Optional synthetic (aggregated) orderbook
  • Retries and timeouts for network communication
  • In-memory caching of exchange trading pairs for faster validation during a single run

How it works (briefly)

  1. For each input symbol, the Actor validates it on all selected exchanges: the symbol is first mapped to the exchange’s expected format and verified to be supported.

  2. For exchanges where the symbol is supported, the L2 orderbook is fetched.

  3. If synthetic output is enabled, an aggregated L2 book is created across all successfully fetched exchanges (volumes for identical price levels are summed; bids are sorted descending, asks ascending).

Input (Input Schema)

The actual schema is defined in .actor/input_schema.json. Example input:

{
"symbols": ["BTCUSDT", "ETHUSDT"],
"exchanges": ["binance", "coinbase", "kraken", "kucoin", "bybit", "okx", "gate"],
"synthetic": true
}

Parameters:

  • symbols (array of strings): List of symbols to fetch. Default: ["BTCUSDT", "ETHUSDT"].
  • exchanges (array of strings): Exchanges to fetch from. Supported values: binance, coinbase, kraken, kucoin, bybit, okx, gate. Default: ["binance", "coinbase", "kraken", "kucoin"].
  • synthetic (boolean): Enable/disable creation of the synthetic book. Default: true.

Note: Some schema versions may include a depth parameter. In the current implementation, this parameter is not used (depth is not applied when requesting orderbooks).

Output (Dataset)

Each dataset item corresponds to one input symbol and contains:

  • symbol: the original input symbol (e.g., "BTCUSDT").
  • mappedSymbols: an object with exchanges and the concrete symbol used on that exchange (or null if not supported).
  • orderbook: an object keyed by exchange; value is an L2 orderbook in the format { bids: [[price, size], ...], asks: [[price, size], ...] }, or null if it could not be fetched.
  • synthetic: optional synthetic aggregated book in the format { bids: [[price, size], ...], asks: [[price, size], ...] }. Present only if enabled and at least one valid orderbook exists.
  • fetchedAt: ISO timestamp when the record was created.

Example dataset item (shortened, valid JSON):

{
"symbol": "BTCUSDT",
"mappedSymbols": {
"binance": "BTCUSDT",
"coinbase": "BTC-USDT",
"kraken": null
},
"orderbook": {
"binance": {
"bids": [["65000.00", "0.5"], ["64990.00", "0.3"]],
"asks": [["65010.00", "0.4"], ["65020.00", "0.2"]]
},
"coinbase": {
"bids": [["65001.00", "0.2"]],
"asks": [["65011.00", "0.1"]]
},
"kraken": null
},
"synthetic": {
"bids": [[65001, 0.7], [64990, 0.3]],
"asks": [[65010, 0.5], [65020, 0.2]]
},
"fetchedAt": "2025-01-01T12:00:00.000Z"
}

Running on Apify

  • On the Actor page, open the Input tab and fill in symbols, exchanges, and synthetic as needed.
  • The output is available in the run’s Dataset (items in the format described above).