# Crypto Arbitrage Scanner - Exchange Prices and Spreads (`headofactors/crypto-arbitrage-scanner`) Actor

Scan crypto spot prices across Binance, Bybit, OKX, Kraken and DEX pools with a crypto arbitrage platform. One row per venue and trading pair with bid, ask, last, gross spread and the venue timestamp, for traders and fintech teams monitoring exchange differences.

- **URL**: https://apify.com/headofactors/crypto-arbitrage-scanner.md
- **Developed by:** [HeadOfActors](https://apify.com/headofactors) (community)
- **Categories:** Business, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 quotes

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 Arbitrage Scanner

Crypto arbitrage scanner is the crypto arbitrage software for spot prices across Binance, Bybit, OKX, Kraken and DEX pools. Get one structured row for each requested trading pair and venue, including bid, ask, last, gross spread and the time information supplied by the venue.

Use the results to monitor exchange differences, build a price dashboard, check a watchlist or feed your own trading research. This is a point-in-time data collection tool. It does not place orders, move funds or calculate an executable trading profit. Each run collects a fresh snapshot; scheduling runs gives you a sequence of observations that you can store and compare.

### Crypto arbitrage scanner coverage

Choose any combination of the five supported venues. Centralized exchanges provide their best bid, best ask and last traded price when the requested spot market has a usable order book. A missing market produces a diagnostic row, allowing you to distinguish unavailable coverage from a successful quote. Exchange availability differs by asset and quote currency.

DEX prices use an identified token and a selected pool. BTC uses wrapped BTC on Ethereum, ETH uses wrapped ETH on Ethereum, and SOL uses its wrapped native token on Solana. For another asset, supply its canonical chain and token address in `dex_tokens`. Among matching pools, the scanner selects the pool with the highest reported 24-hour USD volume. It requires the requested base-token address, chain and exact quote symbol.

A DEX row reports the pool price as `last` and sets `bid` and `ask` to null. Pool prices are observations, without a central limit order book. The row includes the selected chain, DEX identifier, pool address, liquidity and reported USD volume so that you can inspect the selected market.

### Input

Start with the captured BTC example:

```json
{"pairs":["BTC/USDT"]}
```

`pairs` accepts one to fifty trading pairs. `BTC/USDT`, `BTC-USDT`, `btc_usdt` and `BTCUSDT` normalize to the same pair. Concatenated symbols use recognized quote suffixes; slash notation lets you specify another exact quote. Duplicate pairs are returned once, in their first input position.

`exchanges` is an optional non-empty array containing `binance`, `bybit`, `okx`, `kraken` and `dexscreener`. Omitting it selects all five. Output follows pair order first, then your venue order. A scan containing DEX data supports at most thirty distinct base symbols. Token overrides use `BASE=chain:address`; each base can have one override per scan. Token addresses on Solana are case-sensitive.

`max_items` limits all delivered rows, including diagnostics. It defaults to 100 and accepts values from 1 to 1000. The scanner calculates spreads across all selected venues before applying this delivery cap. A warning reports truncation, and a best-price reference can therefore point to a venue whose row falls outside the cap. Increase the limit to retain every venue row.

`min_spread_pct` is an optional decimal percentage written as a string. An empty value disables filtering. When supplied, it filters entire trading pairs, requiring a calculated spread at or above the threshold. A pair with fewer than two eligible venue quotes has no calculated spread and does not pass this filter.

`dex_in_best` defaults to true. Set it to false to keep DEX observations in the output while selecting best buy and sell prices only from centralized exchange order books. Compatibility input names are `coin` for `pairs`, `exchange` for `exchanges`, `limit` for `max_items`, and `spread_min` for `min_spread_pct`. If both volume limits are present, the smaller value applies. For other fields, the canonical name takes precedence. These aliases do not imply support for another tool's additional venues or confidence model.

### Output

The dataset contains one row per normalized pair and selected venue, subject to filtering and the row limit. Every row includes `source`, `fetched_at`, `symbol`, `exchange`, `price`, `currency`, `as_of`, `pair`, `quote`, `venue`, `status` and the spread fields. For DEX rows, `venue` is `dexscreener` while `exchange` identifies the selected DEX, such as `uniswap` or `orca`.

A delivered row for `BTC/USDT` looks like this. It is the captured example that ships with the actor, produced from real venue responses on 14 November 2026; the quotes themselves are not current.

```json
{
  "source": "crypto-arbitrage-scanner",
  "fetched_at": "2026-11-14T13:57:30.000Z",
  "symbol": "BTC",
  "exchange": "binance",
  "price": 66777.68,
  "currency": null,
  "as_of": "2026-11-14T13:57:24.009Z",
  "pair": "BTC/USDT",
  "quote": "USDT",
  "venue": "binance",
  "venue_symbol": "BTCUSDT",
  "status": "ok",
  "error": null,
  "bid": 66777.67,
  "ask": 66777.68,
  "last": 66777.68,
  "bid_size": 1.09722,
  "ask_size": 0.93958,
  "volume_24h": 20240.68922,
  "quote_volume_24h": 1370620538.846005,
  "timestamp": "2026-11-14T13:57:24.009Z",
  "quote_age_ms": 5991,
  "has_order_book": true,
  "best_buy_venue": "binance",
  "best_sell_venue": "okx",
  "best_buy_price": 66777.68,
  "best_sell_price": 66787.5,
  "spread": 9.820000000006985,
  "spread_pct": 0.01470551238079398,
  "buy_here_spread_pct": 0.01470551238079398,
  "sell_here_spread_pct": -1.4975063516374499e-05,
  "is_best_buy": true,
  "is_best_sell": false,
  "venues_quoted": 5,
  "chain": null,
  "dex_id": null,
  "pair_address": null,
  "liquidity_usd": null,
  "volume_usd_24h": null
}
```

`price` equals `last` in units of the requested quote. `currency` contains a recognized ISO fiat currency such as USD or EUR; it is null for crypto quotes and stablecoins. The separate `quote` field always contains the exact quote symbol. USD, USDT and USDC remain separate markets throughout the calculation. Prices are never converted or treated as interchangeable.

`timestamp` and `as_of` contain the source observation time when supplied. `fetched_at` records retrieval time. Kraken and DEX pools provide no ticker observation timestamp, so their source-time fields and `quote_age_ms` remain null. Retrieval times across venues can differ, and older source quotes can remain visible. Inspect these fields before interpreting a small spread.

The best buy is the lowest eligible ask, and the best sell is the highest eligible bid. With DEX inclusion enabled, a pool's last price participates on both sides. `spread` is best sell minus best buy; `spread_pct` divides that difference by best buy and multiplies by 100. Negative spreads remain negative. With fewer than two eligible venues, best-price and spread fields are null. `buy_here_spread_pct` and `sell_here_spread_pct` compare each successful row with the pair's best opposite side. Tied best prices can mark multiple rows as best.

Statuses are `ok`, `not_listed`, `no_order_book`, `dex_token_unknown` and `error`. A market without a usable order book may retain its last price but does not participate in spread selection. If some feeds fail, available results remain available and the run output carries `partial` and a warning. If no usable quote exists anywhere, the result is a structured error rather than an invented price. Filtering can also produce a successful empty result.

### What you can do with it

**Monitor exchange differences on a watchlist.** Run the scan on the pairs you care about and keep the rows. Because every venue delivers bid, ask and last for the same normalized pair, one row set answers which venue is cheapest to buy on and which pays most for a sale right now.

**Screen for pairs worth a closer look.** Set `min_spread_pct` to a threshold of your own and the run returns only pairs whose calculated spread reaches it. Pairs with a single eligible venue quote have no calculated spread and drop out of the filter, so what survives has at least two markets to compare.

**Feed trading bots, a dashboard or a research pipeline.** The rows are flat, stable and timestamped where the venue supplies a time. Join them with your own stored runs, keep the ones you need and calculate fees, depth or signals yourself; the actor stores nothing between runs.

**Cover centralized exchanges and DEX pools in one pass.** A single request can mix Binance, Bybit, OKX and Kraken with a DexScreener pool for the same base asset, which keeps wrapped-token and exact-quote differences visible instead of hidden in a converted average.

**Watch availability as well as price.** Diagnostic rows distinguish a market that is not listed from one that has no usable order book, so a venue dropping out of your coverage shows up as a status, not as a silent gap.

Scheduling runs on Apify turns the scan into a series of snapshots you can store and compare yourself; the actor does not keep history and does not place orders.

### How this compares

**Against opportunity scanners.** The Store also holds scanners that return one row per arbitrage chance — a pair, a buy venue, a sell venue, a spread and a confidence score — for example [dataraptor/crypto-arbitrage-scanner](https://apify.com/dataraptor/crypto-arbitrage-scanner). That shape answers "is there a chance here", and it does not carry the order-book sides or the venue time behind the number. This actor goes the other way: one row per venue and per pair, with bid, ask, last, sizes, the venue timestamp and the best-price references, so the spread itself stays inspectable. Filters for a minimum spread exist in both; a confidence model and upper spread limits are out of scope here.

**Against broader quote actors.** [Market Quotes](https://apify.com/s-r/market-quotes) collects forex, coin, stock and ETF quotes with one row per symbol — wider across asset classes, without a second venue for the same pair and therefore without a cross-venue spread. [DexScreener Scraper](https://apify.com/s-r/dexscreener-scraper) gives pool discovery and detailed token data for DEX markets only. This scanner is the narrow one in scope and the specific one in shape: five named venues, exact quote matching, one comparison per pair.

**Against wider venue coverage.** Some scanners go after a much longer exchange list. This one stays with five venues it can quote with bid, ask and last from their public feeds, adds DEX pools on identified tokens, and reports what it cannot fetch instead of widening the list.

Match assets carefully when you combine datasets: the pair, quote, chain and token identity matter.

### Pricing

Pricing is **USD 0.002 per delivered quote row**, equivalent to USD 2 per 1,000 rows. The quote event counts only delivered rows with `status: "ok"`. Missing pairs, unknown token mappings, missing order books and source-error diagnostics do not count as quote events, and an empty result has no quote charges. The run start event applies once per run, before the scan, including a run that delivers nothing; its amount is shown in the Apify Pricing tab, which carries the active event prices. Non-paying accounts receive at most ten dataset rows per run, including diagnostics; this delivery cap does not make successful quote rows exempt from the event prices above.

### Limits and interpretation

Spreads are gross observations. Trading fees, withdrawal charges, funding, transfer delays, minimum order sizes, slippage and market impact are excluded. A visible difference can disappear before an order executes. Wrapped tokens also have chain-specific considerations. This version does not calculate triangular routes, funding arbitrage or confidence scores. Its normalized rows can feed calculations that you maintain separately.

### FAQ

#### Does a positive spread guarantee profit?

No. It is a gross price difference across observations. Costs, executable depth, timing and transfer constraints require separate checks.

#### Why is Kraken missing for some pairs?

Each venue lists its own markets. A USD market cannot fill a request for USDT. Request the exact quote you need and inspect diagnostic statuses.

#### Can I exclude DEX prices from the best-price calculation?

Yes. Set `dex_in_best` to false. Pool rows remain available, but best buy and sell refer only to eligible centralized exchange books.

#### Why can a DEX quote have no timestamp or bid and ask?

The source gives a pool observation without an order book or ticker observation timestamp. These fields stay null, while retrieval time and pool identity remain available.

# Actor input Schema

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

Trading pairs such as BTC/USDT. Also accepts BTC-USDT, btc_usdt and BTCUSDT. Duplicates are removed. Quotes are matched exactly; USD, USDT and USDC are different markets.

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

Venues to scan, in output order. Defaults to binance, bybit, okx, kraken and dexscreener.

## `dex_tokens` (type: `array`):

Canonical token overrides as BASE=chain:address. BTC/WBTC and ETH/WETH on Ethereum, and SOL on Solana are built in. At most 30 distinct DEX base symbols per scan.

## `dex_in_best` (type: `boolean`):

Include DEX last prices in best buy/sell selection. False retains DEX rows but selects the best prices from CEX order books only.

## `min_spread_pct` (type: `string`):

Optional finite decimal percentage, e.g. 0.01. Only pairs with at least two eligible venues and a gross spread at or above this threshold are returned. Empty means no filter.

## `max_items` (type: `integer`):

Maximum delivered rows including diagnostics. Defaults to 100. Spreads use all selected venues before this output cap. If limit is also supplied, the smaller value applies.

## `coin` (type: `array`):

Compatibility alias for pairs. The canonical field takes precedence when both are supplied.

## `exchange` (type: `array`):

Compatibility alias for exchanges. The canonical field takes precedence when both are supplied.

## `spread_min` (type: `string`):

Compatibility alias for min_spread_pct. The canonical field takes precedence when both are supplied.

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

Compatibility alias for max_items. If both are supplied, the smaller value applies.

## Actor input object example

```json
{
  "pairs": [
    "BTC/USDT",
    "ETH/USDT"
  ],
  "dex_tokens": [],
  "dex_in_best": true
}
```

# Actor output Schema

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

One row per requested pair and venue, including diagnostics.

## `output` (type: `string`):

Venue snapshots, partial flag and warnings.

# 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"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("headofactors/crypto-arbitrage-scanner").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",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("headofactors/crypto-arbitrage-scanner").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"
  ]
}' |
apify call headofactors/crypto-arbitrage-scanner --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,headofactors/crypto-arbitrage-scanner"
        }
    }
}
```

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/7UowhyBF3ZiwHzbkk/builds/VLvwcmYvxNeSxmT6O/openapi.json
