# DEX Liquidity Depth Analyzer (Slippage at $1K/10K/100K/1M) (`gochujang/dex-liquidity-depth-analyzer`) Actor

On-demand liquidity + slippage analysis for any ERC20 token. Aggregates every DEX pair via DexScreener, computes slippage curves at trade sizes $1K/10K/100K/1M using constant-product AMM. Find the deepest pool before a big trade. $0.03 per token.

- **URL**: https://apify.com/gochujang/dex-liquidity-depth-analyzer.md
- **Developed by:** [Hojun Lee](https://apify.com/gochujang) (community)
- **Categories:** Developer tools, Automation, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## DEX Liquidity Depth Analyzer

> On-demand liquidity + slippage analysis for any ERC20 token. Aggregates every DEX pair via **DexScreener** and computes slippage curves at trade sizes **$1K / $10K / $100K / $1M**. Find the deepest pool before a big trade. **$0.03 per token. No API key.**

---

### Why this exists

Before you swap $50,000 of a token, you want to know:
1. **Where** is the deepest pool?
2. **How much slippage** will I eat at this size?
3. **Should I split** across multiple DEXs?

DexScreener shows pair-by-pair liquidity but doesn't compute slippage. Aggregators (1inch, 0x) show splits but only at quote time, and not as exportable data.

This actor gives you the **whole map** for a token in one row per pair, plus slippage curves at standard probe sizes — ready to feed into a routing algorithm or a research dashboard.

---

### What you get

#### Summary row
```json
{
  "_type": "summary",
  "token_address": "0xa0b...eb48",
  "token_symbol": "USDC",
  "pair_count": 30,
  "total_liquidity_usd": 14523000.0,
  "total_volume_24h_usd": 50231000.0,
  "by_dex_liquidity": {"uniswap": 8200000, "curve": 3100000, "sushiswap": 1500000},
  "by_chain_liquidity": {"ethereum": 9500000, "base": 2500000, "arbitrum": 1800000},
  "best_pool_for_100k": {"dex": "uniswap", "chain": "ethereum", "slippage_pct": 0.05}
}
````

#### Per-pair row

```json
{
  "_type": "pair",
  "dex": "uniswap",
  "chain": "ethereum",
  "pair_address": "0x88e6...",
  "base_symbol": "USDC",
  "quote_symbol": "ETH",
  "price_usd": 1.0001,
  "liquidity_usd": 8200000,
  "volume_24h_usd": 35200000,
  "buys_24h": 3210,
  "sells_24h": 3098,
  "price_change_24h_pct": 0.02,
  "slippage_1k_pct": 0.01,
  "slippage_10k_pct": 0.10,
  "slippage_100k_pct": 1.20,
  "slippage_1m_pct": 11.80,
  "url": "https://dexscreener.com/ethereum/0x88e6..."
}
```

***

### Use cases

1. **Pre-trade planning** — Don't market-buy $200K of an illiquid token and lose 8% to slippage
2. **DEX aggregator validation** — Sanity-check what 1inch tells you; compare actual pool depth
3. **Treasury operations** — DAO treasuries selling project tokens need depth analysis
4. **Arbitrage research** — Find the price-difference pools with enough TVL to make arb worth it
5. **Liquidity audit** — Verify how much of a token's "TVL" is actually accessible vs concentrated

***

### Quick start

#### Analyze USDC across all chains

```json
{
  "tokenAddress": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
}
```

#### Analyze a memecoin on Solana only

```json
{
  "tokenAddress": "0x6982508145454ce325ddbe47a25d4ec3d2311933",
  "chainFilter": "ethereum",
  "minLiquidityUsd": 100000
}
```

#### Find best pool for a $250K trade

```json
{
  "tokenAddress": "0x...",
  "sortBy": "slippage_100k_asc",
  "probeSizesUsd": [50000, 100000, 250000, 500000]
}
```

***

### Slippage methodology

For each pool, slippage at size `S` is approximated using the constant-product (x·y=k) formula with pool TVL as the reserve:

```
side = TVL / 2
amount_out = (side × S) / (side + S)
slippage % = (S - amount_out) / S
```

**Limitations**:

- This approximation assumes 50/50 reserves (true for most Uni V2 / SushiSwap pools, ~true for V3 pools at the active range).
- For **Curve stableswap** pools, the actual slippage is lower than this estimate (curve.fi math is much more efficient near the peg). Treat curve slippage numbers as an upper bound.
- For **concentrated liquidity (Uni V3)**, real slippage depends on which tick range you cross. Our estimate uses available liquidity but doesn't model tick-by-tick.

For exact routing, use 1inch / 0x aggregators at quote time.

***

### Pricing

**Pay-Per-Event**: `$0.03 per token analyzed.`

Flat fee regardless of pair count. Vs:

- DexScreener Pro: $10/mo (subscription)
- 1inch API quotes: free but per-quote and no bulk export
- Routescan: $99+/mo

If you analyze fewer than 333 tokens/mo, this actor is cheaper than DexScreener Pro.

***

### Supported chains

Whatever DexScreener supports — currently:
ethereum, bsc, polygon, arbitrum, optimism, base, avalanche, fantom, **solana**, blast, pulsechain, linea, scroll, etc.

The `chainFilter` input lets you narrow down.

***

### Related actors (same author)

- [Wallet PnL Analyzer](https://apify.com/gochujang/wallet-pnl-analyzer) — Whose wallets own this token in size
- [Token Holder Tracker](https://apify.com/gochujang/token-holder-tracker)
- [Smart Money Wallet Tracker](https://apify.com/gochujang/smart-money-tracker)
- [DEX Volume Tracker](https://apify.com/gochujang/dex-volume-tracker)

***

### Feedback

A short review helps traders find it: [Leave a review on Apify Store](https://apify.com/gochujang/dex-liquidity-depth-analyzer#reviews)

# Actor input Schema

## `tokenAddress` (type: `string`):

ERC20 contract address (0x...) on any chain. Pairs across all chains will be returned unless filtered.

## `chainFilter` (type: `string`):

Only include pairs on this chain. Empty = all chains.

## `minLiquidityUsd` (type: `integer`):

Skip pools with less than this TVL in USD.

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

Max pairs to return after filter/sort.

## `sortBy` (type: `string`):

Row order.

## `probeSizesUsd` (type: `array`):

Trade sizes for slippage curve. Default: \[1000, 10000, 100000, 1000000].

## `telegramBotToken` (type: `string`):

Telegram bot token for summary notification.

## `telegramChatId` (type: `string`):

Chat ID.

## Actor input object example

```json
{
  "tokenAddress": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
  "chainFilter": "",
  "minLiquidityUsd": 10000,
  "limit": 50,
  "sortBy": "liquidity_desc",
  "probeSizesUsd": [
    1000,
    10000,
    100000,
    1000000
  ],
  "telegramChatId": ""
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `summary` (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 = {
    "tokenAddress": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
};

// Run the Actor and wait for it to finish
const run = await client.actor("gochujang/dex-liquidity-depth-analyzer").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 = { "tokenAddress": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" }

# Run the Actor and wait for it to finish
run = client.actor("gochujang/dex-liquidity-depth-analyzer").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "tokenAddress": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
}' |
apify call gochujang/dex-liquidity-depth-analyzer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=gochujang/dex-liquidity-depth-analyzer",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "DEX Liquidity Depth Analyzer (Slippage at $1K/10K/100K/1M)",
        "description": "On-demand liquidity + slippage analysis for any ERC20 token. Aggregates every DEX pair via DexScreener, computes slippage curves at trade sizes $1K/10K/100K/1M using constant-product AMM. Find the deepest pool before a big trade. $0.03 per token.",
        "version": "0.1",
        "x-build-id": "EBTE82mdNadHt3w7g"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/gochujang~dex-liquidity-depth-analyzer/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-gochujang-dex-liquidity-depth-analyzer",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/gochujang~dex-liquidity-depth-analyzer/runs": {
            "post": {
                "operationId": "runs-sync-gochujang-dex-liquidity-depth-analyzer",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/gochujang~dex-liquidity-depth-analyzer/run-sync": {
            "post": {
                "operationId": "run-sync-gochujang-dex-liquidity-depth-analyzer",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "tokenAddress"
                ],
                "properties": {
                    "tokenAddress": {
                        "title": "Token contract address",
                        "pattern": "^0x[a-fA-F0-9]{40}$",
                        "type": "string",
                        "description": "ERC20 contract address (0x...) on any chain. Pairs across all chains will be returned unless filtered."
                    },
                    "chainFilter": {
                        "title": "Chain filter",
                        "enum": [
                            "",
                            "ethereum",
                            "bsc",
                            "polygon",
                            "arbitrum",
                            "optimism",
                            "base",
                            "avalanche",
                            "solana",
                            "fantom"
                        ],
                        "type": "string",
                        "description": "Only include pairs on this chain. Empty = all chains.",
                        "default": ""
                    },
                    "minLiquidityUsd": {
                        "title": "Min liquidity (USD)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Skip pools with less than this TVL in USD.",
                        "default": 10000
                    },
                    "limit": {
                        "title": "Max pairs",
                        "minimum": 1,
                        "maximum": 200,
                        "type": "integer",
                        "description": "Max pairs to return after filter/sort.",
                        "default": 50
                    },
                    "sortBy": {
                        "title": "Sort by",
                        "enum": [
                            "liquidity_desc",
                            "volume_24h_desc",
                            "slippage_100k_asc"
                        ],
                        "type": "string",
                        "description": "Row order.",
                        "default": "liquidity_desc"
                    },
                    "probeSizesUsd": {
                        "title": "Probe trade sizes (USD)",
                        "type": "array",
                        "description": "Trade sizes for slippage curve. Default: [1000, 10000, 100000, 1000000].",
                        "default": [
                            1000,
                            10000,
                            100000,
                            1000000
                        ]
                    },
                    "telegramBotToken": {
                        "title": "Telegram Bot Token",
                        "type": "string",
                        "description": "Telegram bot token for summary notification."
                    },
                    "telegramChatId": {
                        "title": "Telegram Chat ID",
                        "type": "string",
                        "description": "Chat ID.",
                        "default": ""
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
