# DEX Pool APR Ranker (concentrated liquidity, multi-chain) (`galterapp/dex-pool-apr-ranker`) Actor

Ranks concentrated-liquidity pools (Aerodrome, Uniswap v3/v4, PancakeSwap v3, Velodrome…) on any chain by fee APR, momentum, fee velocity and a risk-gated heat score. Classifies stable vs volatile pairs; flags thin TVL, new pools, emission farms, yield volatility. No keys.

- **URL**: https://apify.com/galterapp/dex-pool-apr-ranker.md
- **Developed by:** [Galter Time](https://apify.com/galterapp) (community)
- **Categories:** Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 result rows

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?

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

## DEX Pool APR Ranker — concentrated-liquidity pools, scored and risk-tagged

**What you get in one run:** every concentrated-liquidity pool on the chains you pick (Base by default —
Aerodrome Slipstream, Uniswap v3/v4, PancakeSwap v3, Velodrome, Sushi, Camelot), ranked by a **risk-gated
HEAT score** or plain fee APR, with the fields the raw feed doesn't give you:

- **kind** — `usd-stable` / `fx-stable` / `volatile` (from the pair's tokens)
- **momentum** — fee APR now vs its 7-day value, plus 1d/7d APY change
- **fee velocity** — 24h volume ÷ TVL (how hard the liquidity is working)
- **risk tags** — `IL-exposed`, `FX-drift`, `new(3d)`, `thin-tvl`, `volatile-yield(σ1.4)`, `emission-farm`, `llama-predicts-down`
- **heat score** — spot fee APR × momentum × newness × velocity, then multiplied by the risk gate

Use it to:

- **Pick where to LP** — filter `poolKinds: ["usd-stable"]`, sort by `feeApr`, ignore anything tagged `thin-tvl`.
- **Hunt fresh spikes** — `OUTPUT.fresh_and_rising` lists pools under 15 days old whose fee APR is still climbing.
- **Feed a rebalancer or agent** — stable JSON, pool ids link straight to DeFiLlama, runs in ~5 s.

![DEX pool APR ranker output table](https://files.catbox.moe/t7mdlz.png)

### Sample row

```json
{"chain":"Base","project":"aerodrome-slipstream","symbol":"USDC-USDT","kind":"usd-stable",
 "tvl_usd":8123400,"volume_24h_usd":21400000,"fee_apr_pct":9.7,"reward_apr_pct":0,"fee_apr_7d_pct":10.4,
 "apy_mean_30d_pct":11.4,"momentum":"falling","fee_velocity":2.63,"age_days":412,"heat_score":11.9,
 "risk_multiplier":1.0,"risk_tags":[],"defillama_url":"https://defillama.com/yields/pool/…","ts":1788360000}
```

`OUTPUT` holds `top[]`, `fresh_and_rising[]`, and `matched_before_limit`.

### Input

| Field | Default | Meaning |
|---|---|---|
| `chains` | `["Base"]` | DeFiLlama chain names |
| `projects` | CL set | DeFiLlama project slugs; `allProjects: true` ignores this |
| `poolKinds` | all three | `usd-stable`, `fx-stable`, `volatile` |
| `minTvlUsd` | 50,000 | drop thin pools |
| `minFeeAprPct` | 0 | fee APR floor (emissions excluded) |
| `sortBy` | `heat` | `heat`, `feeApr`, `totalApy`, `tvl`, `velocity` |
| `maxResults` | 50 | rows returned (and paid for) |

### Notes

- Data: DeFiLlama yields API (public, no key). Fee APR = `apyBase`; emissions = `apyReward`.
- Heat and risk multipliers are heuristics for screening, not advice; raw fields are always included.
- Pricing: pay per pool row returned.

# Actor input Schema

## `chains` (type: `array`):

DeFiLlama chain names, e.g. Base, Ethereum, Arbitrum, Optimism, Polygon, BSC.

## `projects` (type: `array`):

DeFiLlama project slugs. Empty = the concentrated-liquidity set (aerodrome-slipstream, uniswap-v3, uniswap-v4, pancakeswap-amm-v3, velodrome-v3, sushiswap-v3, camelot-v3).

## `allProjects` (type: `boolean`):

Include every yield source DeFiLlama tracks on the chosen chains, not just concentrated-liquidity DEXes.

## `poolKinds` (type: `array`):

usd-stable (USD/USD pairs), fx-stable (e.g. EURC/USDC), volatile (anything with a non-stable leg).

## `minTvlUsd` (type: `integer`):

Skip pools below this TVL.

## `minFeeAprPct` (type: `integer`):

Skip pools whose fee APR (excluding token emissions) is below this.

## `maxFeeAprPct` (type: `integer`):

Drop pools above this fee APR — 4–5 digit APRs on day-old pools are dead-market noise. Raise to 100000 to keep them.

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

heat = risk-gated spike score; feeApr; totalApy; tvl; velocity (24h volume / TVL).

## `maxResults` (type: `integer`):

Cap on rows returned (and paid for).

## Actor input object example

```json
{
  "chains": [
    "Base"
  ],
  "projects": [],
  "allProjects": false,
  "poolKinds": [
    "usd-stable",
    "fx-stable",
    "volatile"
  ],
  "minTvlUsd": 50000,
  "minFeeAprPct": 0,
  "maxFeeAprPct": 1000,
  "sortBy": "heat",
  "maxResults": 50
}
```

# Actor output Schema

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

Dataset items: chain, project, symbol, pool\_id, kind, tvl\_usd, volume\_24h\_usd, fee\_apr\_pct, reward\_apr\_pct, total\_apy\_pct, fee\_apr\_7d\_pct, apy\_mean\_30d\_pct, momentum, fee\_velocity, yield\_sigma, age\_days, heat\_score, risk\_multiplier, risk\_tags, defillama\_url, ts.

## `summary` (type: `string`):

Key-value store record with matched\_before\_limit, top\[] and fresh\_and\_rising\[].

# 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 = {
    "chains": [
        "Base"
    ],
    "projects": [],
    "poolKinds": [
        "usd-stable",
        "fx-stable",
        "volatile"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("galterapp/dex-pool-apr-ranker").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 = {
    "chains": ["Base"],
    "projects": [],
    "poolKinds": [
        "usd-stable",
        "fx-stable",
        "volatile",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("galterapp/dex-pool-apr-ranker").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 '{
  "chains": [
    "Base"
  ],
  "projects": [],
  "poolKinds": [
    "usd-stable",
    "fx-stable",
    "volatile"
  ]
}' |
apify call galterapp/dex-pool-apr-ranker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,galterapp/dex-pool-apr-ranker"
        }
    }
}

```

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/qHUWRE6K9iNMg8ei5/builds/s4qHRse8SEQDZIqnQ/openapi.json
