# Crypto Arbitrage Scanner (Real-Time & Deep Links) (`seralifatih/arbitrage`) Actor

Scans 8+ major exchanges including KuCoin, OKX, Gate.io, and MEXC. Returns direct trade links, spread percentage, and liquidity-tested profitability.

- **URL**: https://apify.com/seralifatih/arbitrage.md
- **Developed by:** [Fatih İlhan](https://apify.com/seralifatih) (community)
- **Categories:** Developer tools, Integrations, Automation
- **Stats:** 52 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$34.99/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period. You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

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

## 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

## 🚀 Crypto Arbitrage Scanner & Opportunity Detector

[![Run on Apify](https://img.shields.io/badge/Run%20on-Apify-ff9033?style=flat-square\&logo=apify)](https://apify.com/)
[![Python 3.11](https://img.shields.io/badge/Python-3.11-blue?style=flat-square\&logo=python)](https://www.python.org/)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)

A high-performance, real-time cryptocurrency arbitrage scanner built for the **Apify Platform**. It scans 8+ major exchanges (CEX) to find price discrepancies for popular Meme coins, AI tokens, and Layer-1 assets.

Unlike simple bots, this scanner calculates **Net Profit** after fees and checks for **Liquidity Depth** (based on a $100 test order) to ensure the opportunity is realistic.

***

### ✨ Key Features

- **Multi-Exchange Support:** Scans `OKX`, `KuCoin`, `Gate.io`, `MEXC`, `Kraken`, `Bybit`, `Coinbase`, and more.
- **Real-Time "Maker" Fee Logic:** Calculates profit based on professional trading fees (0.05%) rather than standard retail fees.
- **Direct Trade Links:** Returns direct URLs to the specific trading pair on both exchanges for instant execution.
- **Liquidity Tested:** Simulates a $100 order to calculate the *effective price* (slippage included), avoiding "fake" top-of-the-book opportunities.
- **Residential Proxy Support:** Built-in configuration to use Residential Proxies (CZ/DE/NL) to bypass geo-restrictions and rate limits.
- **Enterprise JSON Output:** Clean, structured data ready for API consumption.

***

### 📊 Sample Output

The actor returns a detailed JSON object for each scanned pair:

```json
{
  "symbol": "MEME/USDT",
  "buy_exchange": "okx",
  "sell_exchange": "gateio",
  "buy_price": 0.00082253,
  "sell_price": 0.00082484,
  "spread_pct": 0.28,
  "net_profit_pct": 0.23,
  "trade_links": {
    "buy": "[https://www.okx.com/trade-meme-usdt](https://www.okx.com/trade-meme-usdt)",
    "sell": "[https://www.gate.io/trade/MEME_USDT](https://www.gate.io/trade/MEME_USDT)"
  },
  "market_depth": {
    "buy_liquidity_tested": "$100",
    "note": "Calculated on top order book depth"
  },
  "is_opportunity": true,
  "timestamp": 1706985089
}
```

### 🛠 Supported Exchanges

- **Gate.io** (High volatility opportunities)
- **MEXC** (Best for new "Degen" coins)
- **KuCoin**
- **OKX**
- **Kraken**
- **Bybit**
- **Coinbase**
- *(Binance support requires specific region-unlocked proxies)*

### 🚀 How to Use

This tool is a cloud-based **Apify Actor**. You do not need to install any software or manage servers.

#### Method 1: No-Code (Apify Console)

1. Navigate to the Actor page on Apify Store.
2. Click **Try for free** or **Subscribe**.
3. In the Input tab, ensure `mode` is set to `"scan-all"`.
4. Click **Start**.
5. Download the results in JSON, CSV, or Excel format.

#### Method 2: API Integration (For Developers)

You can trigger this scanner from your own application using the Apify API:

```bash
curl --request POST \
  --url [https://api.apify.com/v2/acts/YOUR_USERNAME~crypto-arbitrage-scanner/runs?token=YOUR_API_TOKEN](https://api.apify.com/v2/acts/YOUR_USERNAME~crypto-arbitrage-scanner/runs?token=YOUR_API_TOKEN) \
  --header 'content-type: application/json' \
  --data '{"mode": "scan-all"}'
```

### ⚙️ Input Configuration

The actor accepts a simple input schema:

```json
{
    "mode": "scan-all"
}
```

- **scan-all:** Scans a pre-defined list of high-volatility coins (PEPE, WIF, BONK, SUI, APT, ORDI, etc.).
- **single:** (Optional) Scan a specific symbol provided in the `symbol` field.

### ⚠️ Disclaimer

This tool is for informational and educational purposes only. Cryptocurrency trading involves significant risk. The "Net Profit" calculation is an estimation based on current order book depth and assumed fee tiers. Always do your own research before trading.

# Actor input Schema

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

Choose to scan all default pairs or check a single specific pair.

## `symbol` (type: `string`):

Example: BTC/USDT

## Actor input object example

```json
{
  "mode": "scan-all",
  "symbol": "BTC/USDT"
}
```

# Actor output Schema

## `opportunities` (type: `string`):

List of detected arbitrage opportunities with direct trade links.

# 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 = {};

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

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

```

## MCP server setup

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

```

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/TlDqGqN1Ff8Wonpd8/builds/5lBLZgsZH3TyLtbcr/openapi.json
